formattedlist implementiert zu besser regulierbarer Übersicht der JSON Tabellenrückgabe.

This commit is contained in:
ja
2022-01-17 16:56:17 +01:00
parent 4cd477059e
commit 1e50514513
3 changed files with 1520 additions and 1486 deletions

View File

@@ -372,9 +372,23 @@
]); ]);
}); });
$('#<%=tablemain.ClientID%>').dataTable({ $("#<%=tablemain.ClientID%>").dataTable({
'aaData': dtData, "bJQueryUI": true,
"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);
}
});
}
}); });
} }
function renderTable_M(result) { function renderTable_M(result) {
@@ -390,49 +404,29 @@
]); ]);
}); });
$('#<%=tablemain_m.ClientID%>').dataTable({ $("#<%=tablemain_m.ClientID%>").dataTable({
'aaData': dtData, "bJQueryUI": true,
"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);
}
});
}
}); });
} }
</script> </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) { function doPostBack(id) {
let Speditionslabel = document.getElementById('<%=lbl_sped_Placeholder.ClientID%>'); let Speditionslabel = document.getElementById('<%=lbl_sped_Placeholder.ClientID%>');
let natplaceholder = document.getElementById('<%=lbl_Placeholder.ClientID%>'); let natplaceholder = document.getElementById('<%=lbl_Placeholder.ClientID%>');

View File

@@ -517,7 +517,46 @@ Partial Class LKWS
Me.Vermerk = Vermerk Me.Vermerk = Vermerk
End Sub End Sub
End Class End Class
Public Class FormattedList
Dim FormattedList As New FormattedList()
Private _sEcho As String
Private _iTotalRecords As String
Private _ivisibleRecords As String
Public Function GetivisibleRecords() As String
Return _ivisibleRecords
End Function
Public Sub SetivisibleRecords(AutoPropertyValue As String)
_ivisibleRecords = AutoPropertyValue
End Sub
Public Function GetiTotalRecords() As String
Return _iTotalRecords
End Function
Public Sub SetiTotalRecords(AutoPropertyValue As String)
_iTotalRecords = AutoPropertyValue
End Sub
Public Function GetsEcho() As String
Return _sEcho
End Function
Public Sub SetsEcho(AutoPropertyValue As String)
_sEcho = AutoPropertyValue
End Sub
Private _aaData As New List(Of String)
Public Property AaData As List(Of String)
Get
Return _aaData
End Get
Set(value As List(Of String))
_aaData = value
End Set
End Property
End Class
<WebMethod> <WebMethod>
<ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=False)> <ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=False)>
Public Shared Function filltable2(Kennzeichen As String) As List(Of Entry) Public Shared Function filltable2(Kennzeichen As String) As List(Of Entry)
@@ -543,6 +582,7 @@ Partial Class LKWS
Dim Entrytemp As Entry = New Entry(l2.SDLNr.ToString, strtempKat, strtempGueltigBis, strtempKartenNr) Dim Entrytemp As Entry = New Entry(l2.SDLNr.ToString, strtempKat, strtempGueltigBis, strtempKartenNr)
list.Add(Entrytemp) list.Add(Entrytemp)
Next Next
Return list Return list
End Function End Function