From 18f140be29b1b58f4138520de4420c8956be7367 Mon Sep 17 00:00:00 2001 From: ja Date: Fri, 4 Feb 2022 09:49:31 +0100 Subject: [PATCH] =?UTF-8?q?Fortschritte=20Daten=C3=BCbergabe=20Filterung?= =?UTF-8?q?=20korrekt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Customers/LKWs.aspx | 127 +++++++++--------- Customers/LKWs.aspx.vb | 4 +- .../SDL/MAUT/Formtemplate HU_HUGO.aspx.vb | 4 +- 3 files changed, 69 insertions(+), 66 deletions(-) diff --git a/Customers/LKWs.aspx b/Customers/LKWs.aspx index bfd95ef..e61d452 100644 --- a/Customers/LKWs.aspx +++ b/Customers/LKWs.aspx @@ -434,12 +434,10 @@ iframe {overflow:hidden} // Data tables requires all data to be stuffed into a generic jagged array, so loop through our // typed object and create one. $.each(result, function () { - dtData.push([ - this.SDL, - this.Bez, - this.Gueltigbis, - this.Kartnr, + dtData.push([ this.Kennzeichen, + this.Kundennr, + this.SDLNr, this.History ]); }); @@ -470,11 +468,9 @@ iframe {overflow:hidden} // typed object and create one. $.each(result.d, function () { dtData.push([ - this.SDL, - this.Bez, - this.Gueltigbis, - this.Kartnr, - this.Kennzeichen, + this.Kennzeichen, + this.Kundennr, + this.SDLNr, this.History ]); }); @@ -540,8 +536,8 @@ iframe {overflow:hidden} async:"true", data: JSON.stringify(data), success: function (data) { - //alert(data.d.AaData) - result = data.d.AaData; + alert(data.d.AaData) + result2 = data.d; // addheader(); var rowCount = table.rows.length; @@ -550,85 +546,90 @@ iframe {overflow:hidden} } let strheader = 'SDL-NrBezeichnungGueltig bisKarten-Nummer'; $('#<%=tablemain.ClientID%>').append(strheader); - for (var i = 0; i < result.length; i++) { + for (var i = 0; i < result2.AaData.length; i++) { //let strHTML4 = '878465464634DIESEL12/05/2026151515313521351' //alert('Horray! 200 status code!' + result[i]); //alert(result.rows.length) - + let result = result2.AaData[i] + alert(result) let iframe = ''; let strHTML4 = ''; - let SDLNr = result[i]["0"]; - let Kundennr = result[i]["2"]; - let cardno = result[i]["3"]; - let Kennz = result[i]["4"]; - let History = result[i]["5"]; - //alert(Kundennr + 'Kundennummer'); + let SDLNr = result["0"]; + let Kundennr = result["5"]; + let cardno = result["3"]; + let Kennz = result["4"]; + let History = result["7"]; + alert(SDLNr + 'SDLnummer'); + alert(Kundennr + 'Kundennummer'); + alert(cardno + 'Kartenummer'); + alert(Kennz + 'Kennzeichen'); + alert(History + 'History'); let customerid = '<%=Request.QueryString("CustomerID")%>'; // alert("Var:" + id.split(',')[0]+customerid); - if (result[i]["0"] == 200 && Kennz == id.split(',')[0] && Kundennr == customerid && cardno==id.split(',')[3] && SDLNr == id.split(',')[4] && History == id.split(',')[5]){ + if (result["0"] == 200 && Kennz == id.split(',')[0] && Kundennr == customerid && Kundennr == id.split(',')[2] && cardno == id.split(',')[3] && SDLNr == id.split(',')[0] && History == id.split(',')[5]){ iframe = ''; - strHTML4 = '' + result[i]["0"] + '' + result[i]["1"] + '' + result[i]["2"] + '' + result[i]["3"] + '' + iframe + '' - } else if (result[i]["0"] == 100 && Kennz == id.split(',')[0] && Kundennr == customerid && cardno == id.split(',')[3] && SDLNr == id.split(',')[4] && History == id.split(',')[5]) { + strHTML4 = '' + result["0"] + '' + result["1"] + '' + result["2"] + '' + result["3"] + '' + iframe + '' + } else if (result["0"] == 100 && Kennz == id.split(',')[0] && Kundennr == customerid && Kundennr == id.split(',')[2] && cardno == id.split(',')[3] && SDLNr == id.split(',')[0] && History == id.split(',')[5]){ iframe = ' '; - strHTML4 = '' + result[i]["0"] + '' + result[i]["1"] + '' + result[i]["2"] + '' + result[i]["3"] + '' + iframe + '' - } else if (result[i]["0"] == 101 && Kennz == id.split(',')[0] && Kundennr == customerid && cardno == id.split(',')[3] && SDLNr == id.split(',')[4] && History == id.split(',')[5]) { + strHTML4 = '' + result["0"] + '' + result["1"] + '' + result["2"] + '' + result["3"] + '' + iframe + '' + } else if (result["0"] == 101 && Kennz == id.split(',')[0] && Kundennr == customerid && Kundennr == id.split(',')[2] && cardno == id.split(',')[3] && SDLNr == id.split(',')[0] && History == id.split(',')[5]){ iframe = ' '; - strHTML4 = '' + result[i]["0"] + '' + result[i]["1"] + '' + result[i]["2"] + '' + result[i]["3"] + '' + iframe + '' - } else if (result[i]["0"] == 201 && Kennz == id.split(',')[0] && Kundennr == customerid && cardno == id.split(',')[3] && SDLNr == id.split(',')[4] && History == id.split(',')[5]) { + strHTML4 = '' + result["0"] + '' + result["1"] + '' + result["2"] + '' + result["3"] + '' + iframe + '' + } else if (result["0"] == 201 && Kennz == id.split(',')[0] && Kundennr == customerid && Kundennr == id.split(',')[2] && cardno == id.split(',')[3] && SDLNr == id.split(',')[0] && History == id.split(',')[5]){ iframe = ' '; - strHTML4 = '' + result[i]["0"] + '' + result[i]["1"] + '' + result[i]["2"] + '' + result[i]["3"] + '' + iframe + '' - } else if (result[i]["0"] == 202 && Kennz == id.split(',')[0] && Kundennr == customerid && cardno == id.split(',')[3] && SDLNr == id.split(',')[4] && History == id.split(',')[5]) { + strHTML4 = '' + result["0"] + '' + result["1"] + '' + result["2"] + '' + result["3"] + '' + iframe + '' + } else if (result["0"] == 202 && Kennz == id.split(',')[0] && Kundennr == customerid && Kundennr == id.split(',')[2] && cardno == id.split(',')[3] && SDLNr == id.split(',')[0] && History == id.split(',')[5]){ iframe = ' '; - strHTML4 = '' + result[i]["0"] + '' + result[i]["1"] + '' + result[i]["2"] + '' + result[i]["3"] + '' + iframe + '' - } else if (result[i]["0"] == 203 && Kennz == id.split(',')[0] && Kundennr == customerid && cardno == id.split(',')[3] && SDLNr == id.split(',')[4] && History == id.split(',')[5]) { + strHTML4 = '' + result["0"] + '' + result["1"] + '' + result["2"] + '' + result["3"] + '' + iframe + '' + } else if (result["0"] == 203 && Kennz == id.split(',')[0] && Kundennr == customerid && Kundennr == id.split(',')[2] && cardno == id.split(',')[3] && SDLNr == id.split(',')[0] && History == id.split(',')[5]){ iframe = ' '; - strHTML4 = '' + result[i]["0"] + '' + result[i]["1"] + '' + result[i]["2"] + '' + result[i]["3"] + '' + iframe + '' - // } else if (result[i]["0"] == 204 && Kennz == id.split(',')[0] && Kundennr == customerid && cardno == id.split(',')[3] && SDLNr == id.split(',')[4] && History == id.split(',')[5]) { + strHTML4 = '' + result["0"] + '' + result["1"] + '' + result["2"] + '' + result["3"] + '' + iframe + '' + // } else if (result["0"] == 204 && Kennz == id.split(',')[0] && Kundennr == customerid && Kundennr == id.split(',')[2] && cardno == id.split(',')[3] && SDLNr == id.split(',')[0] && History == id.split(',')[5]){ // iframe = ' '; - // strHTML4 = '' + result[i]["0"] + '' + result[i]["1"] + '' + result[i]["2"] + '' + result[i]["3"] + '' + iframe + '' - //} else if (result[i]["0"] == 205 && Kennz == id.split(',')[0] && Kundennr == customerid && cardno == id.split(',')[3] && SDLNr == id.split(',')[4] && History == id.split(',')[5]) { + // strHTML4 = '' + result["0"] + '' + result["1"] + '' + result["2"] + '' + result["3"] + '' + iframe + '' + //} else if (result["0"] == 205 && Kennz == id.split(',')[0] && Kundennr == customerid && Kundennr == id.split(',')[2] && cardno == id.split(',')[3] && SDLNr == id.split(',')[0] && History == id.split(',')[5]){ // iframe = ' '; - // strHTML4 = '' + result[i]["0"] + '' + result[i]["1"] + '' + result[i]["2"] + '' + result[i]["3"] + '' + iframe + '' - //} else if (result[i]["0"] == 206 && Kennz == id.split(',')[0] && Kundennr == customerid && cardno == id.split(',')[3] && SDLNr == id.split(',')[4] && History == id.split(',')[5]) { + // strHTML4 = '' + result["0"] + '' + result["1"] + '' + result["2"] + '' + result["3"] + '' + iframe + '' + //} else if (result["0"] == 206 && Kennz == id.split(',')[0] && Kundennr == customerid && Kundennr == id.split(',')[2] && cardno == id.split(',')[3] && SDLNr == id.split(',')[0] && History == id.split(',')[5]){ // iframe = ' '; - // strHTML4 = '' + result[i]["0"] + '' + result[i]["1"] + '' + result[i]["2"] + '' + result[i]["3"] + '' + iframe + '' - } else if (result[i]["0"] == 207 && Kennz == id.split(',')[0] && Kundennr == customerid && cardno == id.split(',')[3] && SDLNr == id.split(',')[4] && History == id.split(',')[5]) { + // strHTML4 = '' + result["0"] + '' + result["1"] + '' + result["2"] + '' + result["3"] + '' + iframe + '' + } else if (result["0"] == 207 && Kennz == id.split(',')[0] && Kundennr == customerid && Kundennr == id.split(',')[2] && cardno == id.split(',')[3] && SDLNr == id.split(',')[0] && History == id.split(',')[5]){ iframe = ' '; - strHTML4 = '' + result[i]["0"] + '' + result[i]["1"] + '' + result[i]["2"] + '' + result[i]["3"] + '' + iframe + '' - } else if (result[i]["0"] == 208 && Kennz == id.split(',')[0] && Kundennr == customerid && cardno == id.split(',')[3] && SDLNr == id.split(',')[4] && History == id.split(',')[5]) { + strHTML4 = '' + result["0"] + '' + result["1"] + '' + result["2"] + '' + result["3"] + '' + iframe + '' + } else if (result["0"] == 208 && Kennz == id.split(',')[0] && Kundennr == customerid && Kundennr == id.split(',')[2] && cardno == id.split(',')[3] && SDLNr == id.split(',')[0] && History == id.split(',')[5]){ iframe = ' '; - strHTML4 = '' + result[i]["0"] + '' + result[i]["1"] + '' + result[i]["2"] + '' + result[i]["3"] + '' + iframe + '' - } else if (result[i]["0"] == 209 && Kennz == id.split(',')[0] && Kundennr == customerid && cardno == id.split(',')[3] && SDLNr == id.split(',')[4] && History == id.split(',')[5]) { + strHTML4 = '' + result["0"] + '' + result["1"] + '' + result["2"] + '' + result["3"] + '' + iframe + '' + } else if (result["0"] == 209 && Kennz == id.split(',')[0] && Kundennr == customerid && Kundennr == id.split(',')[2] && cardno == id.split(',')[3] && SDLNr == id.split(',')[0] && History == id.split(',')[5]){ iframe = ' '; - strHTML4 = '' + result[i]["0"] + '' + result[i]["1"] + '' + result[i]["2"] + '' + result[i]["3"] + '' + iframe + '' - } else if (result[i]["0"] == 210 && Kennz == id.split(',')[0] && Kundennr == customerid && cardno == id.split(',')[3] && SDLNr == id.split(',')[4] && History == id.split(',')[5]) { + strHTML4 = '' + result["0"] + '' + result["1"] + '' + result["2"] + '' + result["3"] + '' + iframe + '' + } else if (result["0"] == 210 && Kennz == id.split(',')[0] && Kundennr == customerid && Kundennr == id.split(',')[2] && cardno == id.split(',')[3] && SDLNr == id.split(',')[0] && History == id.split(',')[5]){ iframe = ' '; - strHTML4 = '' + result[i]["0"] + '' + result[i]["1"] + '' + result[i]["2"] + '' + result[i]["3"] + '' + iframe + '' - } else if (result[i]["0"] == 211 && Kennz == id.split(',')[0] && Kundennr == customerid && cardno == id.split(',')[3] && SDLNr == id.split(',')[4] && History == id.split(',')[5]) { + strHTML4 = '' + result["0"] + '' + result["1"] + '' + result["2"] + '' + result["3"] + '' + iframe + '' + } else if (result["0"] == 211 && Kennz == id.split(',')[0] && Kundennr == customerid && Kundennr == id.split(',')[2] && cardno == id.split(',')[3] && SDLNr == id.split(',')[0] && History == id.split(',')[5]){ iframe = ' '; - strHTML4 = '' + result[i]["0"] + '' + result[i]["1"] + '' + result[i]["2"] + '' + result[i]["3"] + '' + iframe + '' - } else if (result[i]["0"] == 212 && Kennz == id.split(',')[0] && Kundennr == customerid && cardno == id.split(',')[3] && SDLNr == id.split(',')[4] && History == id.split(',')[5]) { + strHTML4 = '' + result["0"] + '' + result["1"] + '' + result["2"] + '' + result["3"] + '' + iframe + '' + } else if (result["0"] == 212 && Kennz == id.split(',')[0] && Kundennr == customerid && Kundennr == id.split(',')[2] && cardno == id.split(',')[3] && SDLNr == id.split(',')[0] && History == id.split(',')[5]){ iframe = ' '; - strHTML4 = '' + result[i]["0"] + '' + result[i]["1"] + '' + result[i]["2"] + '' + result[i]["3"] + '' + iframe + '' - } else if (result[i]["0"] == 213 && Kennz == id.split(',')[0] && Kundennr == customerid && cardno == id.split(',')[3] && SDLNr == id.split(',')[4] && History == id.split(',')[5]) { + strHTML4 = '' + result["0"] + '' + result["1"] + '' + result["2"] + '' + result["3"] + '' + iframe + '' + } else if (result["0"] == 213 && Kennz == id.split(',')[0] && Kundennr == customerid && Kundennr == id.split(',')[2] && cardno == id.split(',')[3] && SDLNr == id.split(',')[0] && History == id.split(',')[5]){ iframe = ' '; - strHTML4 = '' + result[i]["0"] + '' + result[i]["1"] + '' + result[i]["2"] + '' + result[i]["3"] + '' + iframe + '' - } else if (result[i]["0"] == 214 && Kennz == id.split(',')[0] && Kundennr == customerid && cardno == id.split(',')[3] && SDLNr == id.split(',')[4] && History == id.split(',')[5]) { + strHTML4 = '' + result["0"] + '' + result["1"] + '' + result["2"] + '' + result["3"] + '' + iframe + '' + } else if (result["0"] == 214 && Kennz == id.split(',')[0] && Kundennr == customerid && Kundennr == id.split(',')[2] && cardno == id.split(',')[3] && SDLNr == id.split(',')[0] && History == id.split(',')[5]){ iframe = ' '; - strHTML4 = '' + result[i]["0"] + '' + result[i]["1"] + '' + result[i]["2"] + '' + result[i]["3"] + '' + iframe + '' - } else if (result[i]["0"] == 215 && Kennz == id.split(',')[0] && Kundennr == customerid && cardno == id.split(',')[3] && SDLNr == id.split(',')[4] && History == id.split(',')[5]) { + strHTML4 = '' + result["0"] + '' + result["1"] + '' + result["2"] + '' + result["3"] + '' + iframe + '' + } else if (result["0"] == 215 && Kennz == id.split(',')[0] && Kundennr == customerid && Kundennr == id.split(',')[2] && cardno == id.split(',')[3] && SDLNr == id.split(',')[0] && History == id.split(',')[5]){ iframe = ' '; - strHTML4 = '' + result[i]["0"] + '' + result[i]["1"] + '' + result[i]["2"] + '' + result[i]["3"] + '' + iframe + '' - } else if (result[i]["0"] == 216 && Kennz == id.split(',')[0] && Kundennr == customerid && cardno == id.split(',')[3] && SDLNr == id.split(',')[4] && History == id.split(',')[5]) { + strHTML4 = '' + result["0"] + '' + result["1"] + '' + result["2"] + '' + result["3"] + '' + iframe + '' + } else if (result["0"] == 216 && Kennz == id.split(',')[0] && Kundennr == customerid && Kundennr == id.split(',')[2] && cardno == id.split(',')[3] && SDLNr == id.split(',')[0] && History == id.split(',')[5]){ iframe = ' '; - strHTML4 = '' + result[i]["0"] + '' + result[i]["1"] + '' + result[i]["2"] + '' + result[i]["3"] + '' + iframe + '' - } else if (result[i]["0"] == 500 && Kennz == id.split(',')[0] && Kundennr == customerid && cardno == id.split(',')[3] && SDLNr == id.split(',')[4] && History == id.split(',')[5]) { + strHTML4 = '' + result["0"] + '' + result["1"] + '' + result["2"] + '' + result["3"] + '' + iframe + '' + } else if (result["0"] == 500 && Kennz == id.split(',')[0] && Kundennr == customerid && Kundennr == id.split(',')[2] && cardno == id.split(',')[3] && SDLNr == id.split(',')[0] && History == id.split(',')[5]){ iframe = ' '; - strHTML4 = '' + result[i]["0"] + '' + result[i]["1"] + '' + result[i]["2"] + '' + result[i]["3"] + '' + iframe + '' - } else if (result[i]["0"] == 501 && Kennz == id.split(',')[0] && Kundennr == customerid && cardno == id.split(',')[3] && SDLNr == id.split(',')[4] && History == id.split(',')[5]) { + strHTML4 = '' + result["0"] + '' + result["1"] + '' + result["2"] + '' + result["3"] + '' + iframe + '' + } else if (result["0"] == 501 && Kennz == id.split(',')[0] && Kundennr == customerid && Kundennr == id.split(',')[2] && cardno == id.split(',')[3] && SDLNr == id.split(',')[0] && History == id.split(',')[5]){ iframe = ' '; - strHTML4 = '' + result[i]["0"] + '' + result[i]["1"] + '' + result[i]["2"] + '' + result[i]["3"] + '' + iframe + '' + strHTML4 = '' + result["0"] + '' + result["1"] + '' + result["2"] + '' + result["3"] + '' + iframe + '' } $('#<%=tablemain.ClientID%>').append(strHTML4); } @@ -694,7 +695,7 @@ iframe {overflow:hidden} let History = result[i]["6"]; let customerid = '<%=Request.QueryString("P1")%>' - for (var i = 0; i < result.length; i++) { + for (var i = 0; i < result.AaData.d.length; i++) { //let strHTML4 = '878465464634DIESEL12/05/2026151515313521351' //alert('Horray! 200 status code!' + result[i]); // alert(result.rows.length) diff --git a/Customers/LKWs.aspx.vb b/Customers/LKWs.aspx.vb index 2ea04df..d9c11c6 100644 --- a/Customers/LKWs.aspx.vb +++ b/Customers/LKWs.aspx.vb @@ -151,6 +151,7 @@ Partial Class LKWS Dim strstrstrstrtempKennz As String = String.Empty Dim strstrstrstrtempKundNr As String = String.Empty Dim strstrstrstrtempHistory As String = String.Empty + Dim strstrstrstrtempSDL As String = String.Empty For Each l2 In list2 Dim String2 As String = String.Empty @@ -159,6 +160,7 @@ Partial Class LKWS Else Stringtemp = l2.Kategorie.ToString End If + strstrstrstrtempSDL = l2.SDLNr.ToString strstrstrstrtempCardno = l2.KartenNr.ToString strstrstrstrtempKennz = l2.KfzKennzeichen.ToString Dim tc_SDL As TableCell = New TableCell @@ -190,7 +192,7 @@ Partial Class LKWS strtemp2 = l1.Nationalität End If - tr1.Attributes.Add("onclick", "Javascript:doPostBack('""" + tr1.Cells.Item(0).Text + """,""" + strtemp2 + """,""" + Kdnrtext + """,""" + strstrstrstrtempCardno + """,""" + strstrstrstrtempKennz + """,""" + strstrstrstrtempHistory + """')") + tr1.Attributes.Add("onclick", "Javascript:doPostBack('""" + tr1.Cells.Item(0).Text + """,""" + strtemp2 + """,""" + Kdnrtext + """,""" + strstrstrstrtempCardno + """,""" + strstrstrstrtempSDL + """,""" + strstrstrstrtempHistory + """')") cnt += 1 tbl_sidemenue.Rows.Add(tr1) Next diff --git a/Customers/SDL/MAUT/Formtemplate HU_HUGO.aspx.vb b/Customers/SDL/MAUT/Formtemplate HU_HUGO.aspx.vb index ef0a442..13b3f03 100644 --- a/Customers/SDL/MAUT/Formtemplate HU_HUGO.aspx.vb +++ b/Customers/SDL/MAUT/Formtemplate HU_HUGO.aspx.vb @@ -74,12 +74,12 @@ Partial Class Customers_Default3 Public Shared Function filltabledetails(Kennzeichen As String, Kundennr As String, SDLNr As String, History As String) As FormattedList - Dim list As List(Of String) = New List(Of String) Dim list2 As List(Of VERAG_PROG_ALLGEMEIN.cSDL) = VERAG_PROG_ALLGEMEIN.cSDL.GET_LIST_WEB_LKW(Integer.Parse(Kdnrtext), Kennzeichen) Dim listdetails As New List(Of List(Of String)) + Dim list As List(Of String) = New List(Of String) For Each l2 In list2 - If l2.KundenNr.ToString = Kundennr AndAlso l2.SDLNr = SDLNr AndAlso l2.History = History Then + If l2.KfzKennzeichen.ToString = Kennzeichen And l2.KundenNr.ToString = Kundennr AndAlso l2.SDLNr.ToString = SDLNr AndAlso l2.History.ToString = History Then Dim strtempbestelltam As String = String.Empty Dim strtempKartenNr As String = String.Empty Dim strtempPIN As String = String.Empty