Table wird nicht befüllt Fehlersuche

This commit is contained in:
ja
2022-01-10 10:27:57 +01:00
parent d865fb9ed1
commit 1dd3956411
2 changed files with 10 additions and 10 deletions

View File

@@ -351,12 +351,12 @@
alert("Status:" + jqXHR.status + "\nStatusText: " + textStatus + "\nError:" + errorThrown); alert("Status:" + jqXHR.status + "\nStatusText: " + textStatus + "\nError:" + errorThrown);
} }
}); });
function OnSuccess(success) { function OnSuccess(result) {
addheader(); addheader();
alert('Horray! 200 status code!'); alert('Horray! 200 status code!');
alert(success.rows.length) alert(result.rows.length)
for (let i = 0; i < success.rows.length; i++) { for (let i = 0; i < result.rows.length; i++) {
let row = $('<tr><td>' + success.rows[i].SDL + '</td><td>' + success.rows[i].Bez + '</td><td>' + success.rows[i].DateGueltig + '</td><td>' + success.rows[i].KartNr + '</td></tr>'); let row = $('<tr><td>' + result.rows[i].SDL + '</td><td>' + result.rows[i].Bez + '</td><td>' + result.rows[i].DateGueltig + '</td><td>' + result.rows[i].KartNr + '</td></tr>');
alert(row) alert(row)
} }
} }
@@ -402,12 +402,12 @@
alert("Status:" + jqXHR.status + "\nStatusText: " + textStatus + "\nError:" + errorThrown); alert("Status:" + jqXHR.status + "\nStatusText: " + textStatus + "\nError:" + errorThrown);
} }
}); });
function OnSuccess_M(success_M) { function OnSuccess_M(result_M) {
addheader_M(); addheader_M();
alert('Horray! 200 status code!'); alert('Horray! 200 status code!');
alert(success_M.rows.length) alert(result_M.rows.length)
for (let i = 0; i < success_M.rows.length; i++) { for (let i = 0; i < result_M.rows.length; i++) {
let row = $('<tr><td>' + success_M.rows[i].SDL + '</td><td>' + success_M.rows[i].Bez + '</td><td>' + success_M.rows[i].DateGueltig + '</td><td>' + success_M.rows[i].KartNr + '</td></tr>'); let row = $('<tr><td>' + result_M.rows[i].SDL + '</td><td>' + result_M.rows[i].Bez + '</td><td>' + result_M.rows[i].DateGueltig + '</td><td>' + result_M.rows[i].KartNr + '</td></tr>');
alert(row) alert(row)
} }
} }

View File

@@ -402,6 +402,7 @@ Partial Class LKWS
<ScriptMethod(ResponseFormat:=ResponseFormat.Json)> <ScriptMethod(ResponseFormat:=ResponseFormat.Json)>
Public Shared Function filltable2(Kennzeichen As String) As Table Public Shared Function filltable2(Kennzeichen As String) As Table
Dim tbl As Table = New Table Dim tbl As Table = New Table
tbl.EnableViewState = True
Dim list2 As List(Of VERAG_PROG_ALLGEMEIN.cSDL) = VERAG_PROG_ALLGEMEIN.cSDL.GET_LIST_WEB_LKW(401940, Kennzeichen) Dim list2 As List(Of VERAG_PROG_ALLGEMEIN.cSDL) = VERAG_PROG_ALLGEMEIN.cSDL.GET_LIST_WEB_LKW(401940, Kennzeichen)
For Each l2 In list2 For Each l2 In list2
Dim tc_SDLNr As TableCell = New TableCell Dim tc_SDLNr As TableCell = New TableCell
@@ -421,7 +422,6 @@ Partial Class LKWS
tr.Attributes.Add("style", "background-color:#ff2500;color:#fff;font-weight:400;") tr.Attributes.Add("style", "background-color:#ff2500;color:#fff;font-weight:400;")
tbl.Rows.Add(tr) tbl.Rows.Add(tr)
Next Next
tbl.EnableViewState = True
Return tbl Return tbl
End Function End Function
<WebMethod> <WebMethod>
@@ -429,6 +429,7 @@ Partial Class LKWS
Public Shared Function filltable2_M(Kennzeichen As String) As Table Public Shared Function filltable2_M(Kennzeichen As String) As Table
Dim list2 As List(Of VERAG_PROG_ALLGEMEIN.cSDL) = VERAG_PROG_ALLGEMEIN.cSDL.GET_LIST_WEB_LKW(401940, Kennzeichen) Dim list2 As List(Of VERAG_PROG_ALLGEMEIN.cSDL) = VERAG_PROG_ALLGEMEIN.cSDL.GET_LIST_WEB_LKW(401940, Kennzeichen)
Dim Tbl As New Table Dim Tbl As New Table
Tbl.EnableViewState = True
For Each l2 In list2 For Each l2 In list2
Dim tc_SDLNr As TableCell = New TableCell Dim tc_SDLNr As TableCell = New TableCell
Dim tc_Bezeichnung As TableCell = New TableCell Dim tc_Bezeichnung As TableCell = New TableCell
@@ -447,7 +448,6 @@ Partial Class LKWS
tr_M.Attributes.Add("style", "background-color:#ff2500;color:#fff;font-weight:400;") tr_M.Attributes.Add("style", "background-color:#ff2500;color:#fff;font-weight:400;")
Tbl.Rows.Add(tr_M) Tbl.Rows.Add(tr_M)
Next Next
Tbl.EnableViewState = True
Return Tbl Return Tbl
End Function End Function
End Class End Class