Design tabelle 2 angepasst

This commit is contained in:
ja
2021-12-17 15:43:18 +01:00
parent 6a22da05d4
commit 3274a44537

View File

@@ -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";