v20.1.0.47
|
@ -1,242 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<title>Essential JS 1 : PDF</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta charset="utf-8" />
|
||||
<link href="../content/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
|
||||
<link href="../content/default.css" rel="stylesheet" />
|
||||
<link href="../content/default-responsive.css" rel="stylesheet" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../scripts/jquery-1.11.3.min.js"></script>
|
||||
<![endif]-->
|
||||
<!--[if gte IE 9]><!-->
|
||||
<script src="../scripts/jquery-3.4.1.min.js"></script>
|
||||
<!--<![endif]-->
|
||||
<script src="../scripts/jquery.easing.1.3.min.js"></script>
|
||||
<script src="../scripts/jsondata.min.js"></script>
|
||||
<script src="../scripts/jsrender.min.js"></script>
|
||||
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
|
||||
<script src="../scripts/properties.js" type="text/javascript"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div style="width:100%" id="viewer">
|
||||
<div style="width:100%">
|
||||
<div id="toolbar" class="e-pdfviewer-toolbarcontainer" style="width:100%">
|
||||
<p style="float:left;padding:13px;">PDF viewer</p>
|
||||
<ul style="float:right;padding:2px">
|
||||
<li id="close">
|
||||
<span class="e-pdfviewer-icon e-pdfviewer-closefind" id="alertclose" style="position:relative;float:right;padding:8px"></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control">
|
||||
<div id="container"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-container-fluid">
|
||||
<div class="row">
|
||||
<div class="cols-sample-area">
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
Click the button to view a PDF document generated by Essential PDF. Please note
|
||||
that Adobe Reader or its equivalent is required to view the resultant document.
|
||||
</div>
|
||||
</div>
|
||||
<div class="rowdiv">
|
||||
<div style="border: solid 1px #EDEDED; padding: 5px 7px 5px 7px;">
|
||||
<table width="100%" height="50px">
|
||||
<tr>
|
||||
<td align="left" width="18%">
|
||||
<label>
|
||||
<b>Encryption Type </b>
|
||||
</label>
|
||||
</td>
|
||||
<td align="left" width="15%">
|
||||
<input type="radio" id="rdButton40" name="encryptionType" value="40_RC4" checked="checked" />
|
||||
<label for="rdButton40">
|
||||
40 Bit RC4
|
||||
</label>
|
||||
</td>
|
||||
<td align="left" width="15%">
|
||||
<input type="radio" id="rdButton128RC4" name="encryptionType" value="128_RC4" />
|
||||
<label for="rdButton128RC4">
|
||||
128 Bit RC4
|
||||
</label>
|
||||
</td>
|
||||
<td align="left" width="15%">
|
||||
<input type="radio" id="rdButton128AES" name="encryptionType" value="128_AES" />
|
||||
<label for="rdButton128AES">
|
||||
128 Bit AES
|
||||
</label>
|
||||
</td>
|
||||
<td align="left" width="15%">
|
||||
<input type="radio" id="rdButton256" name="encryptionType" value="256_AES" />
|
||||
<label for="rdButton256">
|
||||
256 Bit AES
|
||||
</label>
|
||||
</td>
|
||||
<td align="left" width="18%">
|
||||
<input type="radio" id="rdButton256Revision6" name="encryptionType" value="256_AES_Revision_6" />
|
||||
<label for="rdButton256">
|
||||
256 Bit AES Revision 6
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
<div class="celldiv">
|
||||
<div style="border: solid 1px #EDEDED; padding: 5px 7px 5px 7px;">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td align="left" width="100%">
|
||||
<b>User password</b> : password
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" width="100%">
|
||||
<b>Owner password</b> : syncfusion
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
<div class="celldiv">
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
</br>
|
||||
<td><input type="checkbox" class="nodetext" id="pdfViewer" /><label for="pdfViewer" class="clslab">Open the created PDF document in PDF viewer</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rowdiv">
|
||||
<div class="celldiv">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
</br>
|
||||
<td class="btnsht" align="left">
|
||||
<button id="generatedocument">Create PDF</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</br>
|
||||
<label>
|
||||
Note: The document creation/manipulation functionalities are defined within Web API.
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
$(function () {
|
||||
$("#pdfViewer").ejCheckBox({ checked: true });
|
||||
$("#generatedocument").ejButton({
|
||||
showRoundedCorner: true,
|
||||
size: "medium"
|
||||
});
|
||||
});
|
||||
|
||||
$('#generatedocument').click(function () {
|
||||
if ((document.getElementById("pdfViewer")).checked) {
|
||||
// Open the created PDF document in PDF viewer
|
||||
var jsonData = new Object();
|
||||
jsonData["pdfviewer"] = "true";
|
||||
var option1 = document.querySelector('input[name = "encryptionType"]:checked').value;
|
||||
jsonData["encryptiontype"] = option1;
|
||||
var jsonResult = JSON.stringify(jsonData);
|
||||
($.ajax({
|
||||
type: 'POST',
|
||||
url: window.baseurl + 'api/PDF/GenerateEncryptDocument',
|
||||
crossDomain: true,
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
dataType: 'json',
|
||||
data: jsonResult,
|
||||
traditional: true,
|
||||
success: function (data) {
|
||||
var obj = $("#container").data("ejPdfViewer");
|
||||
if (obj != null) {
|
||||
obj.destroy();
|
||||
}
|
||||
var viewer = $("#viewer");
|
||||
viewer.show();
|
||||
//Referring the theme files
|
||||
var fileref = document.createElement("link");
|
||||
fileref.setAttribute("rel", "stylesheet");
|
||||
fileref.setAttribute("type", "text/css");
|
||||
fileref.setAttribute("href", "../content/ejthemes/flat-lime-dark/ej.web.all.min.css");
|
||||
document.getElementsByTagName("head")[0].appendChild(fileref);
|
||||
$("#toolbar").ejToolbar({ height: "auto" });
|
||||
//Adding the css properties
|
||||
var pdfviewerdiv = document.getElementById("container");
|
||||
pdfviewerdiv.style.height = "96.5%";
|
||||
pdfviewerdiv.style.width = "100%";
|
||||
pdfviewerdiv.style.zIndex = 2000;
|
||||
pdfviewerdiv.style.position = "absolute";
|
||||
pdfviewerdiv.style.top = "45px";
|
||||
pdfviewerdiv.style.left = "0px";
|
||||
//Initializing the PDF viewer
|
||||
if (data != "") {
|
||||
$("#container").ejPdfViewer({ serviceUrl: window.baseurl + 'api/PdfViewer', pdfService: ej.PdfViewer.PdfService.Local, documentPath: "syncfusion,Encryption"});
|
||||
}
|
||||
var viewer = document.getElementById('container_viewerContainer');
|
||||
viewer.style.background = 'rgba(0,0,0,0.7)';
|
||||
},
|
||||
error: function (msg, textStatus, errorThrown) {
|
||||
alert("error");
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
// Download the created PDF document without vieweing in PDF viewer
|
||||
var option1 = document.querySelector('input[name = "encryptionType"]:checked').value;
|
||||
var attr = { action: window.baseurl + "api/PDF/GenerateEncryptDocument", method: "post" };
|
||||
var form = ej.buildTag("form", "", null, attr);
|
||||
inputAttr = { name: "ImportType", type: "hidden", value: option1 };
|
||||
input = ej.buildTag("input", "", null, inputAttr);
|
||||
form.append(input);
|
||||
$("body").append(form);
|
||||
form.submit();
|
||||
}
|
||||
});
|
||||
$('#alertclose').on("click", function (e) {
|
||||
$('link[rel=stylesheet][href~="../content/ejthemes/flat-lime-dark/ej.web.all.min.css"]').remove();
|
||||
$("#viewer").hide();
|
||||
});
|
||||
|
||||
$('body').on("keyup", function (e) {
|
||||
if (e.keyCode == 27) {
|
||||
$('link[rel=stylesheet][href~="../content/ejthemes/flat-lime-dark/ej.web.all.min.css"]').remove();
|
||||
$("#viewer").hide();
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<style>
|
||||
#viewer {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0%;
|
||||
left: 0%;
|
||||
height: 96.5%;
|
||||
width: 100%;
|
||||
z-index: 1000002;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
|
@ -1,238 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<title>Essential JS 1 : PDF</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta charset="utf-8" />
|
||||
<link href="../content/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
|
||||
<link href="../content/default.css" rel="stylesheet" />
|
||||
<link href="../content/default-responsive.css" rel="stylesheet" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../scripts/jquery-1.11.3.min.js"></script>
|
||||
<![endif]-->
|
||||
<!--[if gte IE 9]><!-->
|
||||
<script src="../scripts/jquery-3.4.1.min.js"></script>
|
||||
<!--<![endif]-->
|
||||
<script src="../scripts/jquery.easing.1.3.min.js"></script>
|
||||
<script src="../scripts/jsondata.min.js"></script>
|
||||
<script src="../scripts/jsrender.min.js"></script>
|
||||
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
|
||||
<script src="../scripts/properties.js" type="text/javascript"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div style="width:100%" id="viewer">
|
||||
<div style="width:100%">
|
||||
<div id="toolbar" class="e-pdfviewer-toolbarcontainer" style="width:100%">
|
||||
<p style="float:left;padding:13px;">PDF viewer</p>
|
||||
<ul style="float:right;padding:2px">
|
||||
<li id="close">
|
||||
<span class="e-pdfviewer-icon e-pdfviewer-closefind" id="alertclose" style="position:relative;float:right;padding:8px"></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control">
|
||||
<div id="container"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content-container-fluid">
|
||||
<div class="row">
|
||||
<div class="cols-sample-area">
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
Click the Create PDF button to view a PDF document generated using pdf template
|
||||
form, loaded in memory, it’s fields filled with appropriate data by using
|
||||
Essential PDF. Please note that Adobe Reader or its equivalent is required to view
|
||||
the resultant document
|
||||
</div>
|
||||
</div>
|
||||
<div class="LineSpace">
|
||||
</div>
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
<div class="celldiv">
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
</br>
|
||||
<td><input type="checkbox" class="nodetext" id="pdfViewer" /><label for="pdfViewer" class="clslab">Open the created PDF document in PDF viewer</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tablediv">
|
||||
</br>
|
||||
<button id="viewtemplate">View Template</button>
|
||||
<div class="rowdiv">
|
||||
<div class="celldiv">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
</br>
|
||||
<td class="btnsht" align="left">
|
||||
<button id="generatedocument">Create PDF</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</br>
|
||||
<label>
|
||||
Note: The document creation/manipulation functionalities are defined within Web API.
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function () {
|
||||
$("#pdfViewer").ejCheckBox({ checked: true });
|
||||
$("#generatedocument").ejButton({
|
||||
showRoundedCorner: true,
|
||||
size: "medium"
|
||||
});
|
||||
$("#viewtemplate").ejButton({
|
||||
showRoundedCorner: true,
|
||||
size: "medium"
|
||||
})
|
||||
});
|
||||
$('#viewtemplate').click(function () {
|
||||
if ((document.getElementById("pdfViewer")).checked) {
|
||||
// Open the created PDF document in PDF viewer
|
||||
var jsonData = new Object();
|
||||
jsonData["pdfviewer"] = "true";
|
||||
var jsonResult = JSON.stringify(jsonData);
|
||||
($.ajax({
|
||||
type: 'POST',
|
||||
url: window.baseurl + 'api/PDF/GetFormFillTemplate',
|
||||
crossDomain: true,
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
dataType: 'json',
|
||||
data: jsonResult,
|
||||
traditional: true,
|
||||
success: function (data) {
|
||||
var obj = $("#container").data("ejPdfViewer");
|
||||
if (obj != null) {
|
||||
obj.destroy();
|
||||
}
|
||||
var viewer = $("#viewer");
|
||||
viewer.show();
|
||||
//Referring the theme files
|
||||
var fileref = document.createElement("link");
|
||||
fileref.setAttribute("rel", "stylesheet");
|
||||
fileref.setAttribute("type", "text/css");
|
||||
fileref.setAttribute("href", "../content/ejthemes/flat-lime-dark/ej.web.all.min.css");
|
||||
document.getElementsByTagName("head")[0].appendChild(fileref);
|
||||
$("#toolbar").ejToolbar({ height: "auto" });
|
||||
//Adding the css properties
|
||||
var pdfviewerdiv = document.getElementById("container");
|
||||
pdfviewerdiv.style.height = "96.5%";
|
||||
pdfviewerdiv.style.width = "100%";
|
||||
pdfviewerdiv.style.zIndex = 2000;
|
||||
pdfviewerdiv.style.position = "absolute";
|
||||
pdfviewerdiv.style.top = "45px";
|
||||
pdfviewerdiv.style.left = "0px";
|
||||
//Initializing the PDF viewer
|
||||
if (data != "") {
|
||||
$("#container").ejPdfViewer({ serviceUrl: window.baseurl + 'api/PdfViewer', pdfService: ej.PdfViewer.PdfService.Local, documentPath: "GetFormFill" });
|
||||
}
|
||||
var viewer = document.getElementById('container_viewerContainer');
|
||||
viewer.style.background = 'rgba(0,0,0,0.7)';
|
||||
},
|
||||
error: function (msg, textStatus, errorThrown) {
|
||||
alert("error");
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
// Download the created PDF document without vieweing in PDF viewer
|
||||
var attr = { action: window.baseurl + "api/PDF/GetFormFillTemplate", method: "post" };
|
||||
var form = ej.buildTag("form", "", null, attr);
|
||||
$("body").append(form);
|
||||
form.submit();
|
||||
}
|
||||
});
|
||||
$('#generatedocument').click(function () {
|
||||
if ((document.getElementById("pdfViewer")).checked) {
|
||||
// Open the created PDF document in PDF viewer
|
||||
var jsonData = new Object();
|
||||
jsonData["pdfviewer"] = "true";
|
||||
var jsonResult = JSON.stringify(jsonData);
|
||||
($.ajax({
|
||||
type: 'POST',
|
||||
url: window.baseurl + 'api/PDF/GenerateFormFillTemplate',
|
||||
crossDomain: true,
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
dataType: 'json',
|
||||
data: jsonResult,
|
||||
traditional: true,
|
||||
success: function (data) {
|
||||
var obj = $("#container").data("ejPdfViewer");
|
||||
if (obj != null) {
|
||||
obj.destroy();
|
||||
}
|
||||
var viewer = $("#viewer");
|
||||
viewer.show();
|
||||
//Referring the theme files
|
||||
var fileref = document.createElement("link");
|
||||
fileref.setAttribute("rel", "stylesheet");
|
||||
fileref.setAttribute("type", "text/css");
|
||||
fileref.setAttribute("href", "../content/ejthemes/flat-lime-dark/ej.web.all.min.css");
|
||||
document.getElementsByTagName("head")[0].appendChild(fileref);
|
||||
$("#toolbar").ejToolbar({ height: "auto" });
|
||||
//Adding the css properties
|
||||
var pdfviewerdiv = document.getElementById("container");
|
||||
pdfviewerdiv.style.height = "96.5%";
|
||||
pdfviewerdiv.style.width = "100%";
|
||||
pdfviewerdiv.style.zIndex = 2000;
|
||||
pdfviewerdiv.style.position = "absolute";
|
||||
pdfviewerdiv.style.top = "45px";
|
||||
pdfviewerdiv.style.left = "0px";
|
||||
//Initializing the PDF viewer
|
||||
if (data != "") {
|
||||
$("#container").ejPdfViewer({ serviceUrl: window.baseurl + 'api/PdfViewer', pdfService: ej.PdfViewer.PdfService.Local, documentPath: "FormFill" });
|
||||
}
|
||||
var viewer = document.getElementById('container_viewerContainer');
|
||||
viewer.style.background = 'rgba(0,0,0,0.7)';
|
||||
},
|
||||
error: function (msg, textStatus, errorThrown) {
|
||||
alert("error");
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
// Download the created PDF document without vieweing in PDF viewer
|
||||
var attr = { action: window.baseurl + "api/PDF/GenerateFormFillTemplate", method: "post" };
|
||||
var form = ej.buildTag("form", "", null, attr);
|
||||
$("body").append(form);
|
||||
form.submit();
|
||||
}
|
||||
});
|
||||
$('#alertclose').on("click", function (e) {
|
||||
$('link[rel=stylesheet][href~="../content/ejthemes/flat-lime-dark/ej.web.all.min.css"]').remove();
|
||||
$("#viewer").hide();
|
||||
});
|
||||
|
||||
$('body').on("keyup", function (e) {
|
||||
if (e.keyCode == 27) {
|
||||
$('link[rel=stylesheet][href~="../content/ejthemes/flat-lime-dark/ej.web.all.min.css"]').remove();
|
||||
$("#viewer").hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
#viewer {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0%;
|
||||
left: 0%;
|
||||
height: 96.5%;
|
||||
width: 100%;
|
||||
z-index: 1000002;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
|
@ -1,176 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<title>Essential JS 1 : PDF</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta charset="utf-8" />
|
||||
<link href="../content/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
|
||||
<link href="../content/default.css" rel="stylesheet" />
|
||||
<link href="../content/default-responsive.css" rel="stylesheet" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../scripts/jquery-1.11.3.min.js"></script>
|
||||
<![endif]-->
|
||||
<!--[if gte IE 9]><!-->
|
||||
<script src="../scripts/jquery-3.4.1.min.js"></script>
|
||||
<!--<![endif]-->
|
||||
<script src="../scripts/jquery.easing.1.3.min.js"></script>
|
||||
<script src="../scripts/jsondata.min.js"></script>
|
||||
<script src="../scripts/jsrender.min.js"></script>
|
||||
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
|
||||
<script src="../scripts/properties.js" type="text/javascript"></script>
|
||||
<style>
|
||||
.control {
|
||||
width: 100%;
|
||||
min-height: 680px !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="width:100%" id="viewer">
|
||||
<div style="width:100%">
|
||||
<div id="toolbar" class="e-pdfviewer-toolbarcontainer" style="width:100%">
|
||||
<p style="float:left;padding:13px;">PDF viewer</p>
|
||||
<ul style="float:right;padding:2px">
|
||||
<li id="close">
|
||||
<span class="e-pdfviewer-icon e-pdfviewer-closefind" id="alertclose" style="position:relative;float:right;padding:8px"></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control">
|
||||
<div id="container"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-container-fluid">
|
||||
<div class="row">
|
||||
<div class="cols-sample-area">
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
Click the button to view a PDF document generated by Essential PDF. Please note
|
||||
that Adobe Reader or its equivalent is required to view the resultant document.
|
||||
</div>
|
||||
</div>
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
<div class="celldiv">
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
</br>
|
||||
<td><input type="checkbox" class="nodetext" id="pdfViewer" /><label for="pdfViewer" class="clslab">Open the created PDF document in PDF viewer</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
<div class="celldiv">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
</br>
|
||||
<td class="btnsht" align="left">
|
||||
<button id="generatedocument">Create PDF</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</br>
|
||||
<label>
|
||||
Note: The document creation/manipulation functionalities are defined within Web API.
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$("#pdfViewer").ejCheckBox({ checked: true });
|
||||
$("#generatedocument").ejButton({
|
||||
showRoundedCorner: true,
|
||||
size: "medium"
|
||||
});
|
||||
});
|
||||
$('#generatedocument').click(function () {
|
||||
if ((document.getElementById("pdfViewer")).checked) {
|
||||
// Open the created PDF document in PDF viewer
|
||||
var jsonData = new Object();
|
||||
jsonData["pdfviewer"] = "true";
|
||||
var jsonResult = JSON.stringify(jsonData);
|
||||
($.ajax({
|
||||
type: 'POST',
|
||||
url: window.baseurl + 'api/PDF/GeneratePDFDocument',
|
||||
crossDomain: true,
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
dataType: 'json',
|
||||
data: jsonResult,
|
||||
traditional: true,
|
||||
success: function (data) {
|
||||
var obj = $("#container").data("ejPdfViewer");
|
||||
if (obj != null) {
|
||||
obj.destroy();
|
||||
}
|
||||
var viewer = $("#viewer");
|
||||
viewer.show();
|
||||
//Referring the theme files
|
||||
var fileref=document.createElement("link");
|
||||
fileref.setAttribute("rel", "stylesheet");
|
||||
fileref.setAttribute("type", "text/css");
|
||||
fileref.setAttribute("href", "../content/ejthemes/flat-lime-dark/ej.web.all.min.css");
|
||||
document.getElementsByTagName("head")[0].appendChild(fileref);
|
||||
$("#toolbar").ejToolbar({ height: "auto" });
|
||||
//Adding the css properties
|
||||
var pdfviewerdiv = document.getElementById("container");
|
||||
pdfviewerdiv.style.height = "96.5%";
|
||||
pdfviewerdiv.style.width = "100%";
|
||||
pdfviewerdiv.style.zIndex = 2000;
|
||||
pdfviewerdiv.style.position = "absolute";
|
||||
pdfviewerdiv.style.top = "45px";
|
||||
pdfviewerdiv.style.left = "0px";
|
||||
//Initializing the PDF viewer
|
||||
if (data != "") {
|
||||
$("#container").ejPdfViewer({ serviceUrl: window.baseurl + 'api/PdfViewer', pdfService: ej.PdfViewer.PdfService.Local, documentPath: "GeneratePdf" });
|
||||
}
|
||||
var viewer = document.getElementById('container_viewerContainer');
|
||||
viewer.style.background = 'rgba(0,0,0,0.7)';
|
||||
},
|
||||
error: function (msg, textStatus, errorThrown) {
|
||||
alert("error");
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
// Download the created PDF document without vieweing in PDF viewer
|
||||
var attr = { action: window.baseurl + "api/PDF/GeneratePDFDocument", method: "post" };
|
||||
var form = ej.buildTag("form", "", null, attr);
|
||||
$("body").append(form);
|
||||
form.submit();
|
||||
}
|
||||
});
|
||||
$('#alertclose').on("click", function (e) {
|
||||
$('link[rel=stylesheet][href~="../content/ejthemes/flat-lime-dark/ej.web.all.min.css"]').remove();
|
||||
$("#viewer").hide();
|
||||
});
|
||||
|
||||
$('body').on("keyup", function (e) {
|
||||
if (e.keyCode == 27) {
|
||||
$('link[rel=stylesheet][href~="../content/ejthemes/flat-lime-dark/ej.web.all.min.css"]').remove();
|
||||
$("#viewer").hide();
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<style>
|
||||
#viewer {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0%;
|
||||
left: 0%;
|
||||
height: 96.5%;
|
||||
width: 100%;
|
||||
z-index: 1000002;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
|
@ -1,64 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<title>Essential JS 1 : PDF</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta charset="utf-8" />
|
||||
<link href="../content/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
|
||||
<link href="../content/default.css" rel="stylesheet" />
|
||||
<link href="../content/default-responsive.css" rel="stylesheet" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../scripts/jquery-1.11.3.min.js"></script>
|
||||
<![endif]-->
|
||||
<!--[if gte IE 9]><!-->
|
||||
<script src="../scripts/jquery-3.4.1.min.js"></script>
|
||||
<!--<![endif]-->
|
||||
<script src="../scripts/jquery.easing.1.3.min.js"></script>
|
||||
<script src="../scripts/jsondata.min.js"></script>
|
||||
<script src="../scripts/jsrender.min.js"></script>
|
||||
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
|
||||
<script src="../scripts/properties.js" type="text/javascript"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="content-container-fluid">
|
||||
<div class="row">
|
||||
<div class="cols-sample-area">
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
Click the button to view a PDF document generated by Essential PDF. Please note
|
||||
that Adobe Reader or its equivalent is required to view the resultant document.
|
||||
</div>
|
||||
</div>
|
||||
<div class="rowdiv">
|
||||
<div class="celldiv">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
</br>
|
||||
<td align="left">
|
||||
<input id="generatedocument" type="submit" class="Button" value="Create PDF" style="width:110px;height:20px" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</br>
|
||||
<label>
|
||||
Note: The document creation/manipulation functionalities are defined within Web API.</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('#generatedocument').click(function () {
|
||||
var attr = { action: window.baseurl + "api/PDF/GenerateInteractiveFeature", method: "post" };
|
||||
var form = ej.buildTag("form", "", null, attr);
|
||||
$("body").append(form);
|
||||
form.submit();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,179 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<title>Essential JS 1 : PDF</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta charset="utf-8" />
|
||||
<link href="../content/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
|
||||
<link href="../content/default.css" rel="stylesheet" />
|
||||
<link href="../content/default-responsive.css" rel="stylesheet" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../scripts/jquery-1.11.3.min.js"></script>
|
||||
<![endif]-->
|
||||
<!--[if gte IE 9]><!-->
|
||||
<script src="../scripts/jquery-3.4.1.min.js"></script>
|
||||
<!--<![endif]-->
|
||||
<script src="../scripts/jquery.easing.1.3.min.js"></script>
|
||||
<script src="../scripts/jsondata.min.js"></script>
|
||||
<script src="../scripts/jsrender.min.js"></script>
|
||||
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
|
||||
<script src="../scripts/properties.js" type="text/javascript"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div style="width:100%" id="viewer">
|
||||
<div style="width:100%">
|
||||
<div id="toolbar" class="e-pdfviewer-toolbarcontainer" style="width:100%">
|
||||
<p style="float:left;padding:13px;">PDF viewer</p>
|
||||
<ul style="float:right;padding:2px">
|
||||
<li id="close">
|
||||
<span class="e-pdfviewer-icon e-pdfviewer-closefind" id="alertclose" style="position:relative;float:right;padding:8px"></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control">
|
||||
<div id="container"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content-container-fluid">
|
||||
<div class="row">
|
||||
<div class="cols-sample-area">
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
Click the button to view a PDF document generated by Essential PDF. Please note
|
||||
that Adobe Reader or its equivalent is required to view the resultant document.
|
||||
</div>
|
||||
</div>
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
<div class="celldiv">
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
</br>
|
||||
<td><input type="checkbox" class="nodetext" id="pdfViewer" /><label for="pdfViewer" class="clslab">Open the created PDF document in PDF viewer</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
<div class="celldiv">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
</br>
|
||||
<td class="btnsht" align="left">
|
||||
<button id="generatedocument">Create PDF</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</br>
|
||||
<label>
|
||||
Note: The document creation/manipulation functionalities are defined within Web API.
|
||||
</label>
|
||||
<div class="control">
|
||||
<div id="container"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function () {
|
||||
$("#pdfViewer").ejCheckBox({ checked: true });
|
||||
$("#generatedocument").ejButton({
|
||||
showRoundedCorner: true,
|
||||
size: "medium"
|
||||
});
|
||||
});
|
||||
|
||||
$('#generatedocument').click(function () {
|
||||
if ((document.getElementById("pdfViewer")).checked) {
|
||||
// Open the created PDF document in PDF viewer
|
||||
var jsonData = new Object();
|
||||
jsonData["pdfviewer"] = "true";
|
||||
var jsonResult = JSON.stringify(jsonData);
|
||||
($.ajax({
|
||||
type: 'POST',
|
||||
url: window.baseurl + 'api/PDF/GenerateTableFeature',
|
||||
crossDomain: true,
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
dataType: 'json',
|
||||
data: jsonResult,
|
||||
traditional: true,
|
||||
success: function (data) {
|
||||
var obj = $("#container").data("ejPdfViewer");
|
||||
if (obj != null) {
|
||||
obj.destroy();
|
||||
}
|
||||
var viewer = $("#viewer");
|
||||
viewer.show();
|
||||
//Referring the theme files
|
||||
var fileref = document.createElement("link");
|
||||
fileref.setAttribute("rel", "stylesheet");
|
||||
fileref.setAttribute("type", "text/css");
|
||||
fileref.setAttribute("href", "../content/ejthemes/flat-lime-dark/ej.web.all.min.css");
|
||||
document.getElementsByTagName("head")[0].appendChild(fileref);
|
||||
$("#toolbar").ejToolbar({ height: "auto" });
|
||||
//Adding the css properties
|
||||
var pdfviewerdiv = document.getElementById("container");
|
||||
pdfviewerdiv.style.height = "96.5%";
|
||||
pdfviewerdiv.style.width = "100%";
|
||||
pdfviewerdiv.style.zIndex = 2000;
|
||||
pdfviewerdiv.style.position = "absolute";
|
||||
pdfviewerdiv.style.top = "45px";
|
||||
pdfviewerdiv.style.left = "0px";
|
||||
//Initializing the PDF viewer
|
||||
if (data != "") {
|
||||
$("#container").ejPdfViewer({ serviceUrl: window.baseurl + 'api/PdfViewer', pdfService: ej.PdfViewer.PdfService.Local, documentPath: "TableFeature" });
|
||||
}
|
||||
var viewer = document.getElementById('container_viewerContainer');
|
||||
viewer.style.background = 'rgba(0,0,0,0.7)';
|
||||
},
|
||||
error: function (msg, textStatus, errorThrown) {
|
||||
alert("error");
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
// Download the created PDF document without vieweing in PDF viewer
|
||||
var attr = { action: window.baseurl + "api/PDF/GenerateTableFeature", method: "post" };
|
||||
var form = ej.buildTag("form", "", null, attr);
|
||||
$("body").append(form);
|
||||
form.submit();
|
||||
}
|
||||
});
|
||||
$('#alertclose').on("click", function (e) {
|
||||
$('link[rel=stylesheet][href~="../content/ejthemes/flat-lime-dark/ej.web.all.min.css"]').remove();
|
||||
$("#viewer").hide();
|
||||
});
|
||||
|
||||
$('body').on("keyup", function (e) {
|
||||
if (e.keyCode == 27) {
|
||||
$('link[rel=stylesheet][href~="../content/ejthemes/flat-lime-dark/ej.web.all.min.css"]').remove();
|
||||
$("#viewer").hide();
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<style>
|
||||
#viewer {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0%;
|
||||
left: 0%;
|
||||
height: 96.5%;
|
||||
width: 100%;
|
||||
z-index: 1000002;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
|
@ -1,51 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>Essential JS 1 : Presentation</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
||||
<link href="../content/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
|
||||
<link href="../content/default.css" rel="stylesheet" />
|
||||
<link href="../content/default-responsive.css" rel="stylesheet" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../scripts/jquery-1.11.3.min.js" type="text/javascript"></script>
|
||||
<![endif]-->
|
||||
<!--[if gte IE 9]><!-->
|
||||
<script src="../scripts/jquery-3.4.1.min.js" type="text/javascript"></script>
|
||||
<!--<![endif]-->
|
||||
|
||||
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
|
||||
<script src="../scripts/properties.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="Common">
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
<label>
|
||||
This sample demonstrates adding comments to a PowerPoint presentation.
|
||||
</label>
|
||||
<label>
|
||||
Click the button to view a presentation document generated by Essential Presentation. Please note that MS PowerPoint viewer is required to view the resultant document.
|
||||
</label>
|
||||
</div>
|
||||
<br />
|
||||
<div class="rowdiv">
|
||||
<br />
|
||||
<div class="celldiv">
|
||||
<input onClick="formSubmit()" id="commentspresentation" class="buttonStyle" type="submit" value="Create Presentation" style="width:200px;" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function formSubmit(){
|
||||
var attr = { action:window.baseurl + "api/Presentation/CommentsPresentation", method: "post" };
|
||||
var form = ej.buildTag("form", "", null, attr);
|
||||
$("body").append(form);
|
||||
form.submit();}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,51 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>Essential JS 1 : Presentation</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
||||
<link href="../content/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
|
||||
<link href="../content/default.css" rel="stylesheet" />
|
||||
<link href="../content/default-responsive.css" rel="stylesheet" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../scripts/jquery-1.11.3.min.js" type="text/javascript"></script>
|
||||
<![endif]-->
|
||||
<!--[if gte IE 9]><!-->
|
||||
<script src="../scripts/jquery-3.4.1.min.js" type="text/javascript"></script>
|
||||
<!--<![endif]-->
|
||||
|
||||
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
|
||||
<script src="../scripts/properties.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="Common">
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
<label>
|
||||
This sample demonstrates how to insert the connectors in a PowerPoint slide.
|
||||
</label>
|
||||
<label>
|
||||
Click the button to view a presentation document generated by Essential Presentation. Please note that MS PowerPoint viewer is required to view the resultant document.
|
||||
</label>
|
||||
</div>
|
||||
<br />
|
||||
<div class="rowdiv">
|
||||
<br />
|
||||
<div class="celldiv">
|
||||
<input onClick="formSubmit()" id="connectorsspresentation" class="buttonStyle" type="submit" value="Create Presentation" style="width:200px;" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function formSubmit(){
|
||||
var attr = { action:window.baseurl + "api/Presentation/ConnectorsPresentation", method: "post" };
|
||||
var form = ej.buildTag("form", "", null, attr);
|
||||
$("body").append(form);
|
||||
form.submit();}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,51 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>Essential JS 1 : Presentation</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
||||
<link href="../content/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
|
||||
<link href="../content/default.css" rel="stylesheet" />
|
||||
<link href="../content/default-responsive.css" rel="stylesheet" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../scripts/jquery-1.11.3.min.js" type="text/javascript"></script>
|
||||
<![endif]-->
|
||||
<!--[if gte IE 9]><!-->
|
||||
<script src="../scripts/jquery-3.4.1.min.js" type="text/javascript"></script>
|
||||
<!--<![endif]-->
|
||||
|
||||
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
|
||||
<script src="../scripts/properties.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="Common">
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
<label>
|
||||
This sample demonstrates how to add different animation effect for shapes.
|
||||
</label>
|
||||
<label>
|
||||
Click the button to view a presentation document generated by Essential Presentation. Please note that MS PowerPoint viewer is required to view the resultant document.
|
||||
</label>
|
||||
</div>
|
||||
<br />
|
||||
<div class="rowdiv">
|
||||
<br />
|
||||
<div class="celldiv">
|
||||
<input onClick="formSubmit()" id="CreateAnimation" class="buttonStyle" type="submit" value="Create Presentation" style="width:200px;" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function formSubmit(){
|
||||
var attr = { action:window.baseurl + "api/Presentation/CreateAnimation", method: "post" };
|
||||
var form = ej.buildTag("form", "", null, attr);
|
||||
$("body").append(form);
|
||||
form.submit();}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,53 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>Essential JS 1 : Presentation</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
||||
<link href="../content/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
|
||||
<link href="../content/default.css" rel="stylesheet" />
|
||||
<link href="../content/default-responsive.css" rel="stylesheet" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../scripts/jquery-1.11.3.min.js" type="text/javascript"></script>
|
||||
<![endif]-->
|
||||
<!--[if gte IE 9]><!-->
|
||||
<script src="../scripts/jquery-3.4.1.min.js" type="text/javascript"></script>
|
||||
<!--<![endif]-->
|
||||
|
||||
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
|
||||
<script src="../scripts/properties.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="Common">
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
<label>
|
||||
This sample demonstrates adding and removing the nodes in a SmartArt diagram using Essential Presentation.
|
||||
</label>
|
||||
<label>
|
||||
Note: The modifications in a SmartArt diagram (like add/remove nodes, modify position and size of nodes etc., which involve SmartArt layout changes) done by Essential Presentation are not supported in Image and PDF conversion. Whereas layout changes will be reflected properly in the generated PPTX file when opened using Microsoft PowerPoint.
|
||||
</label>
|
||||
</div>
|
||||
<br />
|
||||
<div class="rowdiv">
|
||||
<br />
|
||||
<div class="celldiv">
|
||||
<input onClick="formSubmit()" id="smartartpresentation" class="buttonStyle" type="submit" value="Create Presentation" style="width: 200px;" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function formSubmit(){
|
||||
var attr = { action:window.baseurl + "api/Presentation/ManipulateSmartArt", method: "post" };
|
||||
var form = ej.buildTag("form", "", null, attr);
|
||||
$("body").append(form);
|
||||
form.submit();}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,76 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>Essential JS 1 : Presentation</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
||||
<link href="../content/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
|
||||
<link href="../content/default.css" rel="stylesheet" />
|
||||
<link href="../content/default-responsive.css" rel="stylesheet" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../scripts/jquery-1.11.3.min.js" type="text/javascript"></script>
|
||||
<![endif]-->
|
||||
<!--[if gte IE 9]><!-->
|
||||
<script src="../scripts/jquery-3.4.1.min.js" type="text/javascript"></script>
|
||||
<!--<![endif]-->
|
||||
|
||||
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
|
||||
<script src="../scripts/properties.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="Common">
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
<label>
|
||||
This sample demonstrates merging two PowerPoint documents with paste options – use destination theme and source formatting using Essential Presentation.
|
||||
</label>
|
||||
<label>
|
||||
Click the button to view a presentation document generated by Essential Presentation. Please note that Microsoft PowerPoint viewer is required to view the resultant document.
|
||||
</label>
|
||||
</div>
|
||||
<br />
|
||||
<div class="rowdiv">
|
||||
<div class="celldiv">
|
||||
<input type="radio" id="destinationtheme" name="Group1" value="DestinationTheme" checked="checked"/>
|
||||
<label for="Radio3">
|
||||
Use Destination Theme
|
||||
</label>
|
||||
<input type="radio" id="sourceformatting" name="Group1" style="margin-left: 7px" value="SourceFormatting" />
|
||||
<label for="Radio4">
|
||||
Keep Source Formatting
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="rowdiv">
|
||||
<div class="celldiv">
|
||||
<input onClick="formSubmit()" id="mergingpresentation" class="buttonStyle" type="submit" value="Generate Document" style="width:200px;" />
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function formSubmit(){
|
||||
var attr = { action:window.baseurl + "api/Presentation/MergePresentations", method: "post" };
|
||||
var form = ej.buildTag("form", "", null, attr);
|
||||
var destinationtheme = document.getElementById("destinationtheme").checked;
|
||||
var sourceformatting = document.getElementById("sourceformatting").checked;
|
||||
if (sourceformatting) {
|
||||
inputAttr = { name: "MergingType", type: "hidden", value: "SourceFormatting" };
|
||||
}
|
||||
else if(destinationtheme)
|
||||
{
|
||||
inputAttr = { name: "MergingType", type: "hidden", value: "DestinationTheme" };
|
||||
}
|
||||
input = ej.buildTag("input", "", null, inputAttr);
|
||||
form.append(input);
|
||||
$("body").append(form);
|
||||
form.submit();}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,51 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>Essential JS 1 : Presentation</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
||||
<link href="../content/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
|
||||
<link href="../content/default.css" rel="stylesheet" />
|
||||
<link href="../content/default-responsive.css" rel="stylesheet" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../scripts/jquery-1.11.3.min.js" type="text/javascript"></script>
|
||||
<![endif]-->
|
||||
<!--[if gte IE 9]><!-->
|
||||
<script src="../scripts/jquery-3.4.1.min.js" type="text/javascript"></script>
|
||||
<!--<![endif]-->
|
||||
|
||||
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
|
||||
<script src="../scripts/properties.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="Common">
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
<label>
|
||||
This sample demonstrates how to modify the animation effect for shapes.
|
||||
</label>
|
||||
<label>
|
||||
Click the button to view a presentation document generated by Essential Presentation. Please note that MS PowerPoint viewer is required to view the resultant document.
|
||||
</label>
|
||||
</div>
|
||||
<br />
|
||||
<div class="rowdiv">
|
||||
<br />
|
||||
<div class="celldiv">
|
||||
<input onClick="formSubmit()" id="ModifyAnimation" class="buttonStyle" type="submit" value="Generate Document" style="width:200px;" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function formSubmit(){
|
||||
var attr = { action:window.baseurl + "api/Presentation/ModifyAnimation", method: "post" };
|
||||
var form = ej.buildTag("form", "", null, attr);
|
||||
$("body").append(form);
|
||||
form.submit();}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,70 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>Essential JS 1 : Presentation</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
||||
<link href="../content/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
|
||||
<link href="../content/default.css" rel="stylesheet" />
|
||||
<link href="../content/default-responsive.css" rel="stylesheet" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../scripts/jquery-1.11.3.min.js" type="text/javascript"></script>
|
||||
<![endif]-->
|
||||
<!--[if gte IE 9]><!-->
|
||||
<script src="../scripts/jquery-3.4.1.min.js" type="text/javascript"></script>
|
||||
<!--<![endif]-->
|
||||
|
||||
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
|
||||
<script src="../scripts/properties.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="Common">
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
<label>
|
||||
This sample demonstrates adding the Notes pages to a Presentation slide and how to convert the Notes pages in the PowerPoint Presentation as PDF document.
|
||||
</label>
|
||||
<br />
|
||||
<label>
|
||||
Click the button below to generate document in any of the below file formats.
|
||||
</label>
|
||||
</div>
|
||||
<br />
|
||||
<div class="rowdiv">
|
||||
<br />
|
||||
<div class="celldiv">
|
||||
<label><strong>Save As :</strong></label>
|
||||
<input id="rdButtonPPTX" type="radio" name="File Type" style="margin-left: 7px" value="PPTX" checked />
|
||||
<strong>PPTX</strong>
|
||||
<input id="rdButtonPDF" type="radio" name="File Type" style="margin-left: 7px" value="PDF Document" />
|
||||
<strong>PDF</strong>
|
||||
<br />
|
||||
<br />
|
||||
<input onClick="formSubmit()" id="notespresentation" class="buttonStyle" type="submit" value="Generate Document" style="width:200px;" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function formSubmit(){
|
||||
var attr = { action:window.baseurl + "api/Presentation/CreateNotes", method: "post" };
|
||||
var form = ej.buildTag("form", "", null, attr);
|
||||
var rdButtonPPTX = document.getElementById("rdButtonPPTX").checked;
|
||||
var rdButtonPDF = document.getElementById("rdButtonPDF").checked;
|
||||
if (rdButtonPPTX) {
|
||||
inputAttr = { name: "FormatType", type: "hidden", value: "PPTX" };
|
||||
}
|
||||
else if(rdButtonPDF)
|
||||
{
|
||||
inputAttr = { name: "FormatType", type: "hidden", value: "PDF" };
|
||||
}
|
||||
input = ej.buildTag("input", "", null, inputAttr);
|
||||
form.append(input);
|
||||
$("body").append(form);
|
||||
form.submit();}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,53 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>Essential JS 1 : Presentation</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
||||
<link href="../content/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
|
||||
<link href="../content/default.css" rel="stylesheet" />
|
||||
<link href="../content/default-responsive.css" rel="stylesheet" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../scripts/jquery-1.11.3.min.js" type="text/javascript"></script>
|
||||
<![endif]-->
|
||||
<!--[if gte IE 9]><!-->
|
||||
<script src="../scripts/jquery-3.4.1.min.js" type="text/javascript"></script>
|
||||
<!--<![endif]-->
|
||||
|
||||
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
|
||||
<script src="../scripts/properties.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="Common">
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
<label>
|
||||
This sample demonstrates converting a PowerPoint presentation to PDF document.
|
||||
</label>
|
||||
<br />
|
||||
<label>
|
||||
Click the button below to view the PDF document generated by Essential Presentation. Please note that Adobe Reader or its equivalent is required to view the resultant document.
|
||||
|
||||
</label>
|
||||
</div>
|
||||
<br />
|
||||
<div class="rowdiv">
|
||||
<br />
|
||||
<div class="celldiv">
|
||||
<input onClick="formSubmit()" id="pptxtopdfpresentation" class="buttonStyle" type="submit" value="Create PDF" style="width:200px;" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function formSubmit(){
|
||||
var attr = { action:window.baseurl + "api/Presentation/ConvertToPDF", method: "post" };
|
||||
var form = ej.buildTag("form", "", null, attr);
|
||||
$("body").append(form);
|
||||
form.submit();}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,51 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>Essential JS 1 : Presentation</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
||||
<link href="../content/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
|
||||
<link href="../content/default.css" rel="stylesheet" />
|
||||
<link href="../content/default-responsive.css" rel="stylesheet" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../scripts/jquery-1.11.3.min.js" type="text/javascript"></script>
|
||||
<![endif]-->
|
||||
<!--[if gte IE 9]><!-->
|
||||
<script src="../scripts/jquery-3.4.1.min.js" type="text/javascript"></script>
|
||||
<!--<![endif]-->
|
||||
|
||||
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
|
||||
<script src="../scripts/properties.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="Common">
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
<label>
|
||||
This sample demonstrates how to create slide transition effects in PowerPoint presentation.
|
||||
</label>
|
||||
<label>
|
||||
Click the button to view a presentation document generated by Essential Presentation. Please note that MS PowerPoint viewer is required to view the resultant document.
|
||||
</label>
|
||||
</div>
|
||||
<br />
|
||||
<div class="rowdiv">
|
||||
<br />
|
||||
<div class="celldiv">
|
||||
<input onClick="formSubmit()" id="SlideTransition" class="buttonStyle" type="submit" value="Create Presentation" style="width:200px;" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function formSubmit(){
|
||||
var attr = { action:window.baseurl + "api/Presentation/SlideTransition", method: "post" };
|
||||
var form = ej.buildTag("form", "", null, attr);
|
||||
$("body").append(form);
|
||||
form.submit();}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,51 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>Essential JS 1 : Presentation</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
||||
<link href="../content/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
|
||||
<link href="../content/default.css" rel="stylesheet" />
|
||||
<link href="../content/default-responsive.css" rel="stylesheet" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../scripts/jquery-1.11.3.min.js" type="text/javascript"></script>
|
||||
<![endif]-->
|
||||
<!--[if gte IE 9]><!-->
|
||||
<script src="../scripts/jquery-3.4.1.min.js" type="text/javascript"></script>
|
||||
<!--<![endif]-->
|
||||
|
||||
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
|
||||
<script src="../scripts/properties.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="Common">
|
||||
<div class="tablediv">
|
||||
<div class="rowdiv">
|
||||
<label>
|
||||
This sample demonstrates adding slides to a PowerPoint presentation and adding contents to the PowerPoint slide.
|
||||
</label>
|
||||
<label>
|
||||
Click the button to view a presentation document generated by Essential Presentation. Please note that MS PowerPoint viewer is required to view the resultant document.
|
||||
</label>
|
||||
</div>
|
||||
<br />
|
||||
<div class="rowdiv">
|
||||
<br />
|
||||
<div class="celldiv">
|
||||
<input onClick="formSubmit()" id="slidespresentation" class="buttonStyle" type="submit" value="Create Presentation" style="width:200px;" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function formSubmit(){
|
||||
var attr = { action:window.baseurl + "api/Presentation/CreatePresentation", method: "post" };
|
||||
var form = ej.buildTag("form", "", null, attr);
|
||||
$("body").append(form);
|
||||
form.submit();}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,170 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Essential JS 1 : Presentation Viewer</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
||||
<link href="../../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
|
||||
<script src="../../scripts/jquery-3.4.1.min.js" type="text/javascript"></script>
|
||||
<script src="../../scripts/ej.web.all.min.js" type="text/javascript"></script>
|
||||
<script src="../../scripts/properties.js" type="text/javascript"></script>
|
||||
<style>
|
||||
.thumnail:hover {
|
||||
box-shadow: 0 2px 2px 0 rgba(0,0,0,0.16), 0 0 0 1px rgba(0,0,0,0.08);
|
||||
}
|
||||
|
||||
.thumnail {
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: gray;
|
||||
margin: 5px 5px 1px 5px;
|
||||
}
|
||||
|
||||
.thumnail-active {
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
border-color: gray;
|
||||
margin: 5px 5px 1px 5px;
|
||||
border-color: #fc5200;
|
||||
}
|
||||
|
||||
#waiting_popup_WaitingPopup .e-image {
|
||||
display: block;
|
||||
height: 70px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="presentation" style="margin: 6px; border-style: solid; border-color: black; border-width: 1px">
|
||||
<div style="width:auto;height:auto;margin:10px;border-style:solid;border-color:black; border-width: 1px">
|
||||
<div id="thumnail_collection" style="position:relative;overflow-x:auto;white-space:nowrap;border-width: 1px"></div>
|
||||
</div>
|
||||
<div id="presentation_container" style="margin:20px;border-style:solid;border-color:black;overflow:auto; border-width: 1px">
|
||||
<img id="presentation_viewer" />
|
||||
</div>
|
||||
<div id="waiting_popup"></div>
|
||||
</div>
|
||||
<script>
|
||||
var slideCollections;
|
||||
Initload();
|
||||
function Initload() {
|
||||
var div = document.createElement("div");
|
||||
div.setAttribute("style", "width:150px;height:100px;margin-bottom:4px");
|
||||
div.setAttribute("class", "thumnail");
|
||||
document.getElementById("thumnail_collection").appendChild(div);
|
||||
var container = document.getElementById("presentation_container");
|
||||
container.style.width = "auto";
|
||||
container.style.height = "720px";
|
||||
initPopUp();
|
||||
|
||||
showWaitingPopUp(true);
|
||||
var formData = null;
|
||||
formData = new FormData();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
async: true,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
crossDomain: true,
|
||||
url: window.baseurl + "api/PresentationViewer/Import",
|
||||
dataType: "JSON",
|
||||
success: function (data) {
|
||||
imageCollection(data)
|
||||
},
|
||||
});
|
||||
}
|
||||
function load(event) {
|
||||
showWaitingPopUp(true);
|
||||
var path = event.target.files[0];
|
||||
var formData = null;
|
||||
formData = new FormData();
|
||||
formData.append("files", path);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
async: true,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
crossDomain: true,
|
||||
data: formData,
|
||||
url: window.baseurl + "api/PresentationViewer/Import",
|
||||
dataType: "JSON",
|
||||
success: function (data) {
|
||||
imageCollection(data)
|
||||
},
|
||||
});
|
||||
}
|
||||
function imageCollection(data) {
|
||||
showWaitingPopUp(false);
|
||||
if (data.length == 0) {
|
||||
Initload();
|
||||
}
|
||||
else {
|
||||
var container = document.getElementById("presentation_container");
|
||||
container.style.width = "auto";
|
||||
container.style.height = "auto";
|
||||
clearCollection();
|
||||
slideCollections = data;
|
||||
createImageThumnail();
|
||||
renderImage(data[0])
|
||||
updateClass(0);
|
||||
}
|
||||
}
|
||||
function createImageThumnail() {
|
||||
var container = document.getElementById("thumnail_collection");
|
||||
for (var i = 0; i < slideCollections.length; i++) {
|
||||
var image = document.createElement("img");
|
||||
image.src = slideCollections[i];
|
||||
image.width = 150;
|
||||
image.height = 100;
|
||||
image.setAttribute("class", "thumnail");
|
||||
image.setAttribute("style", "")
|
||||
image.setAttribute("onclick", "changeImage(this)")
|
||||
image.addEventListener("onclick", function () {
|
||||
console.log(this);
|
||||
})
|
||||
container.appendChild(image);
|
||||
}
|
||||
}
|
||||
function renderImage(base64String) {
|
||||
var images = document.getElementById("presentation_viewer");
|
||||
images.src = base64String;
|
||||
}
|
||||
function changeImage(image) {
|
||||
renderImage(image.src);
|
||||
var currentIndex = $(image).index();
|
||||
updateClass(currentIndex);
|
||||
}
|
||||
function updateClass(index) {
|
||||
let collection = document.getElementById("thumnail_collection")
|
||||
for (var i = 0; i < collection.childNodes.length; i++) {
|
||||
collection.childNodes[i].className = "thumnail";
|
||||
}
|
||||
collection.childNodes[index].className = "thumnail-active";
|
||||
|
||||
}
|
||||
function clearCollection() {
|
||||
var collection = document.getElementById("thumnail_collection");
|
||||
for (var i = 0; i < collection.childNodes.length; i++) {
|
||||
collection.removeChild(collection.childNodes[i]);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
function initPopUp() {
|
||||
var loading = document.getElementById("waiting_popup");
|
||||
$(loading).ejWaitingPopup({ showOnInit: false, target: "#presentation" });
|
||||
}
|
||||
function showWaitingPopUp(isShow) {
|
||||
if (isShow) {
|
||||
$("#waiting_popup").ejWaitingPopup();
|
||||
var popUpObj = $("#waiting_popup").data("ejWaitingPopup");
|
||||
popUpObj.show();
|
||||
}
|
||||
else {
|
||||
$("#waiting_popup").ejWaitingPopup();
|
||||
var popUpObj = $("#waiting_popup").data("ejWaitingPopup");
|
||||
popUpObj.hide();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -91,4 +91,4 @@ The easiest way to use these samples without using Git is to download the zip fi
|
|||
|
||||
* To renew the subscription, click [here](https://www.syncfusion.com/sales/products?utm_source=github&utm_medium=listing) or contact our sales team at <salessupport@syncfusion.com>.
|
||||
|
||||
<p>Copyright © 2001-2022 Syncfusion, Inc. Updated on 2022-02-01 at precisely 15:02:22 EST.</p>
|
||||
<p>Copyright © 2001-2022 Syncfusion, Inc. Updated on 2022-04-04 at precisely 16:46:46 EST.</p>
|
||||
|
|
|
@ -1,177 +0,0 @@
|
|||
<%@ WebHandler Language="C#" Class="StartDevServer" %>
|
||||
|
||||
using System;
|
||||
using System.Web;
|
||||
using System.IO;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Diagnostics;
|
||||
using Microsoft.Win32;
|
||||
using System.Globalization;
|
||||
using System.Collections;
|
||||
using System.Threading;
|
||||
|
||||
public class StartDevServer : IHttpHandler
|
||||
{
|
||||
public void ProcessRequest(HttpContext context)
|
||||
{
|
||||
DirectoryInfo webFolder, installedFolder;
|
||||
string productPath, versionFolder = "", jsFolder = "";
|
||||
try
|
||||
{
|
||||
|
||||
webFolder = new DirectoryInfo(context.Request.PhysicalApplicationPath).Parent;
|
||||
while (webFolder.Name.ToLower() != "javascript")
|
||||
{
|
||||
if (webFolder.Parent.Name.ToLower() == "javascript")
|
||||
{
|
||||
versionFolder = webFolder.Name;
|
||||
jsFolder = webFolder.Parent.Name;
|
||||
}
|
||||
webFolder = webFolder.Parent;
|
||||
}
|
||||
installedFolder = webFolder.Parent;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception(string.Format("Exception while tracking 'Web' folder -{0}", ex.Message));
|
||||
}
|
||||
|
||||
if (context.Request.QueryString["product"] == null && context.Request.QueryString["product"] == null)
|
||||
throw new Exception("Requirred Query string [product] to handle the request.");
|
||||
|
||||
if (context.Request.QueryString["path"] == null && context.Request.QueryString["path"] == null)
|
||||
productPath = @"JavaScript\\ionic1 app\\desktop\\www";
|
||||
else
|
||||
{
|
||||
productPath = jsFolder + "\\" + versionFolder + "\\" + context.Request.QueryString["path"];
|
||||
}
|
||||
string path = Path.Combine(installedFolder.FullName, productPath);
|
||||
string productname = context.Request.QueryString["product"].ToString().ToLower();
|
||||
if (!Directory.Exists(path))
|
||||
{
|
||||
context.Response.Write(string.Format("//js.syncfusion.com/demos/", productname));
|
||||
}
|
||||
else
|
||||
{
|
||||
DirectoryInfo productFolder = new DirectoryInfo(path);
|
||||
|
||||
string port = null;
|
||||
string physicalPath = string.Format("{0}", productFolder.FullName);
|
||||
string prefixURL = string.Empty;//.Format("mvcsamplebrowser/{0}", productFolder.Name);
|
||||
|
||||
try
|
||||
{
|
||||
CassiniWebServer.StartVersionWebServer(physicalPath, prefixURL, out port);
|
||||
|
||||
context.Response.Write(string.Format("//localhost:{0}", port));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception(string.Format("Error: Unable to start Webserver.web.exe, Message:{0}", ex.Message));
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool IsReusable
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
public class CassiniWebServer
|
||||
{
|
||||
const string iisExpressExename = "iisexpress.exe";
|
||||
const string webServer40ExeName = "WebDev.WebServer40.EXE";
|
||||
const string webServerExeName = "WebDev.WebServer.EXE";
|
||||
const string Netfx20PathRegKeyName = "Software\\Microsoft\\.NETFramework";
|
||||
const string Netfx20PathRegValueName = "InstallRoot";
|
||||
const string SharedFolderPathRegKeyName = "Software\\Microsoft\\Shared Tools";
|
||||
const string SharedFolderPathRegValueName = "SharedFilesDir";
|
||||
|
||||
#region Public Methods
|
||||
public static void StartVersionWebServer(string path, string vDirName, out string port)
|
||||
{
|
||||
string iisExpressPath = string.Format("{0}\\{1}", GetIISExpressPath(), iisExpressExename);
|
||||
if (File.Exists(iisExpressPath))
|
||||
{
|
||||
StartWebServer(iisExpressPath, path, vDirName, out port, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
string WebserverPath = string.Format("{0}\\{1}", GetWebServerDir(), webServer40ExeName);
|
||||
if (File.Exists(WebserverPath))
|
||||
{
|
||||
StartWebServer(WebserverPath, path, vDirName, out port, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new NullReferenceException("Unable to locate WebDev.WebServer.EXE");
|
||||
}
|
||||
}
|
||||
}
|
||||
private static string GetIISExpressPath()
|
||||
{
|
||||
string programFilesFolder = Environment.GetEnvironmentVariable("PROGRAMFILES");
|
||||
return programFilesFolder + @"\IIS Express";
|
||||
}
|
||||
private static string GetWebServerDir()
|
||||
{
|
||||
string webServerDir = string.Empty;
|
||||
string programFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
|
||||
webServerDir = programFiles + @"\Common Files\Microsoft Shared\DevServer\11.0";
|
||||
|
||||
if (!Directory.Exists(webServerDir))
|
||||
{
|
||||
webServerDir = programFiles + @"\Microsoft Shared\DevServer\11.0";
|
||||
|
||||
if (!Directory.Exists(webServerDir))
|
||||
{
|
||||
webServerDir = programFiles + @"\Common Files\Microsoft Shared\DevServer\10.0";
|
||||
|
||||
if (!Directory.Exists(webServerDir))
|
||||
{
|
||||
webServerDir = programFiles + @"\Microsoft Shared\DevServer\10.0";
|
||||
|
||||
if (!Directory.Exists(webServerDir)) webServerDir = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return webServerDir;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Private methods
|
||||
private static void StartWebServer(string WebserverPath, string samplepath, string vDirName, out string port, bool isIISExpress)
|
||||
{
|
||||
string commandArgs = string.Empty;
|
||||
|
||||
Random r = new Random();
|
||||
port = r.Next(10000, 65534).ToString();
|
||||
|
||||
//grab the original path
|
||||
commandArgs += " /path:\"" + samplepath + "\"";
|
||||
commandArgs += " /port:";
|
||||
commandArgs += port;
|
||||
if (!isIISExpress) commandArgs += " /vpath:/" + vDirName;
|
||||
|
||||
Process mDOSProcess = new Process();
|
||||
mDOSProcess.StartInfo.FileName = WebserverPath;
|
||||
mDOSProcess.StartInfo.Arguments = commandArgs;
|
||||
|
||||
//if you dont want to see the dos black screen
|
||||
mDOSProcess.StartInfo.CreateNoWindow = true;
|
||||
mDOSProcess.StartInfo.UseShellExecute = false;
|
||||
|
||||
//now start the process
|
||||
mDOSProcess.Start();
|
||||
}
|
||||
#endregion
|
||||
}
|
16
Web.config
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<system.web>
|
||||
<compilation debug="true"/>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<validation validateIntegratedModeConfiguration="false" />
|
||||
<modules runAllManagedModulesForAllRequests="true" />
|
||||
<httpRedirect enabled="false" />
|
||||
<staticContent>
|
||||
<remove fileExtension=".woff" />
|
||||
<!-- In case IIS already has this mime type -->
|
||||
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
|
||||
</staticContent>
|
||||
</system.webServer>
|
||||
</configuration>
|
|
@ -1,31 +0,0 @@
|
|||
.notifications {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
/* Positioning */
|
||||
.notifications.top-right {
|
||||
right: 10px;
|
||||
top: 25px;
|
||||
}
|
||||
|
||||
.notifications.top-left {
|
||||
left: 10px;
|
||||
top: 25px;
|
||||
}
|
||||
|
||||
.notifications.bottom-left {
|
||||
left: 10px;
|
||||
bottom: 25px;
|
||||
}
|
||||
|
||||
.notifications.bottom-right {
|
||||
right: 10px;
|
||||
bottom: 25px;
|
||||
}
|
||||
|
||||
/* Notification Element */
|
||||
.notifications > div {
|
||||
position: relative;
|
||||
z-index: 9999;
|
||||
margin: 5px 0px;
|
||||
}
|
|
@ -1,95 +0,0 @@
|
|||
@media (min-width: 1920px) {
|
||||
.row .cols-sample-area {
|
||||
width: 72.956%;
|
||||
*width: 72.956%;
|
||||
}
|
||||
|
||||
.row .cols-prop-area {
|
||||
height: 100%;
|
||||
width: 24.9146%;
|
||||
}
|
||||
|
||||
.row [class*="col-md-3"] {
|
||||
width: 46.933667%;
|
||||
margin-left: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) and (max-width: 1920px) {
|
||||
|
||||
.row .cols-sample-area {
|
||||
width: 72.956%;
|
||||
*width: 72.956%;
|
||||
}
|
||||
|
||||
.row .cols-prop-area {
|
||||
height: 100%;
|
||||
min-height: 351px;
|
||||
width: 24.9146%;
|
||||
}
|
||||
|
||||
.cols-prop-area [class^="col-md-"] {
|
||||
width: 46.933667%;
|
||||
margin-left: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 480px) and (max-width: 1023px) {
|
||||
.row .cols-sample-area, .row .cols-prop-area {
|
||||
margin-left: 0px;
|
||||
width: 100%;
|
||||
*width: 100%;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.cols-prop-area [class*="col-md-3"] {
|
||||
width: 46.933667%;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.prop-grid.keyboard [class^="col-md-"] {
|
||||
height: 30px;
|
||||
min-height: 30px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 480px) {
|
||||
.e-popup-table{
|
||||
display: inline-table;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.e-ej2popup {
|
||||
height: 100px;
|
||||
background-image: url('../content/images/mobile-bg.png');
|
||||
}
|
||||
.e-popup-first, .e-popup-second {
|
||||
text-align: center;
|
||||
}
|
||||
.e-popup-second {
|
||||
padding-top: 3px;
|
||||
}
|
||||
.e-popup-content {
|
||||
padding: 8px 0px 0px 0px;
|
||||
}
|
||||
.e-popup-more {
|
||||
padding: 5px 0px 0px 0px;
|
||||
float: none;
|
||||
}
|
||||
.e-popup-left, .e-popup-table {
|
||||
width:100%;
|
||||
}
|
||||
button#learnmore {
|
||||
display: table;
|
||||
margin: 0 auto;
|
||||
}
|
||||
td.e-popup-td, td.e-content-td1, td.e-content-td2 {
|
||||
display: block;
|
||||
}
|
||||
.e-content-table {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
.e-popup-close {
|
||||
top: 4px;
|
||||
}
|
||||
}
|
5339
content/default.css
|
@ -1,4 +0,0 @@
|
|||
|
||||
|
||||
<%@ ServiceHost Language="C#" Factory="System.ServiceModel.Activation.WebServiceHostFactory, System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Service="EJServices.Wcf.Northwind" %>
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <copyright file="WebDataService.svc.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using EJServices.Helpers;
|
||||
using EJServices.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Services;
|
||||
using System.Data.Services.Common;
|
||||
using System.Linq;
|
||||
using System.ServiceModel.Web;
|
||||
using System.Web;
|
||||
|
||||
namespace EJServices.Wcf
|
||||
{
|
||||
[JsonpSupportBehavior]
|
||||
public class Northwind : DataService<NorthwindDataContext>
|
||||
{
|
||||
// This method is called only once to initialize service-wide policies.
|
||||
public static void InitializeService(DataServiceConfiguration config)
|
||||
{
|
||||
// TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
|
||||
// Examples:
|
||||
// config.SetEntitySetAccessRule("MyEntityset", EntitySetRights.AllRead);
|
||||
// config.SetServiceOperationAccessRule("MyServiceOperation", ServiceOperationRights.All);
|
||||
config.SetEntitySetAccessRule("*", EntitySetRights.All);
|
||||
config.SetServiceOperationAccessRule("*", ServiceOperationRights.All);
|
||||
config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
|
||||
config.UseVerboseErrors = true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2022.
|
||||
// Copyright Syncfusion Inc. 2001-2022. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ServiceModel;
|
||||
using System.Text;
|
||||
|
||||
namespace EJServices.Wcf.Pivotchart
|
||||
{
|
||||
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IOlapChart" in both code and config file together.
|
||||
[ServiceContract]
|
||||
public interface IOlap
|
||||
{
|
||||
[OperationContract]
|
||||
Dictionary<string, object> Initialize(string action, string customObject);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> Drill(string action, string drilledSeries, string olapReport, string customObject);
|
||||
[OperationContract]
|
||||
void Export(System.IO.Stream stream);
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2022.
|
||||
// Copyright Syncfusion Inc. 2001-2022. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ServiceModel;
|
||||
using System.Text;
|
||||
|
||||
namespace EJServices.Wcf.Pivotchart
|
||||
{
|
||||
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IRelationalChart" in both code and config file together.
|
||||
[ServiceContract]
|
||||
public interface IRelational
|
||||
{
|
||||
[OperationContract]
|
||||
Dictionary<string, object> Initialize(string action, string currentReport, string customObject);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> Drill(string action, string drilledSeries);
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
<%@ ServiceHost Language="C#" Debug="true" Service="EJServices.Wcf.Pivotchart.Olap" CodeBehind="Olap.svc.cs" %>
|
|
@ -1,108 +0,0 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2022.
|
||||
// Copyright Syncfusion Inc. 2001-2022. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using Syncfusion.JavaScript;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ServiceModel;
|
||||
using System.ServiceModel.Activation;
|
||||
using System.Text;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.IO;
|
||||
using Syncfusion.Olap.Manager;
|
||||
using Syncfusion.Olap.Reports;
|
||||
|
||||
namespace EJServices.Wcf.Pivotchart
|
||||
{
|
||||
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "OlapChart" in code, svc and config file together.
|
||||
// NOTE: In order to launch WCF Test Client for testing this service, please select OlapChart.svc or OlapChart.svc.cs at the Solution Explorer and start debugging.
|
||||
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
|
||||
public class Olap : IOlap
|
||||
{
|
||||
JavaScriptSerializer serializer = new JavaScriptSerializer();
|
||||
PivotChart htmlHelper = new PivotChart();
|
||||
int cultureIDInfovalval = 1033;
|
||||
string connectionString = ConfigurationManager.ConnectionStrings["Adventure Works"].ConnectionString + "locale identifier=1033;";
|
||||
|
||||
public Dictionary<string, object> Initialize(string action, string customObject)
|
||||
{
|
||||
OlapDataManager DataManager = null;
|
||||
dynamic customData = serializer.Deserialize<dynamic>(customObject.ToString());
|
||||
var cultureIDInfo = new System.Globalization.CultureInfo(("en-US")).LCID;
|
||||
if (customData is Dictionary<string, object> && customData.ContainsKey("Language"))
|
||||
{
|
||||
cultureIDInfo = new System.Globalization.CultureInfo((customData["Language"])).LCID;
|
||||
}
|
||||
connectionString = connectionString.Replace("" + cultureIDInfovalval + "", "" + cultureIDInfo + "");
|
||||
cultureIDInfovalval = cultureIDInfo;
|
||||
DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.Culture = new System.Globalization.CultureInfo((cultureIDInfo));
|
||||
DataManager.SetCurrentReport(CreateOlapReport());
|
||||
return htmlHelper.GetJsonData(action, DataManager);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> Drill(string action, string drilledSeries, string olapReport, string customObject)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
dynamic customData = serializer.Deserialize<dynamic>(customObject.ToString());
|
||||
if (customData is Dictionary<string, object> && customData.ContainsKey("Language"))
|
||||
{
|
||||
var cultureIDInfo = new System.Globalization.CultureInfo((customData["Language"])).LCID;
|
||||
connectionString = connectionString.Replace("" + cultureIDInfovalval + "", "" + cultureIDInfo + "");
|
||||
cultureIDInfovalval = cultureIDInfo;
|
||||
DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.Culture = new System.Globalization.CultureInfo((customData["Language"]));
|
||||
}
|
||||
else
|
||||
DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.SetCurrentReport(Syncfusion.JavaScript.Olap.Utils.DeserializeOlapReport(olapReport));
|
||||
return htmlHelper.GetJsonData(action, DataManager, drilledSeries);
|
||||
}
|
||||
|
||||
public void Export(Stream stream)
|
||||
{
|
||||
System.IO.StreamReader sReader = new System.IO.StreamReader(stream);
|
||||
string args = System.Web.HttpContext.Current.Server.UrlDecode(sReader.ReadToEnd()).Remove(0, 5);
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
string fileName = "Sample";
|
||||
htmlHelper.ExportPivotChart(args, fileName, System.Web.HttpContext.Current.Response);
|
||||
}
|
||||
|
||||
|
||||
private OlapReport CreateOlapReport()
|
||||
{
|
||||
OlapReport olapReport = new OlapReport();
|
||||
olapReport.Name = "Default Report";
|
||||
olapReport.CurrentCubeName = "Adventure Works";
|
||||
|
||||
DimensionElement dimensionElementColumn = new DimensionElement();
|
||||
//Specifying the Name for the Dimension Element
|
||||
dimensionElementColumn.Name = "Customer";
|
||||
dimensionElementColumn.AddLevel("Customer Geography", "Country");
|
||||
|
||||
MeasureElements measureElementColumn = new MeasureElements();
|
||||
//Specifying the Name for the Measure Element
|
||||
measureElementColumn.Elements.Add(new MeasureElement { Name = "Customer Count" });
|
||||
|
||||
DimensionElement dimensionElementRow = new DimensionElement();
|
||||
//Specifying the Dimension Name
|
||||
dimensionElementRow.Name = "Date";
|
||||
dimensionElementRow.AddLevel("Fiscal", "Fiscal Year");
|
||||
|
||||
///Adding Row Members
|
||||
olapReport.SeriesElements.Add(dimensionElementRow);
|
||||
///Adding Column Members
|
||||
olapReport.CategoricalElements.Add(dimensionElementColumn);
|
||||
///Adding Measure Element
|
||||
olapReport.CategoricalElements.Add(measureElementColumn);
|
||||
return olapReport;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
<%@ ServiceHost Language="C#" Debug="true" Service="EJServices.Wcf.Pivotchart.Relational" CodeBehind="Relational.svc.cs" %>
|
|
@ -1,52 +0,0 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2022.
|
||||
// Copyright Syncfusion Inc. 2001-2022. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using EJServices.Models;
|
||||
using Syncfusion.JavaScript;
|
||||
using Syncfusion.PivotAnalysis.Base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ServiceModel;
|
||||
using System.ServiceModel.Activation;
|
||||
using System.Text;
|
||||
using System.Web.Script.Serialization;
|
||||
|
||||
namespace EJServices.Wcf.Pivotchart
|
||||
{
|
||||
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "RelationalChart" in code, svc and config file together.
|
||||
// NOTE: In order to launch WCF Test Client for testing this service, please select RelationalChart.svc or RelationalChart.svc.cs at the Solution Explorer and start debugging.
|
||||
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
|
||||
public class Relational : IRelational
|
||||
{
|
||||
PivotChart PivotChart = new PivotChart();
|
||||
JavaScriptSerializer serializer = new JavaScriptSerializer();
|
||||
|
||||
public Dictionary<string, object> Initialize(string action, string currentReport, string customObject)
|
||||
{
|
||||
BindData();
|
||||
return PivotChart.GetJsonData(action, ProductSales.GetSalesData());
|
||||
}
|
||||
|
||||
public Dictionary<string, object> Drill(string action, string drilledSeries)
|
||||
{
|
||||
BindData();
|
||||
return PivotChart.GetJsonData(action, ProductSales.GetSalesData(), drilledSeries);
|
||||
}
|
||||
|
||||
|
||||
private void BindData()
|
||||
{
|
||||
this.PivotChart.PivotEngine.PivotRows.Add(new PivotItem { FieldMappingName = "Country", FieldHeader = "Country", TotalHeader = "Total", ShowSubTotal = false });
|
||||
this.PivotChart.PivotEngine.PivotRows.Add(new PivotItem { FieldMappingName = "State", FieldHeader = "State", TotalHeader = "Total" });
|
||||
this.PivotChart.PivotEngine.PivotRows.Add(new PivotItem { FieldMappingName = "Date", FieldHeader = "Date", TotalHeader = "Total" });
|
||||
this.PivotChart.PivotEngine.PivotColumns.Add(new PivotItem { FieldMappingName = "Product", FieldHeader = "Product", TotalHeader = "Total", ShowSubTotal = false });
|
||||
this.PivotChart.PivotEngine.PivotCalculations.Add(new PivotComputationInfo { CalculationName = "Amount", Description = "Amount", FieldHeader = "Amount", FieldName = "Amount", Format = "C", SummaryType = Syncfusion.PivotAnalysis.Base.SummaryType.DoubleTotalSum });
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,72 +0,0 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2022.
|
||||
// Copyright Syncfusion Inc. 2001-2022. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ServiceModel;
|
||||
using System.Text;
|
||||
|
||||
namespace EJServices.Wcf.Pivotclient
|
||||
{
|
||||
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IOlapClient" in both code and config file together.
|
||||
[ServiceContract]
|
||||
public interface IOlap
|
||||
{
|
||||
[OperationContract]
|
||||
Dictionary<string, object> Initialize(string action, string customObject, string clientParams);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> FetchMemberTreeNodes(string action, string dimensionName, string olapReport);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> InitializeChart(string action, string currentReport, string customObject);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> InitializeTreeMap(string action, string currentReport, string customObject);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> DrillChart(string action, string drilledSeries, string olapReport, string clientReports);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> DrillTreeMap(string action, string drillInfo, string olapReport, string clientReports);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> InitializeGrid(string action, string currentReport, string gridLayout, string customObject);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> DrillGrid(string action, string cellPosition, string currentReport, string clientReports, string headerInfo, string layout);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> FilterElement(string action, string clientParams, string olapReport, string clientReports);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> RemoveSplitButton(string action, string clientParams, string olapReport, string clientReports);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> DropNode(string action, string dropType, string nodeInfo, string olapReport, string clientReports);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> CubeChange(string action, string cubeName, string olapReport, string clientReports, string clientParams);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> MeasureGroup(string action, string measureGroupName, string olapReport, string clientReports);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> CalculatedMember(string action, string olapReport, string clientReports, string caption, string expression, string memberType, string dimension, string formatString,string uniqueName);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> ToolbarOperations(string action, string toolbarOperation, string clientInfo, string olapReport, string clientReports);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> UpdateReport(string action, string clientParams, string olapReport, string clientReports);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> SaveReportToDB(string reportName, string operationalMode, string analysisMode, string olapReport, string clientReports);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> RemoveReportFromDB(string reportName, string operationalMode, string analysisMode);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> RenameReportInDB(string selectedReport, string renameReport, string operationalMode, string analysisMode);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> LoadReportFromDB(string reportName, string operationalMode, string analysisMode, string olapReport, string clientReports);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> FetchReportListFromDB(string action, string operationalMode, string analysisMode);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> ExpandMember(string action, bool checkedStatus, string parentNode, string tag, string dimensionName, string cubeName, string olapReport, string clientReports);
|
||||
[OperationContract]
|
||||
void Export(System.IO.Stream stream);
|
||||
[OperationContract]
|
||||
string GetMDXQuery(string olapReport);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> ToggleAxis(string action, string currentReport, string clientReports);
|
||||
}
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2022.
|
||||
// Copyright Syncfusion Inc. 2001-2022. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ServiceModel;
|
||||
using System.Text;
|
||||
|
||||
namespace EJServices.Wcf.Pivotclient
|
||||
{
|
||||
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IRelationalClient" in both code and config file together.
|
||||
[ServiceContract]
|
||||
public interface IRelational
|
||||
{
|
||||
[OperationContract]
|
||||
Dictionary<string, object> Initialize(string action, string clientParams);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> FetchMembers(string action, string currentReport, string customObject, string headerTag);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> ChangeSummaryType(string action, string currentReport, string summaryType);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> DrillChart(string action, string drilledSeries, string currentReport);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> Filtering(string action, string filterParams, string currentReport, string customObject);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> ValueSorting(string action, string valueSorting, string currentReport, string customObject);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> DropNode(string action, string args);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> ToolbarOperations(string action, string args);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> SaveReportToDB(string reportName, string operationalMode, string analysisMode, string olapReport, string clientReports);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> RemoveReportFromDB(string reportName, string operationalMode, string analysisMode);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> RenameReportInDB(string selectedReport, string renameReport, string operationalMode, string analysisMode);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> LoadReportFromDB(string reportName, string operationalMode, string analysisMode, string olapReport, string clientReports);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> FetchReportListFromDB(string action, string operationalMode, string analysisMode);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> Sorting(string action, string currentReport, string sortedHeaders);
|
||||
[OperationContract]
|
||||
void Export(System.IO.Stream stream);
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
<%@ ServiceHost Language="C#" Debug="true" Service="EJServices.Wcf.Pivotclient.Olap" CodeBehind="Olap.svc.cs" %>
|
|
@ -1,381 +0,0 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2022.
|
||||
// Copyright Syncfusion Inc. 2001-2022. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using EJServices.Models;
|
||||
using Syncfusion.JavaScript;
|
||||
using Syncfusion.Olap.Manager;
|
||||
using Syncfusion.Olap.Reports;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Data.SqlServerCe;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ServiceModel;
|
||||
using System.ServiceModel.Activation;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using OLAPUTILS = Syncfusion.JavaScript.Olap;
|
||||
|
||||
namespace EJServices.Wcf.Pivotclient
|
||||
{
|
||||
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "OlapClient" in code, svc and config file together.
|
||||
// NOTE: In order to launch WCF Test Client for testing this service, please select OlapClient.svc or OlapClient.svc.cs at the Solution Explorer and start debugging.
|
||||
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
|
||||
public class Olap : IOlap
|
||||
{
|
||||
PivotClient olapClientHelper = new PivotClient();
|
||||
PivotTreeMap treemapHelper = new PivotTreeMap();
|
||||
PivotChart chartHelper = new PivotChart();
|
||||
JavaScriptSerializer serializer = new JavaScriptSerializer();
|
||||
static int cultureIDInfoval = 1033;
|
||||
static string connectionString = ConfigurationManager.ConnectionStrings["Adventure Works"].ConnectionString + "locale identifier=" + cultureIDInfoval + ";";
|
||||
string conStringforDB = "DataSource=" + HttpContext.Current.Server.MapPath("~/App_Data/ReportsTable.sdf") + "; Persist Security Info=False", reportTableName = "ReportsTable";
|
||||
public Dictionary<string, object> CubeChange(string action, string cubeName, string olapReport, string clientReports, string clientParams)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
if (olapReport != "")
|
||||
DataManager.SetCurrentReport(OLAPUTILS.Utils.DeserializeOlapReport(olapReport));
|
||||
if (clientReports != "")
|
||||
DataManager.Reports = olapClientHelper.DeserializedReports(clientReports);
|
||||
return olapClientHelper.GetJsonData(action, DataManager, cubeName, clientParams);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> DrillChart(string action, string drilledSeries, string olapReport, string clientReports)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.SetCurrentReport(OLAPUTILS.Utils.DeserializeOlapReport(olapReport));
|
||||
DataManager.Reports = olapClientHelper.DeserializedReports(clientReports);
|
||||
return chartHelper.GetJsonData(action, DataManager, drilledSeries);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> DrillGrid(string action, string cellPosition, string currentReport, string clientReports, string headerInfo, string layout)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
if (DataManager.ConnectionString.ToLower().Replace(" ", String.Empty).Split(';', '=').Contains("localeidentifier"))
|
||||
{
|
||||
DataManager.Culture = new System.Globalization.CultureInfo(cultureIDInfoval);
|
||||
DataManager.OverrideDefaultFormatStrings = true;
|
||||
}
|
||||
DataManager.SetCurrentReport(OLAPUTILS.Utils.DeserializeOlapReport(currentReport));
|
||||
DataManager.Reports = olapClientHelper.DeserializedReports(clientReports);
|
||||
return olapClientHelper.GetJsonData(action, DataManager, cellPosition, headerInfo, layout);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> DrillTreeMap(string action, string drillInfo, string olapReport, string clientReports)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.SetCurrentReport(OLAPUTILS.Utils.DeserializeOlapReport(olapReport));
|
||||
DataManager.Reports = olapClientHelper.DeserializedReports(clientReports);
|
||||
return treemapHelper.GetJsonData(action, DataManager, drillInfo);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> DropNode(string action, string dropType, string nodeInfo, string olapReport, string clientReports)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.SetCurrentReport(OLAPUTILS.Utils.DeserializeOlapReport(olapReport));
|
||||
DataManager.Reports = olapClientHelper.DeserializedReports(clientReports);
|
||||
return olapClientHelper.GetJsonData(action, DataManager, dropType, nodeInfo);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> ExpandMember(string action, bool checkedStatus, string parentNode, string tag, string dimensionName, string cubeName, string olapReport, string clientReports)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
if (!string.IsNullOrEmpty(olapReport))
|
||||
DataManager.SetCurrentReport(OLAPUTILS.Utils.DeserializeOlapReport(olapReport));
|
||||
if (!string.IsNullOrEmpty(clientReports))
|
||||
DataManager.Reports = olapClientHelper.DeserializedReports(clientReports);
|
||||
return olapClientHelper.GetJsonData(action, DataManager, checkedStatus, parentNode, tag, dimensionName, cubeName);
|
||||
}
|
||||
|
||||
public void Export(Stream stream)
|
||||
{
|
||||
System.IO.StreamReader sReader = new System.IO.StreamReader(stream);
|
||||
string args = System.Web.HttpContext.Current.Server.UrlDecode(sReader.ReadToEnd()).Remove(0, 5);
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
string fileName = "Sample";
|
||||
olapClientHelper.ExportPivotClient(DataManager, args, fileName, System.Web.HttpContext.Current.Response);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> FetchMemberTreeNodes(string action, string dimensionName, string olapReport)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.SetCurrentReport(OLAPUTILS.Utils.DeserializeOlapReport(olapReport));
|
||||
return olapClientHelper.GetJsonData(action, DataManager, dimensionName);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> RemoveReportFromDB(string reportName, string operationalMode, string analysisMode)
|
||||
{
|
||||
SqlCeConnection con = new SqlCeConnection() { ConnectionString = conStringforDB };
|
||||
con.Open();
|
||||
reportName = reportName + "##" + operationalMode.ToLower() + "#>>#" + analysisMode.ToLower();
|
||||
SqlCeCommand cmd1 = null;
|
||||
foreach (DataRow row in GetDataTable().Rows)
|
||||
{
|
||||
if ((row.ItemArray[0] as string).Equals(reportName))
|
||||
{
|
||||
cmd1 = new SqlCeCommand("DELETE FROM ReportsTable WHERE ReportName LIKE '%" + reportName + "%'", con);
|
||||
}
|
||||
}
|
||||
cmd1.ExecuteNonQuery();
|
||||
con.Close();
|
||||
Dictionary<string, object> dictionary = new Dictionary<string, object>();
|
||||
dictionary.Add("CurrentAction", "Remove");
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> RenameReportInDB(string selectedReport, string renameReport, string operationalMode, string analysisMode)
|
||||
{
|
||||
SqlCeConnection con = new SqlCeConnection() { ConnectionString = conStringforDB };
|
||||
con.Open();
|
||||
selectedReport = selectedReport + "##" + operationalMode.ToLower() + "#>>#" + analysisMode.ToLower();
|
||||
renameReport = renameReport + "##" + operationalMode.ToLower() + "#>>#" + analysisMode.ToLower();
|
||||
SqlCeCommand cmd1 = null;
|
||||
foreach (DataRow row in GetDataTable().Rows)
|
||||
{
|
||||
if ((row.ItemArray[0] as string).Equals(selectedReport))
|
||||
{
|
||||
cmd1 = new SqlCeCommand("update ReportsTable set ReportName=@RenameReport where ReportName like '%" + selectedReport + "%'", con);
|
||||
}
|
||||
}
|
||||
cmd1.Parameters.Add("@RenameReport", renameReport);
|
||||
cmd1.ExecuteNonQuery();
|
||||
con.Close();
|
||||
Dictionary<string, object> dictionary = new Dictionary<string, object>();
|
||||
dictionary.Add("CurrentAction", "Rename");
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> FetchReportListFromDB(string action, string operationalMode, string analysisMode)
|
||||
{
|
||||
string reportNames = string.Empty;
|
||||
string currentRptName = string.Empty;
|
||||
foreach (System.Data.DataRow row in GetDataTable().Rows)
|
||||
{
|
||||
currentRptName = (row.ItemArray[0] as string);
|
||||
if (currentRptName.IndexOf("##" + operationalMode + "#>>#" + analysisMode) >= 0)
|
||||
{
|
||||
currentRptName = currentRptName.Replace("##" + operationalMode + "#>>#" + analysisMode, "");
|
||||
reportNames = reportNames == "" ? currentRptName : reportNames + "__" + currentRptName;
|
||||
}
|
||||
}
|
||||
Dictionary<string, object> dictionary = new Dictionary<string, object>();
|
||||
dictionary.Add("ReportNameList", reportNames);
|
||||
dictionary.Add("action", action);
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> FilterElement(string action, string clientParams, string olapReport, string clientReports)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.SetCurrentReport(OLAPUTILS.Utils.DeserializeOlapReport(olapReport));
|
||||
DataManager.Reports = olapClientHelper.DeserializedReports(clientReports);
|
||||
return olapClientHelper.GetJsonData(action, DataManager, clientParams);
|
||||
}
|
||||
|
||||
public string GetMDXQuery(string olapReport)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.SetCurrentReport(OLAPUTILS.Utils.DeserializeOlapReport(olapReport));
|
||||
return DataManager.GetMDXQuery();
|
||||
}
|
||||
|
||||
public Dictionary<string, object> Initialize(string action, string customObject, string clientParams)
|
||||
{
|
||||
OlapDataManager DataManager = null;
|
||||
dynamic customData = serializer.Deserialize<dynamic>(customObject.ToString());
|
||||
var cultureIDInfo = new System.Globalization.CultureInfo("en-US").LCID;
|
||||
if (customData is Dictionary<string, object> && customData.ContainsKey("Language"))
|
||||
{
|
||||
cultureIDInfo = new System.Globalization.CultureInfo((customData["Language"])).LCID;
|
||||
}
|
||||
connectionString = connectionString.Replace("" + cultureIDInfoval + "", "" + cultureIDInfo + "");
|
||||
cultureIDInfoval = cultureIDInfo;
|
||||
DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.Culture = new System.Globalization.CultureInfo(cultureIDInfo);
|
||||
DataManager.SetCurrentReport(CreateOlapReport());
|
||||
return olapClientHelper.GetJsonData(action, DataManager, clientParams);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> InitializeChart(string action, string currentReport, string customObject)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.SetCurrentReport(OLAPUTILS.Utils.DeserializeOlapReport(currentReport));
|
||||
return chartHelper.GetJsonData(action, DataManager);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> InitializeGrid(string action, string currentReport, string gridLayout, string customObject)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
if (DataManager.ConnectionString.ToLower().Replace(" ", String.Empty).Split(';', '=').Contains("localeidentifier"))
|
||||
{
|
||||
DataManager.Culture = new System.Globalization.CultureInfo(cultureIDInfoval);
|
||||
DataManager.OverrideDefaultFormatStrings = true;
|
||||
}
|
||||
DataManager.SetCurrentReport(OLAPUTILS.Utils.DeserializeOlapReport(currentReport));
|
||||
return olapClientHelper.GetJsonData(action, DataManager, gridLayout);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> InitializeTreeMap(string action, string currentReport, string customObject)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.SetCurrentReport(OLAPUTILS.Utils.DeserializeOlapReport(currentReport));
|
||||
return treemapHelper.GetJsonData(action, DataManager);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> LoadReportFromDB(string reportName, string operationalMode, string analysisMode, string olapReport, string clientReports)
|
||||
{
|
||||
PivotReport report = new PivotReport();
|
||||
Dictionary<string, object> dictionary = new Dictionary<string, object>();
|
||||
string currentRptName = string.Empty;
|
||||
foreach (DataRow row in GetDataTable().Rows)
|
||||
{
|
||||
currentRptName = (row.ItemArray[0] as string).Replace("##" + operationalMode.ToLower() + "#>>#" + analysisMode.ToLower(), "");
|
||||
if (currentRptName.Equals(reportName))
|
||||
{
|
||||
byte[] reportString = new byte[2 * 1024];
|
||||
reportString = (row.ItemArray[1] as byte[]);
|
||||
if (operationalMode.ToLower() == "servermode" && analysisMode == "olap")
|
||||
{
|
||||
var repCol = Encoding.UTF8.GetString(reportString);
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
if (repCol.IndexOf("<?xml version") == 0)
|
||||
{
|
||||
var reportStr = "";
|
||||
reportStr = Syncfusion.JavaScript.Olap.Utils.CompressData(row.ItemArray[1] as byte[]);
|
||||
DataManager.Reports = olapClientHelper.DeserializedReports(reportStr);
|
||||
DataManager.SetCurrentReport(DataManager.Reports[0]);
|
||||
return olapClientHelper.GetJsonData("toolbarOperation", DataManager, "Load Report", reportName);
|
||||
}
|
||||
else
|
||||
{
|
||||
dynamic customData = serializer.Deserialize<dynamic>(repCol.ToString());
|
||||
DataManager.Reports = olapClientHelper.DeserializedReports(customData[customData[customData.Length - 1]["cubeIndex"]]["Reports"]);
|
||||
DataManager.SetCurrentReport(DataManager.Reports[customData[customData[customData.Length - 1]["cubeIndex"]]["ReportIndex"]]);
|
||||
dictionary = olapClientHelper.GetJsonData("toolbarOperation", DataManager, "Load Report", reportName);
|
||||
dictionary.Add("Collection", repCol);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (analysisMode.ToLower() == "pivot" && operationalMode.ToLower() == "servermode")
|
||||
dictionary = olapClientHelper.GetJsonData("LoadReport", ProductSales.GetSalesData(), Encoding.UTF8.GetString(reportString));
|
||||
else
|
||||
dictionary.Add("report", Encoding.UTF8.GetString(reportString));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> MeasureGroup(string action, string measureGroupName, string olapReport, string clientReports)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.SetCurrentReport(OLAPUTILS.Utils.DeserializeOlapReport(olapReport));
|
||||
DataManager.Reports = olapClientHelper.DeserializedReports(clientReports);
|
||||
return olapClientHelper.GetJsonData(action, DataManager, measureGroupName);
|
||||
}
|
||||
public Dictionary<string, object> CalculatedMember(string action, string olapReport, string clientReports, string caption, string expression, string memberType, string dimension, string formatString, string uniqueName)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.SetCurrentReport(Syncfusion.JavaScript.Olap.Utils.DeserializeOlapReport(olapReport));
|
||||
DataManager.Reports = olapClientHelper.DeserializedReports(clientReports);
|
||||
return olapClientHelper.GetJsonData(action, DataManager, caption, expression, memberType, dimension, formatString,uniqueName);
|
||||
}
|
||||
public Dictionary<string, object> RemoveSplitButton(string action, string clientParams, string olapReport, string clientReports)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.SetCurrentReport(OLAPUTILS.Utils.DeserializeOlapReport(olapReport));
|
||||
DataManager.Reports = olapClientHelper.DeserializedReports(clientReports);
|
||||
return olapClientHelper.GetJsonData(action, DataManager, clientParams);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> SaveReportToDB(string reportName, string operationalMode, string analysisMode, string olapReport, string clientReports)
|
||||
{
|
||||
reportName = reportName + "##" + operationalMode.ToLower() + "#>>#" + analysisMode.ToLower();
|
||||
bool isDuplicate = true;
|
||||
SqlCeConnection con = new SqlCeConnection() { ConnectionString = conStringforDB };
|
||||
con.Open();
|
||||
SqlCeCommand cmd1 = null;
|
||||
foreach (DataRow row in GetDataTable().Rows)
|
||||
{
|
||||
if ((row.ItemArray[0] as string).Equals(reportName))
|
||||
{
|
||||
isDuplicate = false;
|
||||
cmd1 = new SqlCeCommand("update ReportsTable set Report=@Reports where ReportName like @ReportName", con);
|
||||
}
|
||||
}
|
||||
if (isDuplicate)
|
||||
{
|
||||
cmd1 = new SqlCeCommand("insert into ReportsTable Values(@ReportName,@Reports)", con);
|
||||
}
|
||||
cmd1.Parameters.Add("@ReportName", reportName);
|
||||
cmd1.Parameters.Add("@Reports", Encoding.UTF8.GetBytes(clientReports).ToArray());
|
||||
cmd1.ExecuteNonQuery();
|
||||
con.Close();
|
||||
Dictionary<string, object> dictionary = new Dictionary<string, object>();
|
||||
dictionary.Add("CurrentAction", "Save");
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> ToggleAxis(string action, string currentReport, string clientReports)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.SetCurrentReport(OLAPUTILS.Utils.DeserializeOlapReport(currentReport));
|
||||
DataManager.Reports = olapClientHelper.DeserializedReports(clientReports);
|
||||
DataManager.ToggleAxis(DataManager.CurrentReport);
|
||||
return olapClientHelper.GetJsonData(action, DataManager, clientReports);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> ToolbarOperations(string action, string toolbarOperation, string clientInfo, string olapReport, string clientReports)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
if (!string.IsNullOrEmpty(olapReport))
|
||||
DataManager.SetCurrentReport(OLAPUTILS.Utils.DeserializeOlapReport(olapReport));
|
||||
if (!string.IsNullOrEmpty(clientReports))
|
||||
DataManager.Reports = olapClientHelper.DeserializedReports(clientReports);
|
||||
return olapClientHelper.GetJsonData(action, DataManager, toolbarOperation, clientInfo);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> UpdateReport(string action, string clientParams, string olapReport, string clientReports)
|
||||
{
|
||||
return olapClientHelper.GetJsonData(action, clientParams, olapReport, clientReports);
|
||||
}
|
||||
|
||||
private DataTable GetDataTable()
|
||||
{
|
||||
SqlCeConnection con = new SqlCeConnection() { ConnectionString = conStringforDB };
|
||||
con.Open();
|
||||
DataSet dSet = new DataSet();
|
||||
new SqlCeDataAdapter("Select * from ReportsTable", con).Fill(dSet);
|
||||
con.Close();
|
||||
return dSet.Tables[0];
|
||||
}
|
||||
|
||||
private OlapReport CreateOlapReport()
|
||||
{
|
||||
OlapReport olapReport = new OlapReport() { Name = "Default Report" };
|
||||
olapReport.CurrentCubeName = "Adventure Works";
|
||||
|
||||
MeasureElements measureElement = new MeasureElements();
|
||||
measureElement.Elements.Add(new MeasureElement { UniqueName = "[Measures].[Customer Count]" });
|
||||
|
||||
DimensionElement dimensionElementRow = new DimensionElement();
|
||||
dimensionElementRow.Name = "Date";
|
||||
dimensionElementRow.AddLevel("Fiscal", "Fiscal Year");
|
||||
|
||||
olapReport.SeriesElements.Add(dimensionElementRow);
|
||||
olapReport.CategoricalElements.Add(measureElement);
|
||||
|
||||
return olapReport;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
<%@ ServiceHost Language="C#" Debug="true" Service="EJServices.Wcf.Pivotclient.Relational" CodeBehind="Relational.svc.cs" %>
|
|
@ -1,250 +0,0 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2022.
|
||||
// Copyright Syncfusion Inc. 2001-2022. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using EJServices.Models;
|
||||
using Syncfusion.JavaScript;
|
||||
using Syncfusion.Olap.Manager;
|
||||
using Syncfusion.PivotAnalysis.Base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlServerCe;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ServiceModel;
|
||||
using System.ServiceModel.Activation;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using OLAPUTILS = Syncfusion.JavaScript.Olap;
|
||||
|
||||
namespace EJServices.Wcf.Pivotclient
|
||||
{
|
||||
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "RelationalClient" in code, svc and config file together.
|
||||
// NOTE: In order to launch WCF Test Client for testing this service, please select RelationalClient.svc or RelationalClient.svc.cs at the Solution Explorer and start debugging.
|
||||
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
|
||||
public class Relational : IRelational
|
||||
{
|
||||
PivotClient pivotClient = new PivotClient();
|
||||
PivotChart pivotChart = new PivotChart();
|
||||
PivotGrid pivotGrid = new PivotGrid();
|
||||
string conStringforDB = "DataSource=" + HttpContext.Current.Server.MapPath("~/App_Data/ReportsTable.sdf") + "; Persist Security Info=False", reportTableName = "ReportsTable";
|
||||
JavaScriptSerializer serializer = new JavaScriptSerializer();
|
||||
|
||||
public Dictionary<string, object> DrillChart(string action, string drilledSeries, string currentReport)
|
||||
{
|
||||
pivotClient.PopulateData(currentReport);
|
||||
pivotChart.PivotEngine.PivotRows = this.pivotClient.PivotReport.PivotRows;
|
||||
pivotChart.PivotEngine.PivotColumns = this.pivotClient.PivotReport.PivotColumns;
|
||||
pivotChart.PivotEngine.PivotCalculations = this.pivotClient.PivotReport.PivotCalculations;
|
||||
pivotChart.PivotEngine.Filters = this.pivotClient.PivotReport.Filters;
|
||||
pivotChart.PivotReport = this.pivotClient.PivotReport;
|
||||
return pivotChart.GetJsonData(action, ProductSales.GetSalesData(), drilledSeries);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> ChangeSummaryType(string action, string currentReport, string summaryType)
|
||||
{
|
||||
pivotClient.PopulateData(currentReport);
|
||||
return pivotClient.GetJsonData(action, ProductSales.GetSalesData(), summaryType);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> DropNode(string action, string args)
|
||||
{
|
||||
return pivotClient.GetJsonData(action, ProductSales.GetSalesData(), args);
|
||||
}
|
||||
|
||||
public void Export(Stream stream)
|
||||
{
|
||||
System.IO.StreamReader sReader = new System.IO.StreamReader(stream);
|
||||
string args = System.Web.HttpContext.Current.Server.UrlDecode(sReader.ReadToEnd()).Remove(0, 5);
|
||||
Dictionary<string, string> gridParams = serializer.Deserialize<Dictionary<string, string>>(args);
|
||||
pivotClient.PopulateData(gridParams["currentReport"]);
|
||||
string fileName = "Sample";
|
||||
pivotClient.ExportPivotClient(ProductSales.GetSalesData(), args, fileName, System.Web.HttpContext.Current.Response);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> FetchMembers(string action, string currentReport, string customObject, string headerTag)
|
||||
{
|
||||
pivotClient.PopulateData(currentReport);
|
||||
return pivotClient.GetJsonData(action, ProductSales.GetSalesData(), headerTag);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> RemoveReportFromDB(string reportName, string operationalMode, string analysisMode)
|
||||
{
|
||||
SqlCeConnection con = new SqlCeConnection() { ConnectionString = conStringforDB };
|
||||
con.Open();
|
||||
reportName = reportName + "##" + operationalMode.ToLower() + "#>>#" + analysisMode.ToLower();
|
||||
SqlCeCommand cmd1 = null;
|
||||
foreach (DataRow row in GetDataTable().Rows)
|
||||
{
|
||||
if ((row.ItemArray[0] as string).Equals(reportName))
|
||||
{
|
||||
cmd1 = new SqlCeCommand("DELETE FROM ReportsTable WHERE ReportName LIKE '%" + reportName + "%'", con);
|
||||
}
|
||||
}
|
||||
cmd1.ExecuteNonQuery();
|
||||
con.Close();
|
||||
Dictionary<string, object> dictionary = new Dictionary<string, object>();
|
||||
dictionary.Add("CurrentAction", "Remove");
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> RenameReportInDB(string selectedReport, string renameReport, string operationalMode, string analysisMode)
|
||||
{
|
||||
SqlCeConnection con = new SqlCeConnection() { ConnectionString = conStringforDB };
|
||||
con.Open();
|
||||
selectedReport = selectedReport + "##" + operationalMode.ToLower() + "#>>#" + analysisMode.ToLower();
|
||||
renameReport = renameReport + "##" + operationalMode.ToLower() + "#>>#" + analysisMode.ToLower();
|
||||
SqlCeCommand cmd1 = null;
|
||||
foreach (DataRow row in GetDataTable().Rows)
|
||||
{
|
||||
if ((row.ItemArray[0] as string).Equals(selectedReport))
|
||||
{
|
||||
cmd1 = new SqlCeCommand("update ReportsTable set ReportName=@RenameReport where ReportName like '%" + selectedReport + "%'", con);
|
||||
}
|
||||
}
|
||||
cmd1.Parameters.Add("@RenameReport", renameReport);
|
||||
cmd1.ExecuteNonQuery();
|
||||
con.Close();
|
||||
Dictionary<string, object> dictionary = new Dictionary<string, object>();
|
||||
dictionary.Add("CurrentAction", "Rename");
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> FetchReportListFromDB(string action, string operationalMode, string analysisMode)
|
||||
{
|
||||
string reportNames = string.Empty;
|
||||
string currentRptName = string.Empty;
|
||||
foreach (System.Data.DataRow row in GetDataTable().Rows)
|
||||
{
|
||||
currentRptName = (row.ItemArray[0] as string);
|
||||
if (currentRptName.IndexOf("##" + operationalMode + "#>>#" + analysisMode) >= 0)
|
||||
{
|
||||
currentRptName = currentRptName.Replace("##" + operationalMode + "#>>#" + analysisMode, "");
|
||||
reportNames = reportNames == "" ? currentRptName : reportNames + "__" + currentRptName;
|
||||
}
|
||||
}
|
||||
Dictionary<string, object> dictionary = new Dictionary<string, object>();
|
||||
dictionary.Add("ReportNameList", reportNames);
|
||||
dictionary.Add("action", action);
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> Filtering(string action, string filterParams, string currentReport, string customObject)
|
||||
{
|
||||
pivotClient.PopulateData(currentReport);
|
||||
return pivotClient.GetJsonData(action, ProductSales.GetSalesData(), filterParams);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> Initialize(string action, string clientParams)
|
||||
{
|
||||
BindData();
|
||||
return pivotClient.GetJsonData(action, ProductSales.GetSalesData(), clientParams);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> Sorting(string action, string currentReport, string sortedHeaders)
|
||||
{
|
||||
pivotClient.PopulateData(currentReport);
|
||||
return pivotClient.GetJsonData(action, ProductSales.GetSalesData(), sortedHeaders);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> ValueSorting(string action, string valueSorting, string currentReport, string customObject)
|
||||
{
|
||||
pivotClient.PopulateData(currentReport);
|
||||
return pivotClient.GetJsonData(action, ProductSales.GetSalesData(), valueSorting);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> LoadReportFromDB(string reportName, string operationalMode, string analysisMode, string olapReport, string clientReports)
|
||||
{
|
||||
PivotReport report = new PivotReport();
|
||||
Dictionary<string, object> dictionary = new Dictionary<string, object>();
|
||||
string currentRptName = string.Empty;
|
||||
foreach (DataRow row in GetDataTable().Rows)
|
||||
{
|
||||
currentRptName = (row.ItemArray[0] as string).Replace("##" + operationalMode.ToLower() + "#>>#" + analysisMode.ToLower(), "");
|
||||
if (currentRptName.Equals(reportName))
|
||||
{
|
||||
if (operationalMode.ToLower() == "servermode" && analysisMode == "olap")
|
||||
{
|
||||
var reportString = "";
|
||||
OlapDataManager DataManager = new OlapDataManager();
|
||||
reportString = OLAPUTILS.Utils.CompressData(row.ItemArray[1] as byte[]);
|
||||
DataManager.Reports = pivotClient.DeserializedReports(reportString);
|
||||
DataManager.SetCurrentReport(DataManager.Reports[0]);
|
||||
return pivotClient.GetJsonData("toolbarOperation", DataManager, "Load Report", reportName);
|
||||
}
|
||||
else
|
||||
{
|
||||
byte[] reportString = new byte[2 * 1024];
|
||||
reportString = (row.ItemArray[1] as byte[]);
|
||||
if (analysisMode.ToLower() == "pivot" && operationalMode.ToLower() == "servermode")
|
||||
dictionary = pivotClient.GetJsonData("LoadReport", ProductSales.GetSalesData(), Encoding.UTF8.GetString(reportString));
|
||||
else
|
||||
dictionary.Add("report", Encoding.UTF8.GetString(reportString));
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> SaveReportToDB(string reportName, string operationalMode, string analysisMode, string olapReport, string clientReports)
|
||||
{
|
||||
reportName = reportName + "##" + operationalMode.ToLower() + "#>>#" + analysisMode.ToLower();
|
||||
bool isDuplicate = true;
|
||||
SqlCeConnection con = new SqlCeConnection() { ConnectionString = conStringforDB };
|
||||
con.Open();
|
||||
SqlCeCommand cmd1 = null;
|
||||
foreach (DataRow row in GetDataTable().Rows)
|
||||
{
|
||||
if ((row.ItemArray[0] as string).Equals(reportName))
|
||||
{
|
||||
isDuplicate = false;
|
||||
cmd1 = new SqlCeCommand("update ReportsTable set Report=@Reports where ReportName like @ReportName", con);
|
||||
}
|
||||
}
|
||||
if (isDuplicate)
|
||||
{
|
||||
cmd1 = new SqlCeCommand("insert into ReportsTable Values(@ReportName,@Reports)", con);
|
||||
}
|
||||
cmd1.Parameters.Add("@ReportName", reportName);
|
||||
cmd1.Parameters.Add("@Reports", Encoding.UTF8.GetBytes(clientReports).ToArray());
|
||||
cmd1.ExecuteNonQuery();
|
||||
con.Close();
|
||||
Dictionary<string, object> dictionary = new Dictionary<string, object>();
|
||||
dictionary.Add("CurrentAction", "Save");
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> ToolbarOperations(string action, string args)
|
||||
{
|
||||
return pivotClient.GetJsonData(action, ProductSales.GetSalesData(), args);
|
||||
}
|
||||
|
||||
|
||||
private void BindData()
|
||||
{
|
||||
pivotClient.PivotReport.PivotRows.Add(new PivotItem { FieldMappingName = "Country", FieldHeader = "Country", TotalHeader = "Total", ShowSubTotal = false });
|
||||
pivotClient.PivotReport.PivotRows.Add(new PivotItem { FieldMappingName = "State", FieldHeader = "State", TotalHeader = "Total" });
|
||||
pivotClient.PivotReport.PivotRows.Add(new PivotItem { FieldMappingName = "Date", FieldHeader = "Date", TotalHeader = "Total" });
|
||||
pivotClient.PivotReport.PivotColumns.Add(new PivotItem { FieldMappingName = "Product", FieldHeader = "Product", TotalHeader = "Total", ShowSubTotal = false });
|
||||
pivotClient.PivotReport.PivotCalculations.Add(new PivotComputationInfo { CalculationName = "Amount", Description = "Amount", FieldHeader = "Amount", FieldName = "Amount", Format = "C", SummaryType = Syncfusion.PivotAnalysis.Base.SummaryType.DoubleTotalSum });
|
||||
}
|
||||
|
||||
private DataTable GetDataTable()
|
||||
{
|
||||
SqlCeConnection con = new SqlCeConnection() { ConnectionString = conStringforDB };
|
||||
con.Open();
|
||||
DataSet dSet = new DataSet();
|
||||
new SqlCeDataAdapter("Select * from ReportsTable", con).Fill(dSet);
|
||||
con.Close();
|
||||
return dSet.Tables[0];
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2022.
|
||||
// Copyright Syncfusion Inc. 2001-2022. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ServiceModel;
|
||||
using System.Text;
|
||||
|
||||
namespace EJServices.Wcf.Pivotgauge
|
||||
{
|
||||
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IOlapGauge" in both code and config file together.
|
||||
[ServiceContract]
|
||||
public interface IOlap
|
||||
{
|
||||
[OperationContract]
|
||||
Dictionary<string, object> Initialize(string action, string customObject);
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2022.
|
||||
// Copyright Syncfusion Inc. 2001-2022. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ServiceModel;
|
||||
using System.Text;
|
||||
|
||||
namespace EJServices.Wcf.Pivotgauge
|
||||
{
|
||||
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IRelationalGauge" in both code and config file together.
|
||||
[ServiceContract]
|
||||
public interface IRelational
|
||||
{
|
||||
[OperationContract]
|
||||
Dictionary<string, object> Initialize(string action, string customObject);
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
<%@ ServiceHost Language="C#" Debug="true" Service="EJServices.Wcf.Pivotgauge.Olap" CodeBehind="Olap.svc.cs" %>
|
|
@ -1,83 +0,0 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2022.
|
||||
// Copyright Syncfusion Inc. 2001-2022. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using Syncfusion.JavaScript;
|
||||
using Syncfusion.Olap.Manager;
|
||||
using Syncfusion.Olap.Reports;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ServiceModel;
|
||||
using System.ServiceModel.Activation;
|
||||
using System.Text;
|
||||
using System.Web.Script.Serialization;
|
||||
|
||||
namespace EJServices.Wcf.Pivotgauge
|
||||
{
|
||||
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "OlapGauge" in code, svc and config file together.
|
||||
// NOTE: In order to launch WCF Test Client for testing this service, please select OlapGauge.svc or OlapGauge.svc.cs at the Solution Explorer and start debugging.
|
||||
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
|
||||
public class Olap : IOlap
|
||||
{
|
||||
PivotGauge htmlHelper = new PivotGauge();
|
||||
int cultureIDInfoval = 1033;
|
||||
string connectionString = ConfigurationManager.ConnectionStrings["Adventure Works"].ConnectionString + "locale identifier=1033;";
|
||||
JavaScriptSerializer serializer = new JavaScriptSerializer();
|
||||
public Dictionary<string, object> Initialize(string action, string customObject)
|
||||
{
|
||||
OlapDataManager DataManager = null;
|
||||
dynamic customData = serializer.Deserialize<dynamic>(customObject.ToString());
|
||||
var cultureIDInfo = new System.Globalization.CultureInfo("en-US").LCID;
|
||||
if (customData is Dictionary<string, object> && customData.ContainsKey("Language"))
|
||||
{
|
||||
cultureIDInfo = new System.Globalization.CultureInfo((customData["Language"])).LCID;
|
||||
}
|
||||
connectionString = connectionString.Replace("" + cultureIDInfoval + "", "" + cultureIDInfo + "");
|
||||
cultureIDInfoval = cultureIDInfo;
|
||||
DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.Culture = new System.Globalization.CultureInfo(cultureIDInfo);
|
||||
DataManager.SetCurrentReport(CreateOlapReport());
|
||||
return htmlHelper.GetJsonData(action, DataManager);
|
||||
}
|
||||
|
||||
private OlapReport CreateOlapReport()
|
||||
{
|
||||
OlapReport report = new OlapReport();
|
||||
report.CurrentCubeName = "Adventure Works";
|
||||
|
||||
//Specifying the KPI name
|
||||
KpiElements kpiElement = new KpiElements();
|
||||
kpiElement.Elements.Add(new KpiElement { Name = "Internet Revenue", ShowKPIGoal = true, ShowKPIStatus = true, ShowKPIValue = true, ShowKPITrend = true });
|
||||
|
||||
DimensionElement dimensionElementColumn = new DimensionElement();
|
||||
//Specifying the dimension name
|
||||
dimensionElementColumn.Name = "Customer";
|
||||
//Adding the level with the hierarchy Name
|
||||
dimensionElementColumn.AddLevel("Customer Geography", "Country");
|
||||
|
||||
//Specifying the measure name
|
||||
MeasureElements measureElementColumn = new MeasureElements();
|
||||
measureElementColumn.Elements.Add(new MeasureElement { Name = "Internet Sales Amount" });
|
||||
|
||||
DimensionElement dimensionElementRow = new DimensionElement();
|
||||
//Specifying the dimension name
|
||||
dimensionElementRow.Name = "Date";
|
||||
//Adding the level with the hierarchy Name
|
||||
dimensionElementRow.AddLevel("Fiscal", "Fiscal Year");
|
||||
dimensionElementRow.Hierarchy.LevelElements["Fiscal Year"].Add("FY 2004");
|
||||
dimensionElementRow.Hierarchy.LevelElements["Fiscal Year"].IncludeAvailableMembers = true;
|
||||
|
||||
report.CategoricalElements.Add(dimensionElementColumn);
|
||||
report.CategoricalElements.Add(kpiElement);
|
||||
report.CategoricalElements.Add(measureElementColumn);
|
||||
report.SeriesElements.Add(dimensionElementRow);
|
||||
return report;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
<%@ ServiceHost Language="C#" Debug="true" Service="EJServices.Wcf.Pivotgauge.Relational" CodeBehind="Relational.svc.cs" %>
|
|
@ -1,47 +0,0 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2022.
|
||||
// Copyright Syncfusion Inc. 2001-2022. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using EJServices.Models;
|
||||
using Syncfusion.JavaScript;
|
||||
using Syncfusion.PivotAnalysis.Base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ServiceModel;
|
||||
using System.ServiceModel.Activation;
|
||||
using System.Text;
|
||||
using System.Web.Script.Serialization;
|
||||
|
||||
namespace EJServices.Wcf.Pivotgauge
|
||||
{
|
||||
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "RelationalGauge" in code, svc and config file together.
|
||||
// NOTE: In order to launch WCF Test Client for testing this service, please select RelationalGauge.svc or RelationalGauge.svc.cs at the Solution Explorer and start debugging.
|
||||
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
|
||||
public class Relational : IRelational
|
||||
{
|
||||
PivotGauge htmlHelper = new PivotGauge();
|
||||
JavaScriptSerializer serializer = new JavaScriptSerializer();
|
||||
public Dictionary<string, object> Initialize(string action, string customObject)
|
||||
{
|
||||
htmlHelper.PivotReport = BindDefaultData();
|
||||
return htmlHelper.GetJsonData(action, ProductSales.GetSalesData());
|
||||
}
|
||||
|
||||
private PivotReport BindDefaultData()
|
||||
{
|
||||
PivotReport pivotSetting = new PivotReport();
|
||||
pivotSetting.PivotRows.Add(new PivotItem { FieldMappingName = "Date", FieldHeader = "Date", TotalHeader = "Total" });
|
||||
pivotSetting.PivotRows.Add(new PivotItem { FieldMappingName = "State", FieldHeader = "State", TotalHeader = "Total" });
|
||||
pivotSetting.PivotColumns.Add(new PivotItem { FieldMappingName = "Product", FieldHeader = "Product", TotalHeader = "Total", ShowSubTotal = false });
|
||||
pivotSetting.PivotColumns.Add(new PivotItem { FieldMappingName = "Country", FieldHeader = "Country", TotalHeader = "Total", ShowSubTotal = false });
|
||||
pivotSetting.PivotCalculations.Add(new PivotComputationInfo { CalculationName = "Amount", Description = "Amount", FieldHeader = "Amount", FieldName = "Amount", Format = "C", SummaryType = Syncfusion.PivotAnalysis.Base.SummaryType.DoubleTotalSum });
|
||||
pivotSetting.PivotCalculations.Add(new PivotComputationInfo { CalculationName = "Quantity", Description = "Quantity", FieldHeader = "Quantity", FieldName = "Quantity", SummaryType = Syncfusion.PivotAnalysis.Base.SummaryType.DoubleTotalSum });
|
||||
return pivotSetting;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2022.
|
||||
// Copyright Syncfusion Inc. 2001-2022. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ServiceModel;
|
||||
using System.Text;
|
||||
|
||||
namespace EJServices.Wcf.Pivotgrid
|
||||
{
|
||||
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IOlapGrid" in both code and config file together.
|
||||
[ServiceContract(SessionMode = SessionMode.Allowed)]
|
||||
public interface IOlap
|
||||
{
|
||||
[OperationContract]
|
||||
Dictionary<string, object> Initialize(string action, string gridLayout, bool enablePivotFieldList, object customObject);
|
||||
|
||||
[OperationContract]
|
||||
Dictionary<string, object> Drill(string action, string cellPosition, string currentReport,
|
||||
string headerInfo, string layout, object customObject);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> Paging(string action, string pagingInfo, string currentReport, string gridLayout, object customObject);
|
||||
|
||||
[OperationContract]
|
||||
Dictionary<string, object> DropNode(string action, string dropType, string nodeInfo, string filterParams, string gridLayout, string currentReport, object customObject);
|
||||
|
||||
[OperationContract]
|
||||
Dictionary<string, object> RemoveButton(string action, string headerInfo, string gridLayout, string currentReport, object customObject);
|
||||
|
||||
[OperationContract]
|
||||
Dictionary<string, object> FetchMembers(string action, string headerTag, string currentReport);
|
||||
|
||||
[OperationContract]
|
||||
Dictionary<string, object> Filtering(string action, string filterParams, string gridLayout, string currentReport, object customObject);
|
||||
|
||||
[OperationContract]
|
||||
Dictionary<string, object> ExpandMember(string action, bool checkedStatus, string parentNode, string tag, string cubeName, string currentReport);
|
||||
|
||||
[OperationContract]
|
||||
void Export(System.IO.Stream stream);
|
||||
|
||||
[OperationContract]
|
||||
Dictionary<string, object> DeferUpdate(string action, string gridLayout, string filterParams, string currentReport, object customObject);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> SaveReport(string reportName, string operationalMode, string olapReport, string clientReports);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> LoadReportFromDB(string action, string gridLayout, bool enablePivotFieldList, object customObject, string reportName, string operationalMode, string olapReport, string clientReports);
|
||||
}
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2022.
|
||||
// Copyright Syncfusion Inc. 2001-2022. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ServiceModel;
|
||||
using System.Text;
|
||||
|
||||
namespace EJServices.Wcf.Pivotgrid
|
||||
{
|
||||
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IRelationalGrid" in both code and config file together.
|
||||
[ServiceContract]
|
||||
public interface IRelational
|
||||
{
|
||||
[OperationContract]
|
||||
Dictionary<string, object> Initialize(string action);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> FetchMembers(string action, string headerTag, string sortedHeaders, string currentReport);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> Filtering(string action, string filterParams, string sortedHeaders, string currentReport);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> ModifyNodeState(string action, string headerTag, string dropAxis, string sortedHeaders, string filterParams, string currentReport);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> DropNode(string action, string dropAxis, string headerTag, string sortedHeaders, string filterParams, string currentReport);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> Sorting(string action, string sortedHeaders, string currentReport);
|
||||
[OperationContract]
|
||||
void Export(System.IO.Stream stream);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> DeferUpdate(string action, string filterParams, string sortedHeaders, string currentReport);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> CalculatedField(string action, string headerTag, string currentReport);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> CellEditing(string action, string index, string valueHeaders, string summaryValues, string currentReport);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> SaveReport(string reportName, string operationalMode, string olapReport, string clientReports);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> LoadReportFromDB(string reportName, string operationalMode, string olapReport, string clientReports);
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
<%@ ServiceHost Language="C#" Debug="true" Service="EJServices.Wcf.Pivotgrid.Olap" CodeBehind="Olap.svc.cs" %>
|
|
@ -1,289 +0,0 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2022.
|
||||
// Copyright Syncfusion Inc. 2001-2022. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using Syncfusion.JavaScript.Olap;
|
||||
using Syncfusion.Olap.Manager;
|
||||
using Syncfusion.Olap.Reports;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Data.SqlServerCe;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ServiceModel;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using OLAPUTILS = Syncfusion.JavaScript.Olap;
|
||||
|
||||
namespace EJServices.Wcf.Pivotgrid
|
||||
{
|
||||
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "OlapGrid" in code, svc and config file together.
|
||||
// NOTE: In order to launch WCF Test Client for testing this service, please select OlapGrid.svc or OlapGrid.svc.cs at the Solution Explorer and start debugging.
|
||||
public class Olap : IOlap
|
||||
{
|
||||
Syncfusion.JavaScript.PivotGrid htmlHelper = new Syncfusion.JavaScript.PivotGrid();
|
||||
string connectionString = ConfigurationManager.ConnectionStrings["Adventure Works"].ConnectionString + "locale identifier=1033;";
|
||||
int cultureIDInfoval = 1033;
|
||||
JavaScriptSerializer serializer = new JavaScriptSerializer();
|
||||
string conStringforDB = "DataSource=" + HttpContext.Current.Server.MapPath("~/App_Data/ReportsTable.sdf") + "; Persist Security Info=False";
|
||||
|
||||
public Dictionary<string, object> DeferUpdate(string action, string gridLayout, string filterParams, string currentReport, object customObject)
|
||||
{
|
||||
dynamic customData = serializer.Deserialize<dynamic>(customObject.ToString());
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.SetCurrentReport(Utils.DeserializeOlapReport(currentReport));
|
||||
if (customData is Dictionary<string, object> && customData.ContainsKey("Language"))
|
||||
{
|
||||
DataManager.Culture = new System.Globalization.CultureInfo((customData["Language"]));
|
||||
DataManager.OverrideDefaultFormatStrings = true;
|
||||
}
|
||||
return htmlHelper.GetJsonData(action, connectionString, DataManager, null, filterParams, gridLayout);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> Drill(string action, string cellPosition, string currentReport, string headerInfo, string layout, object customObject)
|
||||
{
|
||||
dynamic customData = serializer.Deserialize<dynamic>(customObject.ToString());
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
if (customData is Dictionary<string, object> && customData.ContainsKey("Language"))
|
||||
{
|
||||
var cultureIDInfo = new System.Globalization.CultureInfo((customData["Language"])).LCID;
|
||||
connectionString = connectionString.Replace("" + cultureIDInfoval + "", "" + cultureIDInfo + "");
|
||||
cultureIDInfoval = cultureIDInfo;
|
||||
DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.Culture = new System.Globalization.CultureInfo((customData["Language"]));
|
||||
DataManager.OverrideDefaultFormatStrings = true;
|
||||
}
|
||||
else
|
||||
DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.SetCurrentReport(Utils.DeserializeOlapReport(currentReport));
|
||||
return htmlHelper.GetJsonData(action, connectionString, DataManager, cellPosition, headerInfo, layout);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> DropNode(string action, string dropType, string nodeInfo, string filterParams, string gridLayout, string currentReport, object customObject)
|
||||
{
|
||||
dynamic customData = serializer.Deserialize<dynamic>(customObject.ToString());
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.SetCurrentReport(Utils.DeserializeOlapReport(currentReport));
|
||||
if (customData is Dictionary<string, object> && customData.ContainsKey("Language"))
|
||||
{
|
||||
DataManager.Culture = new System.Globalization.CultureInfo((customData["Language"]));
|
||||
DataManager.OverrideDefaultFormatStrings = true;
|
||||
}
|
||||
return htmlHelper.GetJsonData(action, DataManager, dropType, nodeInfo, filterParams, gridLayout, true);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> ExpandMember(string action, bool checkedStatus, string parentNode, string tag, string cubeName, string currentReport)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
if (!string.IsNullOrEmpty(currentReport))
|
||||
DataManager.SetCurrentReport(Utils.DeserializeOlapReport(currentReport));
|
||||
return htmlHelper.GetJsonData(action, DataManager, checkedStatus, parentNode, tag, cubeName);
|
||||
}
|
||||
|
||||
public void Export(Stream stream)
|
||||
{
|
||||
System.IO.StreamReader sReader = new System.IO.StreamReader(stream);
|
||||
string args = System.Web.HttpContext.Current.Server.UrlDecode(sReader.ReadToEnd()).Remove(0, 5); ;
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
string fileName = "Sample";
|
||||
htmlHelper.ExportPivotGrid(DataManager, args, fileName, System.Web.HttpContext.Current.Response);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> FetchMembers(string action, string headerTag, string currentReport)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.SetCurrentReport(Utils.DeserializeOlapReport(currentReport));
|
||||
return htmlHelper.GetJsonData(action, DataManager, null, headerTag);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> Filtering(string action, string filterParams, string gridLayout, string currentReport, object customObject)
|
||||
{
|
||||
dynamic customData = serializer.Deserialize<dynamic>(customObject.ToString());
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.SetCurrentReport(Utils.DeserializeOlapReport(currentReport));
|
||||
if (customData is Dictionary<string, object> && customData.ContainsKey("Language"))
|
||||
{
|
||||
DataManager.Culture = new System.Globalization.CultureInfo((customData["Language"]));
|
||||
DataManager.OverrideDefaultFormatStrings = true;
|
||||
}
|
||||
return htmlHelper.GetJsonData(action, connectionString, DataManager, null, filterParams, gridLayout);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> Initialize(string action, string gridLayout, bool enablePivotFieldList, object customObject)
|
||||
{
|
||||
OlapDataManager DataManager = null;
|
||||
dynamic customData = serializer.Deserialize<dynamic>(customObject.ToString());
|
||||
var cultureIDInfo = new System.Globalization.CultureInfo("en-US").LCID;
|
||||
if (customData is Dictionary<string, object> && customData.ContainsKey("Language"))
|
||||
{
|
||||
cultureIDInfo = new System.Globalization.CultureInfo((customData["Language"])).LCID;
|
||||
}
|
||||
connectionString = connectionString.Replace("" + cultureIDInfoval + "", "" + cultureIDInfo + "");
|
||||
cultureIDInfoval = cultureIDInfo;
|
||||
DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.Culture = new System.Globalization.CultureInfo(cultureIDInfo);
|
||||
DataManager.OverrideDefaultFormatStrings = true;
|
||||
DataManager.SetCurrentReport(CreateOlapReport((customData is Dictionary<string, object> && customData.ContainsKey("isPaging")) ? customData["isPaging"] : false));
|
||||
return htmlHelper.GetJsonData(action, DataManager, gridLayout, enablePivotFieldList);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> LoadReportFromDB(string action, string layout, bool enablePivotFieldList, object customObject, string reportName, string operationalMode, string olapReport, string clientReports)
|
||||
{
|
||||
string mode = operationalMode;
|
||||
var reports = "";
|
||||
byte[] reportString = new byte[4 * 1024];
|
||||
Dictionary<string, object> dictionary = new Dictionary<string, object>();
|
||||
if (mode == "serverMode" && !string.IsNullOrEmpty(clientReports))
|
||||
{
|
||||
reports = clientReports;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (DataRow row in GetDataTable().Rows)
|
||||
{
|
||||
if ((row.ItemArray[0] as string).Equals(reportName))
|
||||
{
|
||||
if (mode == "clientMode")
|
||||
{
|
||||
reportString = row.ItemArray[1] as byte[];
|
||||
dictionary.Add("report", Encoding.UTF8.GetString(reportString));
|
||||
break;
|
||||
}
|
||||
else if (mode == "serverMode")
|
||||
{
|
||||
reports = OLAPUTILS.Utils.CompressData(row.ItemArray[1] as byte[]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (reports != "")
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
dynamic customData = serializer.Deserialize<dynamic>(customObject.ToString());
|
||||
var cultureIDInfo = new System.Globalization.CultureInfo(("en-US")).LCID;
|
||||
if (customData is Dictionary<string, object> && customData.ContainsKey("Language"))
|
||||
{
|
||||
cultureIDInfo = new System.Globalization.CultureInfo((customData["Language"])).LCID;
|
||||
}
|
||||
connectionString = connectionString.Replace("" + cultureIDInfoval + "", "" + cultureIDInfo + "");
|
||||
cultureIDInfoval = cultureIDInfo;
|
||||
DataManager.Culture = new System.Globalization.CultureInfo((cultureIDInfo));
|
||||
DataManager.SetCurrentReport(OLAPUTILS.Utils.DeserializeOlapReport(reports));
|
||||
DataManager.OverrideDefaultFormatStrings = true;
|
||||
dictionary = htmlHelper.GetJsonData(action, DataManager, layout, enablePivotFieldList);
|
||||
}
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> Paging(string action, string pagingInfo, string currentReport, string gridLayout, object customObject)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.SetCurrentReport(htmlHelper.SetPaging(currentReport, pagingInfo));
|
||||
return htmlHelper.GetJsonData(action, DataManager, gridLayout);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> RemoveButton(string action, string headerInfo, string gridLayout, string currentReport, object customObject)
|
||||
{
|
||||
dynamic customData = serializer.Deserialize<dynamic>(customObject.ToString());
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.SetCurrentReport(Utils.DeserializeOlapReport(currentReport));
|
||||
if (customData is Dictionary<string, object> && customData.ContainsKey("Language"))
|
||||
{
|
||||
DataManager.Culture = new System.Globalization.CultureInfo((customData["Language"]));
|
||||
DataManager.OverrideDefaultFormatStrings = true;
|
||||
}
|
||||
return htmlHelper.GetJsonData(action, connectionString, DataManager, null, headerInfo, gridLayout);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> SaveReport(string reportName, string operationalMode, string olapReport, string clientReports)
|
||||
{
|
||||
string mode = operationalMode;
|
||||
bool isDuplicate = true;
|
||||
SqlCeConnection con = new SqlCeConnection() { ConnectionString = conStringforDB };
|
||||
con.Open();
|
||||
SqlCeCommand cmd1 = null;
|
||||
foreach (DataRow row in GetDataTable().Rows)
|
||||
{
|
||||
if ((row.ItemArray[0] as string).Equals(reportName))
|
||||
{
|
||||
isDuplicate = false;
|
||||
cmd1 = new SqlCeCommand("update ReportsTable set Report=@Reports where ReportName like @ReportName", con);
|
||||
}
|
||||
}
|
||||
if (isDuplicate)
|
||||
{
|
||||
cmd1 = new SqlCeCommand("insert into ReportsTable Values(@ReportName,@Reports)", con);
|
||||
}
|
||||
cmd1.Parameters.Add("@ReportName", reportName);
|
||||
//cmd1.Parameters.Add("@Reports", OLAPUTILS.Utils.GetReportStream(clientReports).ToArray());
|
||||
if (mode == "serverMode")
|
||||
cmd1.Parameters.Add("@Reports", OLAPUTILS.Utils.GetReportStream(clientReports).ToArray());
|
||||
else if (mode == "clientMode")
|
||||
cmd1.Parameters.Add("@Reports", Encoding.UTF8.GetBytes(clientReports).ToArray());
|
||||
cmd1.ExecuteNonQuery();
|
||||
con.Close();
|
||||
return null;
|
||||
}
|
||||
|
||||
private DataTable GetDataTable()
|
||||
{
|
||||
SqlCeConnection con = new SqlCeConnection() { ConnectionString = conStringforDB };
|
||||
con.Open();
|
||||
DataSet dSet = new DataSet();
|
||||
new SqlCeDataAdapter("Select * from ReportsTable", con).Fill(dSet);
|
||||
con.Close();
|
||||
return dSet.Tables[0];
|
||||
}
|
||||
|
||||
private OlapReport CreateOlapReport(bool isPaging)
|
||||
{
|
||||
OlapReport olapReport = new OlapReport();
|
||||
olapReport.CurrentCubeName = "Adventure Works";
|
||||
|
||||
if (isPaging)
|
||||
{
|
||||
olapReport.EnablePaging = true;
|
||||
olapReport.PagerOptions.SeriesPageSize = 5;
|
||||
olapReport.PagerOptions.CategoricalPageSize = 5;
|
||||
|
||||
DimensionElement dimensionElement = new DimensionElement() { Name = "Customer" };
|
||||
dimensionElement.AddLevel("Customer", "Customer");
|
||||
olapReport.CategoricalElements.Add(dimensionElement);
|
||||
|
||||
DimensionElement dimensionElementRow = new DimensionElement() { Name = "Customer", HierarchyName = "Customer" };
|
||||
dimensionElementRow.AddLevel("Customer Geography", "Country");
|
||||
olapReport.SeriesElements.Add(dimensionElementRow);
|
||||
|
||||
MeasureElements measureElementColumn = new MeasureElements();
|
||||
measureElementColumn.Elements.Add(new MeasureElement { Name = "Internet Sales Amount" });
|
||||
olapReport.CategoricalElements.Add(measureElementColumn);
|
||||
}
|
||||
else
|
||||
{
|
||||
MeasureElements measureElement = new MeasureElements();
|
||||
measureElement.Elements.Add(new MeasureElement { UniqueName = "[Measures].[Internet Sales Amount]" });
|
||||
|
||||
DimensionElement dimensionElementRow = new DimensionElement();
|
||||
dimensionElementRow.Name = "Date";
|
||||
dimensionElementRow.AddLevel("Fiscal", "Fiscal Year");
|
||||
|
||||
DimensionElement dimensionElementColumn = new DimensionElement();
|
||||
dimensionElementColumn.Name = "Customer";
|
||||
dimensionElementColumn.AddLevel("Customer Geography", "Country");
|
||||
|
||||
olapReport.SeriesElements.Add(dimensionElementRow);
|
||||
olapReport.CategoricalElements.Add(dimensionElementColumn);
|
||||
olapReport.CategoricalElements.Add(measureElement);
|
||||
}
|
||||
return olapReport;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
<%@ ServiceHost Language="C#" Debug="true" Service="EJServices.Wcf.Pivotgrid.Relational" CodeBehind="Relational.svc.cs" %>
|
|
@ -1,199 +0,0 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2022.
|
||||
// Copyright Syncfusion Inc. 2001-2022. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using EJServices.Models;
|
||||
using Syncfusion.JavaScript;
|
||||
using Syncfusion.PivotAnalysis.Base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Data.SqlServerCe;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ServiceModel;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using OLAPUTILS = Syncfusion.JavaScript.Olap;
|
||||
namespace EJServices.Wcf.Pivotgrid
|
||||
{
|
||||
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "RelationalGrid" in code, svc and config file together.
|
||||
// NOTE: In order to launch WCF Test Client for testing this service, please select RelationalGrid.svc or RelationalGrid.svc.cs at the Solution Explorer and start debugging.
|
||||
public class Relational : IRelational
|
||||
{
|
||||
PivotGrid htmlHelper = new PivotGrid();
|
||||
JavaScriptSerializer serializer = new JavaScriptSerializer();
|
||||
Dictionary<string, object> dict = new Dictionary<string, object>();
|
||||
static int cultureIDInfoval = 1033;
|
||||
static string connectionString = ConfigurationManager.ConnectionStrings["Adventure Works"].ConnectionString + "locale identifier=" + cultureIDInfoval + ";";
|
||||
string conStringforDB = "DataSource=" + HttpContext.Current.Server.MapPath("~/App_Data/ReportsTable.sdf") + "; Persist Security Info=False";
|
||||
public Dictionary<string, object> CalculatedField(string action, string headerTag, string currentReport)
|
||||
{
|
||||
htmlHelper.PopulateData(currentReport);
|
||||
dict = htmlHelper.GetJsonData(action, ProductSales.GetSalesData(), null, headerTag);
|
||||
return dict;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> CellEditing(string action, string index, string valueHeaders, string summaryValues, string currentReport)
|
||||
{
|
||||
htmlHelper.PopulateData(currentReport);
|
||||
dict = htmlHelper.GetJsonData(action, ProductSales.GetSalesData(), index, summaryValues, valueHeaders);
|
||||
return dict;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> DeferUpdate(string action, string filterParams, string sortedHeaders, string currentReport)
|
||||
{
|
||||
htmlHelper.PopulateData(currentReport);
|
||||
dict = htmlHelper.GetJsonData(action, ProductSales.GetSalesData(), null, null, null, sortedHeaders, filterParams);
|
||||
return dict;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> DropNode(string action, string dropAxis, string headerTag, string sortedHeaders, string filterParams, string currentReport)
|
||||
{
|
||||
htmlHelper.PopulateData(currentReport);
|
||||
dict = htmlHelper.GetJsonData(action, ProductSales.GetSalesData(), dropAxis, headerTag, filterParams, sortedHeaders);
|
||||
return dict;
|
||||
}
|
||||
|
||||
public void Export(Stream stream)
|
||||
{
|
||||
System.IO.StreamReader sReader = new System.IO.StreamReader(stream);
|
||||
string args = System.Web.HttpContext.Current.Server.UrlDecode(sReader.ReadToEnd()).Remove(0, 5);
|
||||
Dictionary<string, string> gridParams = serializer.Deserialize<Dictionary<string, string>>(args);
|
||||
htmlHelper.PopulateData(gridParams["currentReport"]);
|
||||
string fileName = "Sample";
|
||||
htmlHelper.ExportPivotGrid(ProductSales.GetSalesData(), args, fileName, System.Web.HttpContext.Current.Response);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> FetchMembers(string action, string headerTag, string sortedHeaders, string currentReport)
|
||||
{
|
||||
htmlHelper.PopulateData(currentReport);
|
||||
dict = htmlHelper.GetJsonData(action, ProductSales.GetSalesData(), headerTag, sortedHeaders);
|
||||
return dict;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> Filtering(string action, string filterParams, string sortedHeaders, string currentReport)
|
||||
{
|
||||
htmlHelper.PopulateData(currentReport);
|
||||
dict = htmlHelper.GetJsonData(action, ProductSales.GetSalesData(), filterParams, sortedHeaders);
|
||||
return dict;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> Initialize(string action)
|
||||
{
|
||||
htmlHelper.PivotReport = BindDefaultData();
|
||||
dict = htmlHelper.GetJsonData(action, ProductSales.GetSalesData());
|
||||
return dict;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> LoadReportFromDB(string reportName, string operationalMode, string olapReport, string clientReports)
|
||||
{
|
||||
byte[] reportString = new byte[2 * 1024];
|
||||
PivotReport report = new PivotReport();
|
||||
var reports = "";
|
||||
string mode = operationalMode;
|
||||
Dictionary<string, object> dictionary = new Dictionary<string, object>();
|
||||
if (mode == "serverMode" && !string.IsNullOrEmpty(clientReports))
|
||||
{
|
||||
reports = clientReports;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (DataRow row in GetDataTable().Rows)
|
||||
{
|
||||
if ((row.ItemArray[0] as string).Equals(reportName))
|
||||
{
|
||||
if (mode == "clientMode")
|
||||
{
|
||||
reportString = (row.ItemArray[1] as byte[]);
|
||||
dictionary.Add("report", Encoding.UTF8.GetString(reportString));
|
||||
break;
|
||||
}
|
||||
else if (mode == "serverMode")
|
||||
{
|
||||
reports = OLAPUTILS.Utils.CompressData(row.ItemArray[1] as byte[]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (reports != "")
|
||||
{
|
||||
report = htmlHelper.DeserializedReports(reports);
|
||||
htmlHelper.PivotReport = report;
|
||||
dictionary = htmlHelper.GetJsonData("loadOperation", ProductSales.GetSalesData(), "Load Report", reportName);
|
||||
}
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> ModifyNodeState(string action, string headerTag, string dropAxis, string sortedHeaders, string filterParams, string currentReport)
|
||||
{
|
||||
htmlHelper.PopulateData(currentReport);
|
||||
dict = htmlHelper.GetJsonData(action, ProductSales.GetSalesData(), headerTag, dropAxis, filterParams, sortedHeaders);
|
||||
return dict;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> SaveReport(string reportName, string operationalMode, string olapReport, string clientReports)
|
||||
{
|
||||
string mode = operationalMode;
|
||||
bool isDuplicate = true;
|
||||
SqlCeConnection con = new SqlCeConnection() { ConnectionString = conStringforDB };
|
||||
con.Open();
|
||||
SqlCeCommand cmd1 = null;
|
||||
foreach (DataRow row in GetDataTable().Rows)
|
||||
{
|
||||
if ((row.ItemArray[0] as string).Equals(reportName))
|
||||
{
|
||||
isDuplicate = false;
|
||||
cmd1 = new SqlCeCommand("update ReportsTable set Report=@Reports where ReportName like @ReportName", con);
|
||||
}
|
||||
}
|
||||
if (isDuplicate)
|
||||
{
|
||||
cmd1 = new SqlCeCommand("insert into ReportsTable Values(@ReportName,@Reports)", con);
|
||||
}
|
||||
cmd1.Parameters.Add("@ReportName", reportName);
|
||||
//cmd1.Parameters.Add("@Reports", OLAPUTILS.Utils.GetReportStream(clientReports).ToArray());
|
||||
if (mode == "serverMode")
|
||||
cmd1.Parameters.Add("@Reports", OLAPUTILS.Utils.GetReportStream(clientReports).ToArray());
|
||||
else if (mode == "clientMode")
|
||||
cmd1.Parameters.Add("@Reports", Encoding.UTF8.GetBytes(clientReports).ToArray());
|
||||
cmd1.ExecuteNonQuery();
|
||||
con.Close();
|
||||
return null;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> Sorting(string action, string sortedHeaders, string currentReport)
|
||||
{
|
||||
htmlHelper.PopulateData(currentReport);
|
||||
dict = htmlHelper.GetJsonData(action, ProductSales.GetSalesData(), sortedHeaders);
|
||||
return dict;
|
||||
}
|
||||
|
||||
private PivotReport BindDefaultData()
|
||||
{
|
||||
PivotReport pivotSetting = new PivotReport();
|
||||
pivotSetting.PivotRows.Add(new PivotItem { FieldMappingName = "Date", FieldHeader = "Date", TotalHeader = "Total" });
|
||||
pivotSetting.PivotRows.Add(new PivotItem { FieldMappingName = "Product", FieldHeader = "Product", TotalHeader = "Total" });
|
||||
pivotSetting.PivotColumns.Add(new PivotItem { FieldMappingName = "Country", FieldHeader = "Country", TotalHeader = "Total" });
|
||||
pivotSetting.PivotColumns.Add(new PivotItem { FieldMappingName = "State", FieldHeader = "State", TotalHeader = "Total" });
|
||||
pivotSetting.PivotCalculations.Add(new PivotComputationInfo { CalculationName = "Amount", Description = "Amount", FieldHeader = "Amount", FieldName = "Amount", Format = "C", SummaryType = Syncfusion.PivotAnalysis.Base.SummaryType.DoubleTotalSum });
|
||||
return pivotSetting;
|
||||
}
|
||||
private DataTable GetDataTable()
|
||||
{
|
||||
SqlCeConnection con = new SqlCeConnection() { ConnectionString = conStringforDB };
|
||||
con.Open();
|
||||
DataSet dSet = new DataSet();
|
||||
new SqlCeDataAdapter("Select * from ReportsTable", con).Fill(dSet);
|
||||
con.Close();
|
||||
return dSet.Tables[0];
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2022.
|
||||
// Copyright Syncfusion Inc. 2001-2022. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ServiceModel;
|
||||
using System.Text;
|
||||
|
||||
namespace EJServices.Wcf.Pivottreemap
|
||||
{
|
||||
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IOlapTreeMap" in both code and config file together.
|
||||
[ServiceContract]
|
||||
public interface IOlap
|
||||
{
|
||||
[OperationContract]
|
||||
Dictionary<string, object> Initialize(string action, string currentReport, string customObject);
|
||||
[OperationContract]
|
||||
Dictionary<string, object> Drill(string action, string drillInfo, string olapReport, string customObject);
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
<%@ ServiceHost Language="C#" Debug="true" Service="EJServices.Wcf.Pivottreemap.Olap" CodeBehind="Olap.svc.cs" %>
|
|
@ -1,93 +0,0 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2022.
|
||||
// Copyright Syncfusion Inc. 2001-2022. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using Syncfusion.JavaScript;
|
||||
using Syncfusion.Olap.Manager;
|
||||
using Syncfusion.Olap.Reports;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ServiceModel;
|
||||
using System.Text;
|
||||
using System.Web.Script.Serialization;
|
||||
using OLAPUTILS = Syncfusion.JavaScript.Olap;
|
||||
|
||||
namespace EJServices.Wcf.Pivottreemap
|
||||
{
|
||||
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "OlapTreeMap" in code, svc and config file together.
|
||||
// NOTE: In order to launch WCF Test Client for testing this service, please select OlapTreeMap.svc or OlapTreeMap.svc.cs at the Solution Explorer and start debugging.
|
||||
public class Olap : IOlap
|
||||
{
|
||||
JavaScriptSerializer serializer = new JavaScriptSerializer();
|
||||
PivotTreeMap htmlHelper = new PivotTreeMap();
|
||||
int cultureIDInfovalval = 1033;
|
||||
string connectionString = ConfigurationManager.ConnectionStrings["Adventure Works"].ConnectionString + "locale identifier=1033;";
|
||||
public Dictionary<string, object> Initialize(string action, string currentReport, string customObject)
|
||||
{
|
||||
OlapDataManager DataManager = null;
|
||||
dynamic customData = serializer.Deserialize<dynamic>(customObject.ToString());
|
||||
var cultureIDInfo = new System.Globalization.CultureInfo(("en-US")).LCID;
|
||||
if (customData is Dictionary<string, object> && customData.ContainsKey("Language"))
|
||||
cultureIDInfo = new System.Globalization.CultureInfo((customData["Language"])).LCID;
|
||||
connectionString = connectionString.Replace("" + cultureIDInfovalval + "", "" + cultureIDInfo + "");
|
||||
cultureIDInfovalval = cultureIDInfo;
|
||||
DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.Culture = new System.Globalization.CultureInfo((cultureIDInfo));
|
||||
DataManager.SetCurrentReport(CreateOlapReport());
|
||||
return htmlHelper.GetJsonData(action, DataManager);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> Drill(string action, string drillInfo, string olapReport, string customObject)
|
||||
{
|
||||
OlapDataManager DataManager = new OlapDataManager(connectionString);
|
||||
dynamic customData = serializer.Deserialize<dynamic>(customObject.ToString());
|
||||
if (customData is Dictionary<string, object> && customData.ContainsKey("Language"))
|
||||
{
|
||||
var cultureIDInfo = new System.Globalization.CultureInfo((customData["Language"])).LCID;
|
||||
connectionString = connectionString.Replace("" + cultureIDInfovalval + "", "" + cultureIDInfo + "");
|
||||
cultureIDInfovalval = cultureIDInfo;
|
||||
DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.Culture = new System.Globalization.CultureInfo((customData["Language"]));
|
||||
}
|
||||
else
|
||||
DataManager = new OlapDataManager(connectionString);
|
||||
DataManager.SetCurrentReport(OLAPUTILS.Utils.DeserializeOlapReport(olapReport));
|
||||
return htmlHelper.GetJsonData(action, DataManager, drillInfo);
|
||||
}
|
||||
|
||||
private OlapReport CreateOlapReport()
|
||||
{
|
||||
OlapReport olapReport = new OlapReport();
|
||||
olapReport.Name = "Default Report";
|
||||
olapReport.CurrentCubeName = "Adventure Works";
|
||||
|
||||
DimensionElement dimensionElementColumn = new DimensionElement();
|
||||
//Specifying the Name for the Dimension Element
|
||||
dimensionElementColumn.Name = "Date";
|
||||
dimensionElementColumn.AddLevel("Fiscal", "Fiscal Year");
|
||||
|
||||
MeasureElements measureElementColumn = new MeasureElements();
|
||||
//Specifying the Name for the Measure Element
|
||||
measureElementColumn.Elements.Add(new MeasureElement { Name = "Customer Count" });
|
||||
|
||||
DimensionElement dimensionElementRow = new DimensionElement();
|
||||
//Specifying the Dimension Name
|
||||
dimensionElementRow.Name = "Customer";
|
||||
dimensionElementRow.AddLevel("Customer Geography", "Country");
|
||||
|
||||
///Adding Row Members
|
||||
olapReport.SeriesElements.Add(dimensionElementRow);
|
||||
///Adding Column Members
|
||||
olapReport.CategoricalElements.Add(dimensionElementColumn);
|
||||
///Adding Measure Element
|
||||
olapReport.CategoricalElements.Add(measureElementColumn);
|
||||
return olapReport;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
|
||||
|
||||
<%@ ServiceHost Language="C#" Factory="System.ServiceModel.Activation.WebServiceHostFactory, System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Service="EJServices.Wcf.TreeGridGantt.TreeGantt" %>
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <copyright file="WebDataService.svc.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
using EJServices.Helpers;
|
||||
using EJServices.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Services;
|
||||
using System.Data.Services.Common;
|
||||
using System.Linq;
|
||||
using System.ServiceModel.Web;
|
||||
using System.Web;
|
||||
|
||||
namespace EJServices.Wcf.TreeGridGantt
|
||||
{
|
||||
[JsonpSupportBehavior]
|
||||
public class TreeGantt : DataService<SelfReferenceDatasDataContext>
|
||||
{
|
||||
// This method is called only once to initialize service-wide policies.
|
||||
public static void InitializeService(DataServiceConfiguration config)
|
||||
{
|
||||
// TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
|
||||
// Examples:
|
||||
// config.SetEntitySetAccessRule("MyEntityset", EntitySetRights.AllRead);
|
||||
// config.SetServiceOperationAccessRule("MyServiceOperation", ServiceOperationRights.All);
|
||||
config.SetEntitySetAccessRule("*", EntitySetRights.All);
|
||||
config.SetServiceOperationAccessRule("*", ServiceOperationRights.All);
|
||||
config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
|
||||
config.UseVerboseErrors = true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
@import url("../ej.widgets.core.bootstrap.min.css");
|
||||
@import url("ej.theme.min.css");
|
||||
|
Двоичные данные
content/ejthemes/bootstrap-theme/images/ajax-loader.gif
До Ширина: | Высота: | Размер: 1.5 KiB |
Двоичные данные
content/ejthemes/bootstrap-theme/images/checkedtick.png
До Ширина: | Высота: | Размер: 15 KiB |
Двоичные данные
content/ejthemes/bootstrap-theme/images/drop-sibling.png
До Ширина: | Высота: | Размер: 963 B |
Двоичные данные
content/ejthemes/bootstrap-theme/images/rating-star.png
До Ширина: | Высота: | Размер: 3.5 KiB |
Двоичные данные
content/ejthemes/bootstrap-theme/images/rotator-icon.png
До Ширина: | Высота: | Размер: 4.6 KiB |
Двоичные данные
content/ejthemes/bootstrap-theme/images/slider-tick.png
До Ширина: | Высота: | Размер: 158 B |
Двоичные данные
content/ejthemes/bootstrap-theme/images/waitingpopup.gif
До Ширина: | Высота: | Размер: 6.9 KiB |
Двоичные данные
content/ejthemes/common-images/darktheme/colorpicker_dark.png
До Ширина: | Высота: | Размер: 9.0 KiB |
Двоичные данные
content/ejthemes/common-images/diagram/Rotate.cur
До Ширина: | Высота: | Размер: 326 B |
Двоичные данные
content/ejthemes/common-images/diagram/diagram_context.png
До Ширина: | Высота: | Размер: 2.8 KiB |
Двоичные данные
content/ejthemes/common-images/diagram/diagram_context1.png
До Ширина: | Высота: | Размер: 2.3 KiB |
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="36px" height="36px" viewBox="0 0 36 36" style="enable-background:new 0 0 36 36;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#6B6B6B;}
|
||||
</style>
|
||||
<rect x="5" y="20" class="st0" width="26" height="1"/>
|
||||
<rect x="5" y="25" class="st0" width="26" height="1"/>
|
||||
<rect x="5" y="30" class="st0" width="26" height="1"/>
|
||||
</svg>
|
До Ширина: | Высота: | Размер: 598 B |
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="36px" height="36px" viewBox="0 0 36 36" style="enable-background:new 0 0 36 36;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#6B6B6B;}
|
||||
</style>
|
||||
<rect x="5" y="12" class="st0" width="26" height="1"/>
|
||||
<rect x="5" y="17" class="st0" width="26" height="1"/>
|
||||
<rect x="5" y="22" class="st0" width="26" height="1"/>
|
||||
</svg>
|
До Ширина: | Высота: | Размер: 598 B |
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="36px" height="36px" viewBox="0 0 36 36" style="enable-background:new 0 0 36 36;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#6B6B6B;}
|
||||
</style>
|
||||
<rect x="5" y="5" class="st0" width="26" height="1"/>
|
||||
<rect x="5" y="10" class="st0" width="26" height="1"/>
|
||||
<rect x="5" y="15" class="st0" width="26" height="1"/>
|
||||
</svg>
|
До Ширина: | Высота: | Размер: 597 B |
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="36px" height="36px" viewBox="0 0 36 36" style="enable-background:new 0 0 36 36;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#6B6B6B;}
|
||||
</style>
|
||||
<rect x="5" y="20" class="st0" width="26" height="1"/>
|
||||
<rect x="5" y="25" class="st0" width="26" height="1"/>
|
||||
<rect x="5" y="30" class="st0" width="16" height="1"/>
|
||||
<path class="st0" d="M22,6v9h-9V6H22 M23,5H12v11h11V5L23,5z"/>
|
||||
<polygon class="st0" points="18,6 17,6 17,15 18,15 18,6 "/>
|
||||
<polygon class="st0" points="22,10 13,10 13,11 22,11 22,10 "/>
|
||||
</svg>
|
До Ширина: | Высота: | Размер: 784 B |
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="36px" height="36px" viewBox="0 0 36 36" style="enable-background:new 0 0 36 36;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#6B6B6B;}
|
||||
</style>
|
||||
<rect x="5" y="20" class="st0" width="26" height="1"/>
|
||||
<rect x="5" y="25" class="st0" width="26" height="1"/>
|
||||
<rect x="5" y="30" class="st0" width="16" height="1"/>
|
||||
<path class="st0" d="M15,6v9H6V6H15 M16,5H5v11h11V5L16,5z"/>
|
||||
<polygon class="st0" points="11,6 10,6 10,15 11,15 11,6 "/>
|
||||
<polygon class="st0" points="15,10 6,10 6,11 15,11 15,10 "/>
|
||||
</svg>
|
До Ширина: | Высота: | Размер: 780 B |
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="36px" height="36px" viewBox="0 0 36 36" style="enable-background:new 0 0 36 36;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#6B6B6B;}
|
||||
</style>
|
||||
<rect x="5" y="20" class="st0" width="26" height="1"/>
|
||||
<rect x="5" y="25" class="st0" width="26" height="1"/>
|
||||
<rect x="5" y="30" class="st0" width="16" height="1"/>
|
||||
<path class="st0" d="M30,6v9h-9V6H30 M31,5H20v11h11V5L31,5z"/>
|
||||
<polygon class="st0" points="26,6 25,6 25,15 26,15 26,6 "/>
|
||||
<polygon class="st0" points="30,10 21,10 21,11 30,11 30,10 "/>
|
||||
</svg>
|
До Ширина: | Высота: | Размер: 784 B |
Двоичные данные
content/ejthemes/common-images/ejicons.eot
До Ширина: | Высота: | Размер: 366 KiB |
Двоичные данные
content/ejthemes/common-images/ejicons.ttf
Двоичные данные
content/ejthemes/common-images/ejicons.woff
Двоичные данные
content/ejthemes/common-images/fileexplorer/file_icons.png
До Ширина: | Высота: | Размер: 35 KiB |
Двоичные данные
content/ejthemes/common-images/grid/dropPointer.cur
До Ширина: | Высота: | Размер: 2.4 KiB |
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 45 45" style="enable-background:new 0 0 45 45;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#F0F2F4;}
|
||||
.st1{fill:#C4C4C4;}
|
||||
.st2{fill:#EAEAEA;}
|
||||
</style>
|
||||
<rect x="0.8" y="0.7" class="st0" width="43.5" height="43.7"/>
|
||||
<path class="st1" d="M34.6,28.5c-3.2,3-7.4,4.9-12.1,4.9s-8.9-1.9-12.1-4.9c-4.7,3.5-8.1,8.9-9.3,15.2h42.8
|
||||
C42.7,37.3,39.3,31.9,34.6,28.5z"/>
|
||||
<circle class="st1" cx="22.5" cy="16" r="10.4"/>
|
||||
<path class="st2" d="M45,45H0V0h45V45z M1,44h43V1H1V44z"/>
|
||||
</svg>
|
До Ширина: | Высота: | Размер: 760 B |
Двоичные данные
content/ejthemes/common-images/lighttheme/colorpicker_light.png
До Ширина: | Высота: | Размер: 9.0 KiB |
Двоичные данные
content/ejthemes/common-images/maps/Arrow_Bootom.png
До Ширина: | Высота: | Размер: 1.6 KiB |
Двоичные данные
content/ejthemes/common-images/maps/Arrow_Bootom_hover.png
До Ширина: | Высота: | Размер: 1.6 KiB |
Двоичные данные
content/ejthemes/common-images/maps/Arrow_Left.png
До Ширина: | Высота: | Размер: 1.7 KiB |
Двоичные данные
content/ejthemes/common-images/maps/Arrow_Left_hover.png
До Ширина: | Высота: | Размер: 1.7 KiB |
Двоичные данные
content/ejthemes/common-images/maps/Arrow_Right.png
До Ширина: | Высота: | Размер: 1.6 KiB |
Двоичные данные
content/ejthemes/common-images/maps/Arrow_Right_hover.png
До Ширина: | Высота: | Размер: 1.6 KiB |
Двоичные данные
content/ejthemes/common-images/maps/Arrow_Top.png
До Ширина: | Высота: | Размер: 1.6 KiB |
Двоичные данные
content/ejthemes/common-images/maps/Arrow_Top_hover.png
До Ширина: | Высота: | Размер: 1.7 KiB |
Двоичные данные
content/ejthemes/common-images/maps/Bar.png
До Ширина: | Высота: | Размер: 1.1 KiB |
Двоичные данные
content/ejthemes/common-images/maps/Home.png
До Ширина: | Высота: | Размер: 1.8 KiB |
Двоичные данные
content/ejthemes/common-images/maps/Home_hover.png
До Ширина: | Высота: | Размер: 1.7 KiB |
Двоичные данные
content/ejthemes/common-images/maps/Home_hover_lime.png
До Ширина: | Высота: | Размер: 20 KiB |
Двоичные данные
content/ejthemes/common-images/maps/Home_hover_saffron.png
До Ширина: | Высота: | Размер: 20 KiB |
Двоичные данные
content/ejthemes/common-images/maps/Home_lime.png
До Ширина: | Высота: | Размер: 20 KiB |
Двоичные данные
content/ejthemes/common-images/maps/Home_saffron.png
До Ширина: | Высота: | Размер: 20 KiB |
Двоичные данные
content/ejthemes/common-images/maps/Navicatior.png
До Ширина: | Высота: | Размер: 1.0 KiB |
Двоичные данные
content/ejthemes/common-images/maps/Zoom-In.png
До Ширина: | Высота: | Размер: 1.2 KiB |