Änderungen AJAX Calls sowie Loginladezeit durcj Erhöhung der Iterationen erhöht sowie dadurch die Sicherheit

This commit is contained in:
ja
2022-01-12 15:26:39 +01:00
parent 04378bf7cc
commit f9ecb1602a
5 changed files with 1669 additions and 1616 deletions

View File

@@ -58,13 +58,13 @@
<div class="col-2">
<asp:Button runat="server" Text="Alle" ClientIDMode="Predictable" ID="btn_alle" OnClick="btn_alle_Click" style="margin-left:-30px;width:56px"/></div>
</div>
<div style="height:5px"></div>
<div style="height: 0.313em/*5px*/"></div>
<div class="row">
<div class="col-12">Kennzeichen:
<asp:TextBox ID ="txt_lkw" runat="server" Width="110px" style="margin-left:25px"></asp:TextBox>
<asp:Button ID="btn_Suchen" ClientIDMode="Static" OnClick="btn_Suchen_Click" runat="server" Text="Suchen" style="margin-left:5px"/> </div>
<div class="col-9">
<div class="col-9"style="height:10px;"></div>
<div class="col-9" style="height: 0.625em/*10px*/;"></div>
<div class="flex-col-9">
<asp:Table ID="tbl_sidemenue" ClientIDMode="Static" runat="server" CssClass="table table-striped" style="width:310px;margin-left:-32px;cursor:default">
<asp:TableHeaderRow style="background-color:#043381;color:#fff;font-size:0.86em"><asp:TableHeaderCell ID="tbhc_KFZKennz">KFZ-Kennzeichen</asp:TableHeaderCell><asp:TableHeaderCell ID="tbhc_Nat">Nat.</asp:TableHeaderCell><asp:TableHeaderCell ID="tblhc_Verk">Verk</asp:TableHeaderCell><asp:TableHeaderCell ID="tblhc_Kz">KZ-An</asp:TableHeaderCell><asp:TableHeaderCell ID="tblhc_Verm">Vermerk</asp:TableHeaderCell></asp:TableHeaderRow>
@@ -83,26 +83,33 @@
<div class="col-12">
<asp:Label ID="lbl_SDL" runat="server" Font-Size="1.331em" style="color:#043381;font-weight:500">SDL-Leistungen:</asp:Label>
</div>
<div class="col-12"style="height:10px;"></div>
<div class="col-12" style="height: 0.625em;"></div>
<div id="conovertab" class="col-12" style="margin-left:-10px;background-color:#fff;overflow-y:auto;">
<!-- <asp:Table ID="tbl_mainpage" ClientIDMode="Static" runat="server" Width="100%" style="background-color:#fff;overflow-y:auto;" CssClass="table table-striped col-12">
<asp:TableHeaderRow ID="headrow1" runat="server" style="background-color:#043381;color:#fff;height:10px"><asp:TableHeaderCell ID="tblhc_SDLNr">SDL-Nr</asp:TableHeaderCell><asp:TableHeaderCell ID="tblhc_Bez">Bezeichnung</asp:TableHeaderCell><asp:TableHeaderCell ID="tbl_gueltig">Gültig Bis</asp:TableHeaderCell><asp:TableHeaderCell ID="tblhc_KarteNr">Karten-Nummer</asp:TableHeaderCell></asp:TableHeaderRow>
</asp:Table>-->
<table id="tablemain" runat="server" class="col-12">
<tr style="background-color: #043381; color: #fff">
<th style="text-align: center">
<td style="font-weight: 600; color: white; text-align: center">SDL</td>
</th>
<th style="text-align: center">
<td style="font-weight: 600; color: white; text-align: center">Bezeichnung</td>
</th>
<th style="text-align: center">
<td style="font-weight: 600; color: white; text-align: center">Gültig bis</td>
</th>
<th style="text-align: center">
<td style="font-weight: 600; color: white; text-align: center">Kartennummer</td>
</th>
</tr>
<table id="tablemain" runat="server" class="col-12">
<thead>
<tr style="background-color: #043381; color: #fff;height:23px">
<th style="text-align: center; height: 23px">
<td style="font-weight: 600; color: white">SDL</td>
</th>
<th style="text-align: center; height: 23px">
<td style="font-weight: 600; color: white; text-align: center;">Bezeichnung</td>
</th>
<th style="text-align: center; height: 23px">
<td style="font-weight: 600; color: white; text-align: center">Gültig bis</td>
</th>
<th style="text-align: center; height: 23px">
<td style="font-weight: 600; color: white; text-align: center">Kartennummer</td>
</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="5" class="dataTables_empty">Lade Daten mittels Klicken</td>
</tr>
</tbody>
</table>
</div>
</div>
@@ -115,21 +122,20 @@
<div class="col-12">
<asp:Button ID="btn_alle_M" runat="server" CssClass="btn btn-primary" ClientIDMode="Predictable" OnClick="btn_alle_M_Click" style="margin-left:-24px; width:76px" Text="Alle" />
</div>
<div style="height:20px"></div>
<div style="height: 1.25em/*20px*/"></div>
<div class="row" style="margin-left:-30px">
<div class="col-12">Kennzeichen:<asp:TextBox runat="server" ID="txt_LKWNr_M" Width="120px" style="margin-left:4px"></asp:TextBox>
<asp:Button ID="btn_Suchen_M" OnClick="btn_Suchen_M_Click" runat="server" CssClass="btn btn-primary" Text="Suchen" style="margin-left:0px" /></div>
</div>
<div style="height:12px"></div>
<div style="height:17px"></div>
<div style="height: 0.75em /*12px*/"></div>
<div style="height: 1.063em/*17px*/"></div>
<div class="col-12-flex">
<asp:Table ID="tbl_2" runat="server" ClientIDMode="Static">
<asp:TableHeaderRow style="background-color:#043381;color:#fff" runat="server"><asp:TableHeaderCell ID="tbhc_KFZKennz_M">KFZ_Kennzeichen</asp:TableHeaderCell><asp:TableHeaderCell ID="tbhc_Nat_M">Nat.</asp:TableHeaderCell><asp:TableHeaderCell ID="tbhc_Verk_M">Verk.</asp:TableHeaderCell><asp:TableHeaderCell ID="tbhc_KZ_An_M">KZ-An</asp:TableHeaderCell><asp:TableHeaderCell ID="tbhc_Verm_M">Vermerke</asp:TableHeaderCell></asp:TableHeaderRow>
</asp:Table>
</div>
</div>
<div style="height:22px"></div>
<div style="height: 1.375em/*22px*/"></div>
<div class="col-12">
<div class="col-12">
<asp:Image runat="server" ClientIDMode="AutoID" ID="Img_Text1_M" ImageUrl="~/images/Icons/Aviso.png" style="width:56px;height:56px" />
@@ -141,26 +147,33 @@
<div class="col-12">
<asp:Label ID="lbl_SDL_M" runat="server" Font-Size="1.331em" style="color:#043381;font-weight:500">SDL-Leistungen</asp:Label>
</div>
<div class="col-12" style="height:15px"></div>
<div class="col-12" style="height: 0.938em"></div>
<div id="conovertab_M" class="col-12" style="margin-left:-10px;background-color:#fff;overflow-x:auto">
<!-- <asp:Table ID="tbl_mainpage_M" ClientIDMode="Static" runat="server" Width="100%" CssClass="table table-striped col-12">
<asp:TableHeaderRow runat="server" ID="headrow_M" style="background-color:#043381;color:#fff"><asp:TableHeaderCell ID="tblhc_SDLNr_M">SDL_Nr</asp:TableHeaderCell><asp:TableHeaderCell ID="tblhc_Bez_M">Bezeichnung</asp:TableHeaderCell><asp:TableHeaderCell ID="tbl_gueltig_M">Gültig Bis</asp:TableHeaderCell><asp:TableHeaderCell ID="tblhc_KarteNr_M">Karten-Nummer</asp:TableHeaderCell></asp:TableHeaderRow>
</asp:Table>-->
<table id="tablemain_m" runat="server" class="col-12">
<tr style="background-color:#043381;color:#fff">
<th style="text-align:center">
<td style="font-weight: 600;color:white">SDL</td>
</th>
<th style="text-align: center">
<td style="font-weight: 600; color: white; text-align: center">Bezeichnung</td>
</th>
<th style="text-align: center">
<td style="font-weight: 600; color: white; text-align: center">Gültig bis</td>
</th>
<th style="text-align: center">
<td style="font-weight: 600; color: white; text-align: center">Kartennummer</td>
</th>
</tr>
<thead>
<tr style="background-color: #043381; color: #fff; height: 1.375em/*22.4px*/">
<th style="text-align: center; height: 1.375em/*22.4px*/">
<td style="font-weight: 500;color:white">SDL</td>
</th>
<th style="text-align: center; height: 1.375em/*22.4px*/">
<td style="font-weight: 500; color: white; text-align: center">Bezeichnung</td>
</th>
<th style="text-align: center; height: 1.375em/*22.4px*/">
<td style="font-weight: 500; color: white; text-align: center">Gültig bis</td>
</th>
<th style="text-align: center; height: 1.375em/*22.4px*/">
<td style="font-weight: 500; color: white; text-align: center">Kartennummer</td>
</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="12" class="dataTables_empty">Lade Daten mittels Klicken</td>
</tr>
</tbody>
</table>
</div>
</div>
@@ -229,16 +242,14 @@
Pagemethods.filltable_M(table_M,SDLNr, Bez, GueltBs, KartNr, onerror);
}
addNewRow_M();
}
}
function buildtable_M(n, SDL,Bez, Dtguelt, KartNr) {
let table_M = document.getElementById("<%=tbl_mainpage_M.ClientID%>");
addheader_M();
for (let intz = 0; intz < n; intz++) {
addNewRow_M(SDL, Bez, Dtguelt, KartNr);
}
}
}
function addheader() {
let table = document.getElementById("<%=tbl_mainpage.ClientID%>");
let tr = table.insertRow(-1);
@@ -248,21 +259,26 @@
td.style.backgroundColor = "#043381";
td.style.color = "#fff";
td.style.fontWeight = 'bold';
td.style.height = "16px";
td = tr.insertCell();
td.innerHTML = "Bezeichnung";
td.style.backgroundColor = "#043381";
td.style.color = "#fff";
td.style.fontWeight = 'bold';
td.style.height = "16px";
td = tr.insertCell();
td.innerHTML = "Gültig Bis";
td.style.backgroundColor = "#043381";
td.style.color = "#fff";
td.style.fontWeight = 'bold';
td.style.height = "16px";
td = tr.insertCell();
td.innerHTML = "Karten-Nummer";
td.style.backgroundColor = "#043381";
td.style.color = "#fff";
td.style.fontWeight = 'bold';
td.style.height = "16px";
tr.style.height = "16px";
}
function addheader_M() {
let table = document.getElementById("<%=tbl_mainpage_M.ClientID%>");
@@ -272,21 +288,26 @@
td.style.backgroundColor = "#043381";
td.style.color = "#fff";
td.style.fontWeight = 'bold';
td.style.height = "16px";
td = tr.insertCell();
td.innerHTML = "Bezeichnung";
td.style.backgroundColor = "#043381";
td.style.color = "#fff";
td.style.fontWeight = 'bold';
td.style.height = "16px";
td = tr.insertCell();
td.innerHTML = "Gültig Bis";
td.style.backgroundColor = "#043381";
td.style.color = "#fff";
td.style.fontWeight = 'bold';
td.style.height = "16px";
td = tr.insertCell();
td.innerHTML = "Karten-Nummer";
td.style.backgroundColor = "#043381";
td.style.color = "#fff";
td.style.fontWeight = 'bold';
td.style.height = "16px";
tr.style.height = "16px";
}
function addNewRow(SDL, Bez, gueltigbs,Kartnr) {
let table = document.getElementById("<%=tbl_mainpage.ClientID%>");
@@ -340,43 +361,44 @@
}
</script>
<script type="text/javascript">
function renderTable(result) {
var dtData = [];
// 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.SDLNr,
this.Bez,
this.Gueltigbis,
this.Kartnr
]);
});
<script type="text/javascript">
function renderTable(result) {
let dtData = [];
// 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.SDLNr,
this.Bez,
this.Gueltigbis,
this.Kartnr
]);
});
$('#<%=tablemain.ClientID%>').dataTable({
'aaData': dtData,
"bJQueryUI": true
});
}
function renderTable_M(result_M) {
var dtData = [];
// Data tables requires all data to be stuffed into a generic jagged array, so loop through our
// typed object and create one.
$.each(result_M, function () {
dtData.push([
this.SDLNr,
this.Bez,
this.Gueltigbis,
this.Kartnr
]);
});
$('#<%=tablemain_m.ClientID%>').dataTable({
'aaData': dtData,
"bJQueryUI": true
});
}
$('<%=tablemain.ClientID%>').dataTable({
'aaData': dtData,
"bJQueryUI": true
});
}
function renderTable_M(result_M) {
let dtData_M = [];
// Data tables requires all data to be stuffed into a generic jagged array, so loop through our
// typed object and create one.
$.each(result_M, function () {
dtData_M.push([
this.SDLNr,
this.Bez,
this.Gueltigbis,
this.Kartnr
]);
});
$("<%=tablemain_m.ClientID%>").dataTable({
'aaData': dtData
});
}
function doPostBack(id) {
let Speditionslabel = document.getElementById('<%=lbl_sped_Placeholder.ClientID%>');
let natplaceholder = document.getElementById('<%=lbl_Placeholder.ClientID%>');
@@ -408,21 +430,15 @@
type: "POST",
url: "LKWs.aspx/filltable2",
contentType: "application/json; charset=utf-8",
dataType: "json",
dataType: "json",
async: "false",
data: JSON.stringify(data),
success: function (data) {
let JSONObj = data.d;
// addheader();
//let strHTML = '<tr style="background-color:#043381;color:#fff"><th><td style="font-weight:600; color:white">SDL-Nr</td></th><th><td style="font-weight:600; color:white">Bezeichnung</td></th><th><td style="font-weight:600; color:white">Gueltig bis</td></th><th><td style="font-weight:600; color:white">Karten-Nummer</td></th></tr>';
success: function (response) {
let JSONObj = data.d;
alert('Horray! 200 status code!');
// alert(result.rows.length)
//$(JSONObj).each(function () {
// let row = $(this)[0];
// strHTML += '<tr><td>' + row["SDL"] + '</td><td>' + row["Bez"] + '</td><td>' + row["Gueltigbis"] + '</td><td>' + row["KartNr"] + '</td></tr>';
// alert(strHTML)
// });
// $('#<%'=tablemain.ClientID%>').html(strHTML);
renderTable(JSONObj)
renderTable(JSONObj)
},
error: function (jqXHR, textStatus, errorThrown) {
alert("Status:" + jqXHR.status + "\nStatusText: " + textStatus + "\nError:" + errorThrown);
@@ -459,26 +475,21 @@
url: "LKWs.aspx/filltable2_M",
contentType: "application/json; charset=utf-8",
dataType: "json",
async: "false",
data: JSON.stringify(data),
success: function (data) {
result = data.d;
// addheader();
//let strHTML = '<tr style="background-color:#043381;color:#fff"><th><td style="font-weight:600; color:white">SDL-Nr</td></th><th><td style="font-weight:600; color:white">Bezeichnung</td></th><th><td style="font-weight:600; color:white">Gueltig bis</td></th><th><td style="font-weight:600; color:white">Karten-Nummer</td></th></tr>';
alert('Horray! 200 status code!');
//$(result).each(function () {
// let row = $(this)[0];
// strHTML += '<tr><td>' + row["SDL"] + '</td><td>' + row["Bez"] + '</td><td>' + row["Gueltigbis"] + '</td><td>' + row["KartNr"] + '</td></tr>';
// alert(strHTML)
//});
//$('#<%'=tablemain_m.ClientID%>').html(strHTML);
renderTable_M(result);
},
result_M = data.d;
alert('Horray! 200 status code!');
renderTable_M(result_M);
},
error: function (jqXHR, textStatus, errorThrown) {
alert("Status:" + jqXHR.status + "\nStatusText: " + textStatus + "\nError:" + errorThrown);
}
});
//filltable2(id.split(',')[0])
}
}
</script>
</asp:Content>