Änderungen JSON

This commit is contained in:
ja
2022-01-17 16:03:17 +01:00
parent 9af9b2e2e1
commit 4cd477059e
3 changed files with 2025 additions and 2003 deletions

View File

@@ -367,7 +367,8 @@
dtData.push([
this.SDL,
this.Bez,
this.Gueltigbis
this.Gueltigbis,
this.kart
]);
});
@@ -380,11 +381,12 @@
var dtData = [];
// Data tables requires all data to be stuffed into a generic jagged array, so loop through our
// typed object and create one.
$.each(result, function () {
$.each(result.d, function () {
dtData.push([
this.SDL,
this.Bez,
this.Gueltigbis
this.Gueltigbis,
this.Kartnr
]);
});
@@ -394,7 +396,43 @@
});
}
</script>
<script type="text/javascript">
<script type="text/javascript">
$("#<%=tablemain.ClientID%>").dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bServerSide": true,
"sAjaxSource": "LKWs.aspx/filltable2",
"fnServerData": function (sSource, aoData, fnCallback) {
$.ajax({
"type": "POST",
"dataType": 'json',
"contentType": "application/json; charset=utf-8",
"url": sSource,
"data": "{'sEcho': '" + aoData[0].value + "'}",
"success": function (msg) {
fnCallback(msg.d);
}
});
}
});
$("#<%=tablemain_m.ClientID%>").dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bServerSide": true,
"sAjaxSource": "LKWs.aspx/filltable2_M",
"fnServerData": function (sSource, aoData, fnCallback) {
$.ajax({
"type": "POST",
"dataType": 'json',
"contentType": "application/json; charset=utf-8",
"url": sSource,
"data": "{'sEcho': '" + aoData[0].value + "'}",
"success": function (msg) {
fnCallback(msg.d);
}
});
}
});
function doPostBack(id) {
let Speditionslabel = document.getElementById('<%=lbl_sped_Placeholder.ClientID%>');
let natplaceholder = document.getElementById('<%=lbl_Placeholder.ClientID%>');
@@ -443,8 +481,7 @@
error: function (jqXHR, textStatus, errorThrown) {
alert("Status:" + jqXHR.status + "\nStatusText: " + textStatus + "\nError:" + errorThrown);
}
});
});
//filltable2(id.split(',')[0])
}
function doPostBack_M(id_M) {
@@ -481,13 +518,13 @@
data: JSON.stringify(data_m),
async: true,
success: function (data_m) {
result = data_m.d;
result = data_m;
// addheader();
// let strHeader_M = '<tr style="background-color:#043381;color:#fff"><th><td style="font-weight:600; color:white">SDL-Nr</td></th><th><td style="font-weight:600; color:white">Bezeichnung</td></th><th><td style="font-weight:600; color:white">Gueltig bis</td></th><th><td style="font-weight:600; color:white">Karten-Nummer</td></th></tr>';
// let strHTML = ''
alert('Horray! 200 status code!');
renderTable_m(result)
renderTable_m(result.d)
//alert(strHTML)
//$('#<%'=tablemain_m.ClientID%>').append(strHeader_M);
// $('#<%'=tablemain_m.ClientID%>').append(strHTML);