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,31 +372,6 @@
]);
});
$('#<%=tablemain.ClientID%>').dataTable({
'aaData': dtData,
"bJQueryUI": true
});
}
function renderTable_M(result) {
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.d, function () {
dtData.push([
this.SDL,
this.Bez,
this.Gueltigbis,
this.Kartnr
]);
});
$('#<%=tablemain_m.ClientID%>').dataTable({
'aaData': dtData,
"bJQueryUI": true
});
}
</script>
<script type="text/javascript">
$("#<%=tablemain.ClientID%>").dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
@@ -415,6 +390,20 @@
});
}
});
}
function renderTable_M(result) {
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.d, function () {
dtData.push([
this.SDL,
this.Bez,
this.Gueltigbis,
this.Kartnr
]);
});
$("#<%=tablemain_m.ClientID%>").dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
@@ -433,6 +422,11 @@
});
}
});
}
</script>
<script type="text/javascript">
function doPostBack(id) {
let Speditionslabel = document.getElementById('<%=lbl_sped_Placeholder.ClientID%>');
let natplaceholder = document.getElementById('<%=lbl_Placeholder.ClientID%>');

View File

@@ -517,7 +517,46 @@ Partial Class LKWS
Me.Vermerk = Vermerk
End Sub
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>
<ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=False)>
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)
list.Add(Entrytemp)
Next
Return list
End Function