Table Generation in OnSuccess-Funktion implementiert.
This commit is contained in:
@@ -323,7 +323,7 @@
|
|||||||
}
|
}
|
||||||
Speditionslabel.textContent = id.split(',')[0];
|
Speditionslabel.textContent = id.split(',')[0];
|
||||||
natplaceholder.textContent = id.split(',')[1];
|
natplaceholder.textContent = id.split(',')[1];
|
||||||
addheader()
|
|
||||||
//debugger
|
//debugger
|
||||||
|
|
||||||
//for (let i = 0; i <= 5; i++) {
|
//for (let i = 0; i <= 5; i++) {
|
||||||
@@ -335,7 +335,7 @@
|
|||||||
// Pagemethods.filltable2(<%' =tbl_mainpage %> , SDL, Bez, Datguenstig, KartNr)
|
// Pagemethods.filltable2(<%' =tbl_mainpage %> , SDL, Bez, Datguenstig, KartNr)
|
||||||
//}
|
//}
|
||||||
var data = {
|
var data = {
|
||||||
"Kennz": id.split(',')[0],
|
"Kennzeichen": id.split(',')[0],
|
||||||
"NatLKW": id.split(',')[1]
|
"NatLKW": id.split(',')[1]
|
||||||
};
|
};
|
||||||
data = JSON.stringify(data);
|
data = JSON.stringify(data);
|
||||||
@@ -354,8 +354,12 @@
|
|||||||
});
|
});
|
||||||
function OnSuccess(success) {
|
function OnSuccess(success) {
|
||||||
alert('horray! 200 status code!');
|
alert('horray! 200 status code!');
|
||||||
//alert(success)
|
addheader();
|
||||||
table.innerHTML = success;
|
for (var i = 0; i < success.length; i++) {
|
||||||
|
var row = $('<tr><td>' + success[i].SDLNr + '</td><td>' + success[i].Bez + '</td><td>' + data[i].DateGueltig + '</td><td>' + data[i].KartNr + '</td></tr>');
|
||||||
|
table.append(row);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
function OnFailure(error) {
|
function OnFailure(error) {
|
||||||
alert(error);
|
alert(error);
|
||||||
@@ -381,7 +385,7 @@
|
|||||||
}
|
}
|
||||||
Speditionslabel.textContent = id_M.split(',')[0];
|
Speditionslabel.textContent = id_M.split(',')[0];
|
||||||
natplaceholder.textContent = id_M.split(',')[1];
|
natplaceholder.textContent = id_M.split(',')[1];
|
||||||
addheader_M();
|
|
||||||
//debugger
|
//debugger
|
||||||
|
|
||||||
//for (let i = 0; i <= 5; i++) {
|
//for (let i = 0; i <= 5; i++) {
|
||||||
@@ -393,13 +397,13 @@
|
|||||||
// Pagemethods.filltable2(<%' =tbl_mainpage_M%> , SDL, Bez, Datguenstig, KartNr)
|
// Pagemethods.filltable2(<%' =tbl_mainpage_M%> , SDL, Bez, Datguenstig, KartNr)
|
||||||
//}
|
//}
|
||||||
var data = {
|
var data = {
|
||||||
"Kennz": id.split(',')[0],
|
"Kennzeichen": id_M.split(',')[0],
|
||||||
"NatLKW": id.split(',')[1]
|
"NatLKW": id_M.split(',')[1]
|
||||||
};
|
};
|
||||||
data = JSON.stringify(data);
|
data = JSON.stringify(data);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "LKWs.aspx/filltable2",
|
url: "LKWs.aspx/filltable2_M",
|
||||||
contentType: "application/json; charset=utf-8",
|
contentType: "application/json; charset=utf-8",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
data: data,
|
data: data,
|
||||||
@@ -412,8 +416,11 @@
|
|||||||
});
|
});
|
||||||
function OnSuccess(success) {
|
function OnSuccess(success) {
|
||||||
alert('horray! 200 status code!');
|
alert('horray! 200 status code!');
|
||||||
//alert(success)
|
addheader_M();
|
||||||
table.innerHTML = success;
|
for (var i = 0; i < success.length; i++) {
|
||||||
|
var row = $('<tr><td>' + success[i].SDLNr + '</td><td>' + success[i].Bez + '</td><td>' + data[i].DateGueltig + '</td><td>' + data[i].KartNr + '</td></tr>');
|
||||||
|
table_M.append(row);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function OnFailure(error) {
|
function OnFailure(error) {
|
||||||
alert(error);
|
alert(error);
|
||||||
|
|||||||
@@ -392,7 +392,7 @@ Partial Class LKWS
|
|||||||
strtemp2 = l3.Nationalität
|
strtemp2 = l3.Nationalität
|
||||||
End If
|
End If
|
||||||
tbl_mainpage_M.Rows.Clear()
|
tbl_mainpage_M.Rows.Clear()
|
||||||
tr1_M.Attributes.Add("nclick", "Javascript:doPostBack_M('""" & tr1_M.Cells.Item(0).Text & """,""" & strtemp2 & """')")
|
tr1_M.Attributes.Add("onclick", "Javascript:doPostBack_M('""" & tr1_M.Cells.Item(0).Text & """,""" & strtemp2 & """')")
|
||||||
cnt += 1
|
cnt += 1
|
||||||
tbl_2.Rows.Add(tr1_M)
|
tbl_2.Rows.Add(tr1_M)
|
||||||
Next
|
Next
|
||||||
@@ -424,7 +424,7 @@ Partial Class LKWS
|
|||||||
Return tbl
|
Return tbl
|
||||||
End Function
|
End Function
|
||||||
<WebMethod>
|
<WebMethod>
|
||||||
<ScriptMethod(ResponseFormat:=ResponseFormat.Json)>
|
<ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=False)>
|
||||||
Public Shared Function filltable_M(Kennzeichen As String) As Table
|
Public Shared Function filltable_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)
|
||||||
@@ -447,6 +447,7 @@ 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
|
||||||
|
|
||||||
Return Tbl
|
Return Tbl
|
||||||
End Function
|
End Function
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user