Files
VERAG_Homepage/Customers/LKWs.aspx

698 lines
38 KiB
Plaintext

<%@ Page Title="" Language="VB" MasterPageFile="~/Customers/Customers.master" AutoEventWireup="false" CodeFile="LKWs.aspx.vb" Inherits="LKWS" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server" >
<!-- Required meta tags -->
<meta charset="utf-8"/>
<%@ import Namespace="MySql.Data.MySqlClient" %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" title="VERAG IndexCustomer"/>
<link rel="shortcut icon" href="../images/Icons/favicon/favicon.ico" />
<!-- <link rel="stylesheet" type="text/css" href="css/edit_main.css"> -->
<script src="js/netzwerk.js" type="text/javascript"></script>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"/>
<link rel="stylesheet" type="text/css" href="../css/main.css"/>
<link rel="stylesheet" type="text/css" href="../css/style.css"/>
<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.18.3/dist/bootstrap-table.min.css"/>
<link rel="stylesheet" type="text/css" href="../css/Dropdown.css"/>
<!-- <link rel="stylesheet" type="text/css" href="../css/style.css"/>-->
<link rel="stylesheet" type="text/css" href="../css/Customers/MasterpageCustomers.css"/>
<link rel="stylesheet" type="text/css" href="../css/Customers/LKWs.css"/>
<link rel="stylesheet" type="text/css" href="../css/navbarsidebar2.css"/>
<style>
@media (max-width: 558.98px) {
body {
max-width: 390px;
}
h1 {
color: #043381;
font-size: 22px;
}
h2 {
color: #043381;
font-size: 30px;
}
#tableSearch {
width: 53%;
border: 1px solid grey;
}
}
<style>
iframe {overflow:hidden}
</style>
</style>
<script>
$(document).ready(function () {
function getChildren($row) {
var children = [];
while ($row.next().hasClass('child')) {
children.push($row.next());
$row = $row.next();
}
return children;
}
$('.parent').on('click', function () {
var children = getChildren($(this));
$.each(children, function () {
$(this).toggle();
})
});
})
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManager ID="script5" runat="server" EnablePageMethods="true"></asp:ScriptManager>
<asp:UpdatePanel ID="panelupdate5" runat="server"><ContentTemplate>
<div class="align-self-flex-center" style="/*margin-top:5px;*/margin-left:25px; margin-top:0.6510416666666667vw; margin-right:25px;">
<div id="containerseiterand">
<!-- Desktop/Tablet -->
<div class="d-none d-md-block">
<div class="col-6"></div>
<div class="row" style="background-color:white">
<div class="col-3">
<div class="row">
<div class="col-10"></div>
<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: 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: 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>
</asp:Table>
</div>
</div></div>
</div>
<div class="col-9">
<div class="col-12">
<asp:Image runat="server" ClientIDMode="AutoID" ID="Img_Text1" ImageUrl="~/images/Icons/Aviso.png" style="width:96px;height:96px" />
<asp:Label ID="lbl_sped_Placeholder" ClientIDMode="Static" runat="server" Font-Size="20px" Font-Bold="true">Bitte Spedition wählen</asp:Label>
</div>
<div class="col-12">
<asp:Label ID="lbl_natLKW" runat="server" ClientIDMode="Static" Font-Size="1.12em" style="color:#043381">Nationalität:</asp:Label><asp:Label runat="server" ID="lbl_Placeholder" style="font-size:1.12em">Placeholder</asp:Label>
</div>
<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: 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 runat="server" id="tablemain" class="col-12 table table-hover">
<tr>
<td>Bitte Daten auswählen durch klicken der Buttons</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<!-- Mobil -->
<div class="d-md-none">
<div class="col-12"></div>
<div class="row">
<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: 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: 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" Style="width: 382.5px">
<asp:TableHeaderRow Style="background-color: #043381; color: #fff; width: 382.5px" 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: 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" />
<asp:Label ID="lbl_sped_Placeholder_M" ClientIDMode="Static" runat="server" Font-Size="22px" Font-Bold="true">Bitte Spedition wählen...!</asp:Label>
</div>
<div class="col-12">
<asp:Label ID="lbl_natLKW_M" ClientIDMode="Static" runat="server" Font-Size="1.12em" Style="color:#043381"></asp:Label><asp:Label ID="lbl_Placeholder_M" runat="server" style="font-size:1.12em">Placeholder</asp:Label>
</div>
<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: 0.938em"></div>
<div id="conovertab_M" class="col-12" runat="server" 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 runat="server" id="tablemain_m" class="col-12 table table-hover" style="width: 385.5px">
<tr style="width: 385.5px">
<td>Bitte Daten auswählen durch Klicken der Buttons</td>
</tr>
</table>
</div>
</div>
</div>
</div> </div>
</ContentTemplate></asp:UpdatePanel>
<!-- jQuery CDN - Slim version (=without AJAX)
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>-->
<!--Below is the reference for JQuery as it will be needed for the ajax call and table creation-->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Popper.JS -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js" integrity="sha384-cs/chFZiN24E4KMATLdqdvsezGxaGsi4hLGOzlXwp5UZB1LY//20VyM2taTB4QvJ" crossorigin="anonymous"></script>-->
<!-- Production version -->
<script src="https://unpkg.com/@popperjs/core@2"></script>
<script>
function TableRow_Click(Nat, Kennzeichen,tempstrarr) {
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;
var rowCount = table.rows.length;
for (let i = rowCount - 1; i > 0; i--) {
table.deleteRow(i);
}
let arrtemp = tempstrarr.split(",");
for (let j = 0; j < arrtemp.length; j++) {
SDLNr = arrtemp[j];
j++;
Bez = arrtemp[j];
j++;
GueltBs = arrtemp[j];
j++;
KartNr = arrtemp[j];
Pagemethods.filltable2(table,SDLNr, Bez, GueltBs, KartNr);
}
addNewRow();
}
function onFailure(error) {
alert(error);
}
function TableRow_Click_M(Nat, Kennzeichen,tempstrarr_M) {
//debugger
let Speditionslabel = document.getElementById("<%=lbl_sped_Placeholder_M.ClientID%>");
let natplaceholder = document.getElementById("<%=lbl_Placeholder_M.ClientID%>");
let table_M = document.getElementById("<%=tbl_mainpage_M.ClientID%>")
Speditionslabel.textContent = Kennzeichen;
natplaceholder.textContent = Nat;
var rowCount = table.rows.length;
for (let i = rowCount - 1; i > 0; i--) {
table_M.deleteRow(i);
}
let arrtemp_M = tempstrarr_M.split(",");
for (let j = 0; j < arrtemp_M.length; j++) {
SDLNr = arrtemp_M[j];
j++;
Bez = arrtemp_M[j];
j++;
GueltBs = arrtemp_M[j];
j++;
KartNr = arrtemp_M[j];
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);
let td = tr.insertCell();
td.innerHTML = "SDL-Nr";
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%>");
let tr = table.insertRow(-1);
let td = tr.insertCell();
td.innerHTML = "SDL-Nr";
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%>");
let tr = table.insertRow(-1);
let td = tr.insertCell();
td.innerHTML = SDL;
td = tr.insertCell();
td.innerHTML = Bez;
td = tr.insertCell();
td.innerHTML = gueltigbs;
td = tr.insertCell();
td.innerHTML = Kartnr;
}
function addNewRow_M(SDL, Bez, gueltigbs, Kartnr) {
let table = document.getElementById("<%=tbl_mainpage_M.ClientID%>");
let tr = table.insertRow(-1);
let td = tr.insertCell();
td.innerHTML = SDL;
td = tr.insertCell();
td.innerHTML = Bez;
td = tr.insertCell();
td.innerHTML = gueltigbs;
td = tr.insertCell();
td.innerHTML = Kartnr;
}
function BuildTable(SDL, Bez, gueltigbis, KartNr) {
var address = null;
item = {
SDLNr: SDL,
Bezeichnung: Bez,
DateGueltig: gueltigbis,
CardNr: KartNr,
};
}
function BuildTable_M(SDL, Bez, gueltigbis, KartNr) {
var address = null;
item = {
SDLNr: SDL,
Bezeichnung: Bez,
DateGueltig: gueltigbis,
CardNr: KartNr,
};
}
</script>
<script>
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.SDL,
this.Bez,
this.Gueltigbis,
this.Kartnr
]);
});
$("#<%=tablemain.ClientID%>").dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bServerSide": true,
"sAjaxSource": "LKWs.aspx/filltable2",
"fnServerData": function (sSource, aoData, fnCallback) {
$.ajax({
"type": "POST",
"dataType": 'json',
"contentType": "application/json; charset=utf-8",
"url": sSource,
"async": "true",
"data": "{'sEcho': '" + aoData[0].value + "'}",
"success": function (msg) {
fnCallback(msg.d);
}
});
}
});
}
function renderTable_M(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.d, function () {
dtData.push([
this.SDL,
this.Bez,
this.Gueltigbis,
this.Kartnr
]);
});
$("#<%=tablemain_m.ClientID%>").dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bServerSide": true,
"sAjaxSource": "LKWs.aspx/filltable2_M",
"fnServerData": function (sSource, aoData, fnCallback) {
$.ajax({
"type": "POST",
"dataType": 'json',
"contentType": "application/json; charset=utf-8",
"url": sSource,
"async": "true",
"data": "{'sEcho': '" + aoData[0].value + "'}",
"success": function (msg) {
fnCallback(msg.d);
}
});
}
});
}
function renderTable_details(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.SDL,
this.Bez,
this.Gueltigbis,
this.Kartnr
]);
});
$("#<%=tablemain.ClientID%>").dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bServerSide": true,
"sAjaxSource": "LKWs.aspx/filltabledetails",
"fnServerData": function (sSource, aoData, fnCallback) {
$.ajax({
"type": "POST",
"dataType": 'json',
"contentType": "application/json; charset=utf-8",
"url": sSource,
"async": "true",
"data": "{'sEcho': '" + aoData[0].value + "'}",
"success": function (msg) {
fnCallback(msg.d);
}
});
}
});
}
function renderTable_details_M(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.d, function () {
dtData.push([
this.SDL,
this.Bez,
this.Gueltigbis,
this.Kartnr
]);
});
$("#<%=tablemain_m.ClientID%>").dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bServerSide": true,
"sAjaxSource": "LKWs.aspx/filltabledetails2_M",
"fnServerData": function (sSource, aoData, fnCallback) {
$.ajax({
"type": "POST",
"dataType": 'json',
"contentType": "application/json; charset=utf-8",
"url": sSource,
"async": "true",
"data": "{'sEcho': '" + aoData[0].value + "'}",
"success": function (msg) {
fnCallback(msg.d);
}
});
}
});
}
</script>
<script type="text/javascript">
function doPostBack(id) {
let Speditionslabel = document.getElementById('<%=lbl_sped_Placeholder.ClientID%>');
let natplaceholder = document.getElementById('<%=lbl_Placeholder.ClientID%>');
//alert(id)
let table = document.getElementById('<%=tablemain.ClientID%>');
var rowCount = table.rows.length;
for (let i = rowCount - 1; i > 0; i--) {
table.deleteRow(i);
}
Speditionslabel.textContent = id.split(',')[0];
natplaceholder.textContent = id.split(',')[1];
//debugger
//for (let i = 0; i <= 5; i++) {
// let SDL = "453543535434334543";
// let Bez = "Diesel";
// let Datguenstig = "01/05/2021";
//let KartNr = "6005222022021";
//addNewRow(SDL,Bez,Datguenstig,KartNr)
// Pagemethods.filltable2(<%' =tbl_mainpage %> , SDL, Bez, Datguenstig, KartNr)
//}
let data = {};
data['Kennzeichen'] = id.split(',')[0];
$.ajax({
type: "POST",
url: "LKWs.aspx/filltable2",
contentType: "application/json; charset=utf-8",
dataType: "json",
async:"true",
data: JSON.stringify(data),
success: function (data) {
// alert(data.d.AaData)
result = data.d.AaData;
// addheader();
var rowCount = table.rows.length;
for (let i = rowCount-1; i >= 0; i--) {
table.deleteRow(i);
}
let strheader = '<tr style="background-color:#043381;color:#fff"><th style="font-weight:600; color:white; width:224.25px">SDL-Nr</th><th style="font-weight:600; color:white;width:224.25px">Bezeichnung</th><th style="font-weight:600; color:white;width:224.25px">Gueltig bis</th><th style="font-weight:600; color:white;width:224.25px">Karten-Nummer</th></tr>';
$('#<%=tablemain.ClientID%>').append(strheader);
for (var i = 0; i < result.length; i++) {
//let strHTML4 = '<tr><td>878465464634</td><td>DIESEL</td><td>12/05/2026</td><td>151515313521351</td></tr>'
//alert('Horray! 200 status code!' + result[i]);
// alert(result.rows.length)
let iframe = '<iframe sandbox="allow-same-origin allow-scripts" runat="server" enableviewstate="true" style="width:99.75%;height:250px;overflow:cut; margin-top: -3px;padding-right:5px;padding-bottom:-20px;" id="iframe" scrolling="no" contenteditable="false" src="FormtemplateLKWS.aspx"></iframe>'
let strHTML4 = '<tr data-bs-toggle="collapse" data-bs-target="#accordion' + result[i]["3"] + '" class="clickable"><td style="width:224.25px">' + result[i]["0"] + '</td><td style="width:224.25px">' + result[i]["1"] + '</td><td style="width:224.25px">' + result[i]["2"] + '</td><td style="width:224.25px">' + result[i]["3"] + '</td><span class="sign"></span></tr><tr id="accordion' + result[i]["3"] + '" class="collapse accordion-collapse"><td colspan="4">' + iframe + '</td></tr>'
//alert(strHTML4)
$('#<%=tablemain.ClientID%>').append(strHTML4);
}
//renderTable(data.d);
//alert(strHTML);
//$('#<%'=tablemain.ClientID%>').append(strheaderL);
},
error: function (jqXHR, textStatus, errorThrown) {
alert("Status:" + jqXHR.status + "\nStatusText: " + textStatus + "\nError:" + errorThrown);
}
});
//filltable2(id.split(',')[0])
}
function doPostBack_M(id_M) {
let Speditionslabel = document.getElementById('<%=lbl_sped_Placeholder_M.ClientID%>');
let natplaceholder = document.getElementById('<%=lbl_Placeholder_M.ClientID%>');
// alert(id_M)
let table_M = document.getElementById('<%=tablemain_m.ClientID%>');
Speditionslabel.textContent = id_M.split(',')[0];
natplaceholder.textContent = id_M.split(',')[1];
//debugger
//for (let i = 0; i <= 5; i++) {
// let SDL = "453543535434334543";
// let Bez = "Diesel";
// let Datguenstig = "01/05/2021";
//let KartNr = "6005222022021";
//addNewRow(SDL,Bez,Datguenstig,KartNr)
// Pagemethods.filltable2(<%' =tbl_mainpage_M%> , SDL, Bez, Datguenstig, KartNr)
//}
let data_m = {};
data_m['Kennzeichen'] = id_M.split(',')[0];
$.ajax({
type: "POST",
url: "LKWs.aspx/filltable2_M",
contentType: "application/json; charset=utf-8",
dataType: "json",
async: "true",
data: JSON.stringify(data_m),
success: function (data_m) {
// alert(data.d.AaData)
result = data_m.d.AaData;
// addheader();
var rowCount = table_M.rows.length;
for (let i = rowCount - 1; i >= 0; i--) {
table_M.deleteRow(i);
}
let strheader_M = '<tr style="background-color:#043381;color:#fff;width:385.5px"><th style="font-weight:600; color:white;width:96.375px">SDL-Nr</th><th style="font-weight:600; color:white;width:96.375px">Bezeichnung</th><th style="font-weight:600; color:white;width:96.375px">Gueltig bis</th><th style="font-weight:600; color:white;width:96.375px">Karten-Nummer</th></tr>';
$('#<%=tablemain_m.ClientID%>').append(strheader_M);
for (var i = 0; i < result.length; i++) {
//let strHTML4 = '<tr><td>878465464634</td><td>DIESEL</td><td>12/05/2026</td><td>151515313521351</td></tr>'
//alert('Horray! 200 status code!' + result[i]);
// alert(result.rows.length)
detailtabelle_M(id_M.split(',')[0])
let iframe_M = ' <iframe sandbox="allow-same-origin allow-scripts" runat="server" enableviewstate="true" style="width:385.5px;height:206px" id="iframe1_m" contenteditable="true" src="FormtemplateLKWS.aspx" ></iframe>';
let strHTML4 = '<tr style="width:385.5px" data-bs-toggle="collapse" data-bs-target="#accordion_m' + result[i]["3"] + '" class="clickable"><td style="width:96.375px">' + result[i]["0"] + '</td><td style="width:96.375px">' + result[i]["1"] + '</td><td style="width:96.375px">' + result[i]["2"] + '</td><td style="width:96.375px">' + result[i]["3"] + '</td><span class="sign"></span></tr><tr id="accordion_m' + result[i]["3"] + '" class="collapse accordion-collapse"><td colspan="4">'+iframe_M+'</td><tr>'
//alert(strHTML4)
$('#<%=tablemain_m.ClientID%>').append(strHTML4);
}
//renderTable(data.d);
//alert(strHTML);
},
error: function (jqXHR, textStatus, errorThrown) {
alert("Status:" + jqXHR.status + "\nStatusText: " + textStatus + "\nError:" + errorThrown);
}
});
//filltable2(id.split(',')[0])
}
function testfunchtmlinhalt(id) {
alert(id.split(',')[0])
let strhtmlform_maut = ``
$.ajax({
url: url,
type: 'GET',
success: function (data) {
return $(data).find('#content').html();
},
error: function () {
alert("There was an error.");
}
});
}
function detailtabelle(id) {
alert("Testdata:" + id.split(',')[0])
let data = {};
data['Kennzeichen'] = id.split(',')[0];
$.ajax({
type: "POST",
url: "LKWs.aspx/filltabledetails",
contentType: "application/json; charset=utf-8",
dataType: "json",
async: "true",
data: JSON.stringify(data),
success: function (data) {
//alert(data.d.AaData)
result = data.d.AaData;
//addheader();
var rowCount = table.rows.length;
let tablewhole = {}
let tablestart = '<table>'
let tableend = '</table>'
let bodytable = ''
for (let i = rowCount - 1; i >= 0; i--) {
table_M.deleteRow(i);
}
tablewhole.push(tablestart)
for (var i = 0; i < result.length; i++) {
//let strHTML4 = '<tr><td>878465464634</td><td>DIESEL</td><td>12/05/2026</td><td>151515313521351</td></tr>'
//alert('Horray! 200 status code!' + result[i]);
// alert(result.rows.length)
let listdetailslisttemp = {}
for (let k = 0; k < result.AaData[i].length; k++) {
listdetailslisttemp.push(result.AaData[i])
}
alert(listdetailslisttemp.join(","))
let strhtmlform_maut = gethtmlofpage();
//let strlisttabledetails = '<ul class="list-group"><li data-bs-toggle="collapse" data-bs-target="#accordion' + id.split(',')[1] + '_1" class="list-group-item clickable">Gruppe1<span class="badge rounded-pill bg-primary">35</span></li><div id="accordion' + id.split(',')[1] + '_1" class="collapse accordion-collapse">data1</div></li><li class="list-group-item">Gruppe2<span class="badge rounded-pill bg-primary">25</span></li></ul>'
//let strHTML4 = '<tr style="width:385.5px" data-bs-toggle="collapse" data-bs-target="#accordion_m' + result[i]["3"] + '" class="clickable"><td style="width:96.375px">' + result[i]["0"] + '</td><td style="width:96.375px">' + result[i]["1"] + '</td><td style="width:96.375px">' + result[i]["2"] + '</td><td style="width:96.375px">' + result[i]["3"] + '</td><span class="sign"></span></tr><tr id="accordion_m' + result[i]["3"] + '" class="collapse accordion-collapse"><td colspan="4">' + detailtabelle_M(id_M.split(',')[0] + ',' + result[i]["3"])+'</td><tr>'
//alert(strHTML4)
tablewhole.push(strhtmlform_maut);
}
tablewhole.push(tableend)
return tablewhole.join(",");
//renderTable(data.d);
//alert(strHTML);
},
error: function (jqXHR, textStatus, errorThrown) {
alert("Status:" + jqXHR.status + "\nStatusText: " + textStatus + "\nError:" + errorThrown);
}
});
}
function detailtabelle_M(id_M) {
alert("Detail:" + id_M.split(',')[0])
var arrtemp = [];
// Data tables requires all data to be stuffed into a generic jagged array, so loop through our
// typed object and create one.
arrtemp.push([
"",
]);
let strlisttabledetails_M = '<ul class="list-group"><lidata-bs-toggle="collapse" data-bs-target="#accordion_m' + id.split(',')[1] + '_1" class="list-group-item clickable"><div id="accordion_m' + id.split(',')[1] + '_1" class="collapse accordion-collapse">Gruppe1<span class="badge rounded-pill bg-primary">35</span></div></li><li class="list-group-item">Gruppe2<span class="badge rounded-pill bg-primary">25</span></li></ul>'
return strlisttabledetails_M
}
</script>
</asp:Content>