From 3274a445373e31c85a76155ce0cc5b43eb18bd69 Mon Sep 17 00:00:00 2001 From: ja Date: Fri, 17 Dec 2021 15:43:18 +0100 Subject: [PATCH] Design tabelle 2 angepasst --- Customers/LKWs.aspx | 69 ++++++++++++++++++++++++++++++++------------- 1 file changed, 49 insertions(+), 20 deletions(-) diff --git a/Customers/LKWs.aspx b/Customers/LKWs.aspx index 112c495..46b60ef 100644 --- a/Customers/LKWs.aspx +++ b/Customers/LKWs.aspx @@ -146,59 +146,88 @@ let Speditionslabel = document.getElementById("<%=lbl_sped_Placeholder.ClientID%>") let natplaceholder = document.getElementById("<%=lbl_Placeholder.ClientID%>") let table = document.getElementById("<%=tbl_mainpage.ClientID%>") - Speditionslabel.textContent = Kennzeichen - natplaceholder.textContent = Nat - addHeader() - - addNewRow("7544514114") + Speditionslabel.textContent = Kennzeichen; + natplaceholder.textContent = Nat; + var SDL = "7544514114" + var rowCount = table.rows.length; + for (var i = rowCount - 1; i > 1; i--) { + table.deleteRow(i); + } + buildtable(5,SDL) } function TableRow_Click_M(Nat,Kennzeichen) { - let Speditionslabel = document.getElementById("<%=lbl_sped_Placeholder_M.ClientID%>") - let natplaceholder = document.getElementById("<%=lbl_Placeholder_M.ClientID%>") + let Speditionslabel = document.getElementById("<%=lbl_sped_Placeholder_M.ClientID%>"); + let natplaceholder = document.getElementById("<%=lbl_Placeholder_M.ClientID%>"); - Speditionslabel.textContent = Kennzeichen - natplaceholder.textContent = Nat + Speditionslabel.textContent = Kennzeichen; + natplaceholder.textContent = Nat; addheader_M() addNewRow_M() } + function buildtable(n, SDL) { + let table = document.getElementById("<%=tbl_mainpage.ClientID%>"); + addheader(); + for (let intz = 0; intz < n; intz++) { + addNewRow(SDL); + } + } + function addheader() { let table = document.getElementById("<%=tbl_mainpage.ClientID%>"); let tr = table.insertRow(-1); let td = tr.insertCell(); - td.innerHTML.textContent = "SDL-Nr"; - + td.innerHTML = "SDL-Nr"; + td.style.backgroundColor = "#043381"; + td.style.color = "#fff"; + td.style.fontWeight = 'bold'; td = tr.insertCell(); - td.innerHTML.textContent = "Bezeichnung"; - + td.innerHTML = "Bezeichnung"; + td.style.backgroundColor = "#043381"; + td.style.color = "#fff"; + td.style.fontWeight = 'bold'; td = tr.insertCell(); td.innerHTML = "Gültig Bis"; - + td.style.backgroundColor = "#043381"; + td.style.color = "#fff"; + td.style.fontWeight = 'bold'; td = tr.insertCell(); td.innerHTML = "Karten-Nummer"; + td.style.backgroundColor = "#043381"; + td.style.color = "#fff"; + td.style.fontWeight = 'bold'; } function addheader_m() { let table = document.getElementById("<%=tbl_mainpage_M.ClientID%>"); let tr = table.insertRow(-1); let td = tr.insertCell(); td.innerHTML = "SDL-Nr"; - + td.style.backgroundColor = "#043381"; + td.style.forecolor = "#fff"; + td.style.fontWeight = 'bold'; td = tr.insertCell(); td.innerHTML = "Bezeichnung"; - + td.style.backgroundColor = "#043381"; + td.style.forecolor = "#fff"; + td.style.fontWeight = 'bold'; td = tr.insertCell(); td.innerHTML = "Gültig Bis"; - + td.style.backgroundColor = "#043381"; + td.style.forecolor = "#fff"; + td.style.fontWeight = 'bold'; td = tr.insertCell(); td.innerHTML = "Karten-Nummer"; + td.style.backgroundColor = "#043381"; + td.style.forecolor = "#fff"; + td.style.fontWeight = 'bold'; } - function addNewRow(SDLNr) { + function addNewRow(SDL) { let table = document.getElementById("<%=tbl_mainpage.ClientID%>"); - let tr = table.insertRow(); + let tr = table.insertRow(-1); let td = tr.insertCell(); - td.innerHTML = SDLNr; + td.innerHTML = SDL; td = tr.insertCell(); td.innerHTML = "Diesel";