Umschreiben nach Vorschrift JSON Dokumentation

This commit is contained in:
ja
2022-01-10 13:57:12 +01:00
parent d8e7f8acc5
commit 3f7b85ac2b
2 changed files with 67 additions and 74 deletions

View File

@@ -400,54 +400,38 @@ Partial Class LKWS
<WebMethod>
<ScriptMethod(ResponseFormat:=ResponseFormat.Json)>
Public Shared Function filltable2(Kennzeichen As String) As Table
Dim tbl As Table = New Table
tbl.EnableViewState = True
Public Shared Function filltable2(Kennzeichen As String) As List(Of Entry)
Dim list As List(Of Entry) = New List(Of Entry)
Dim list2 As List(Of VERAG_PROG_ALLGEMEIN.cSDL) = VERAG_PROG_ALLGEMEIN.cSDL.GET_LIST_WEB_LKW(401940, Kennzeichen)
For Each l2 In list2
Dim tc_SDLNr As TableCell = New TableCell
Dim tc_Bezeichnung As TableCell = New TableCell
Dim tc_GueltigBis As TableCell = New TableCell
Dim tc_KartNr As TableCell = New TableCell
Dim tr As TableRow = New TableRow
tc_SDLNr.Text = l2.SDLNr.ToString
tc_Bezeichnung.Text = l2.Kategorie.ToString
tc_GueltigBis.Text = l2.GültigBis.ToString
tc_KartNr.Text = l2.KartenNr.ToString
tr.Cells.Add(tc_SDLNr)
tr.Cells.Add(tc_Bezeichnung)
tr.Cells.Add(tc_GueltigBis)
tr.Cells.Add(tc_KartNr)
tr.Attributes.Add("style", "background-color:#ff2500;color:#fff;font-weight:400;")
tbl.Rows.Add(tr)
Dim Entrytemp As New Entry
Entrytemp.SDL = l2.SDLNr.ToString
Entrytemp.Bez = l2.Kategorie.ToString
Entrytemp.Gueltigbis = l2.GültigBis.ToString
Entrytemp.KartNr = l2.KartenNr.ToString
list.Add(Entrytemp)
Next
Return tbl
Return list
End Function
Public Class Entry
Public SDL As String = String.Empty
Public Bez As String = String.Empty
Public Gueltigbis As String = String.Empty
Public KartNr As String = String.Empty
End Class
<WebMethod>
<ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=False)>
Public Shared Function filltable2_M(Kennzeichen As String) As Table
Public Shared Function filltable2_M(Kennzeichen As String) As List(Of Entry)
Dim list As List(Of Entry) = New List(Of Entry)
Dim list2 As List(Of VERAG_PROG_ALLGEMEIN.cSDL) = VERAG_PROG_ALLGEMEIN.cSDL.GET_LIST_WEB_LKW(401940, Kennzeichen)
Dim Tbl As New Table
Tbl.EnableViewState = True
For Each l2 In list2
Dim tc_SDLNr As TableCell = New TableCell
Dim tc_Bezeichnung As TableCell = New TableCell
Dim tc_GueltigBis As TableCell = New TableCell
Dim tc_KartNr As TableCell = New TableCell
Dim tr_M As TableRow = New TableRow
tc_SDLNr.Text = l2.SDLNr.ToString
tc_Bezeichnung.Text = l2.Kategorie.ToString
tc_GueltigBis.Text = l2.GültigBis.ToString
tc_KartNr.Text = l2.KartenNr.ToString
tr_M.Cells.Add(tc_SDLNr)
tr_M.Cells.Add(tc_Bezeichnung)
tr_M.Cells.Add(tc_GueltigBis)
tr_M.Cells.Add(tc_KartNr)
tr_M.Attributes.Add("style", "background-color:#ff2500;color:#fff;font-weight:400;")
Tbl.Rows.Add(tr_M)
Dim Entrytemp As New Entry
Entrytemp.SDL = l2.SDLNr.ToString
Entrytemp.Bez = l2.Kategorie.ToString
Entrytemp.Gueltigbis = l2.GültigBis.ToString
Entrytemp.KartNr = l2.KartenNr.ToString
list.Add(Entrytemp)
Next
Return Tbl
Return list
End Function
End Class