<%@ Page Title="" Language="VB" MasterPageFile="~/Customers/Customers.master"  CodeFile="Invoices.aspx.vb" Inherits="Customers_Default3" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" Runat="Server">
     <!-- Bootstrap -->
    
    <!-- Required meta tags -->
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <link rel="shortcut icon" href="../images/Icons/favicon/favicon.ico" />
    <style>
        @media (min-width: 558.98px) {
            .nav-item dropdown::marker {
                background-color: #fff;
                font-size: 0;
                visibility: hidden;
                color: #043381;
            }
            #normaltable {
                margin-left: -4px;
                width: 1254px;
            }
            .g-3 {
                margin-left: -4px;
            }            
            
        }
        @media (max-width: 558.98px) {
            body {
                position: absolute;
                width: 400px;
            }
            #normaltable{
                overflow-x:auto;width:380px;margin-left:-5px;
            }
            .g-3{
                overflow-x:auto;width:410px;margin-left:-7px;
            }
        }
    </style>    
     <!-- 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" href="https://unpkg.com/bootstrap-table@1.18.3/dist/bootstrap-table.min.css"/>     
    <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/Customers/MasterpageCustomers.css"/>       
    <link rel="stylesheet" type="text/css" href="../css/navbarsidebar2.css"/>      
    <link rel="stylesheet" type="text/css" href="../css/Customers/Invoices.css"/>   
    
 <link href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script>    
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
     <asp:ScriptManager ID="script1" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel ID="panelupdate1" runat="server"><ContentTemplate>
        <!-- Webiste-Content-->  
        <div id="containerseiterand" style="margin-left:auto;margin-right:auto">
            <div id="maincont">
                <div id="cont124">
                   <asp:HiddenField ID="hidField" ClientIDMode="Static" runat="server" />
       
                    <h1>Invoices</h1>
                    <div id="line" style="width:92%;"></div>
                    <br />
                    <h3>Here you'll find all Information about your Invoices.</h3>                   
         <%Try
                 VERAG_PROG_ALLGEMEIN.cAllgemein.ERR_OP_GLOBAL = VERAG_PROG_ALLGEMEIN.ERROR_OP.SHOW
                 'Dim AD As New VERAG_PROG_ALLGEMEIN.cAdressen(799124)
                 Dim VERAGSQL = New VERAG_PROG_ALLGEMEIN.SQL
                 ' MsgBox(VERAGSQL.GetADMINConnectionString())
                 'Response.Write(AD.Ordnungsbegriff)
                 Dim STANDORT = "SUB"
                 If (Request.QueryString.Count > 0) AndAlso (Request.QueryString("STANDORT") IsNot Nothing) Then
                     Try
                         STANDORT = (Request.QueryString("STANDORT"))
                     Catch ex As Exception
                         STANDORT = "SUB"
                     End Try
                 End If
                 If True Then
                     Dim AVISO_dt As System.Data.DataTable = VERAG_PROG_ALLGEMEIN.cAviso.getAVISO_List(STANDORT)
                     If AVISO_dt IsNot Nothing Then
                         If True Then 'AVISO.Status <> 1 And AVISO.Status <> 2 Then 'SENDUNGSTABELLE'%>  
                        <div class="col-12" style="margin-left:4px">
                            <div>
                                <div style="height:0.936768149882904vh"></div>
                                <div class="col-12" style="margin-left:2px">
                                    <h2>Invoices</h2>
                                </div>
                                <div style="margin-left:6px">
                                    <div class="col-12" style="text-align:end">
                                        <asp:LinkButton ID="btn_resetForm" runat="server" OnClick="btn_resetForm_Click">Formular zurücksetzen</asp:LinkButton>
                                    </div>
                                    <div style="height:20px">
                                         <asp:Label ID="lbl_status" runat="server" Font-Size="1em" ForeColor="Black" Text=""></asp:Label>
                                    </div>
                                    <div class="d-none d-md-block">
                                        <div style="width:780px;margin-left:8px">
                                             <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>       
                                       <!-- Hier könnten rbts hin-->                                            
                                        </div>
                                    </div>
                                    <div class="d-md-none">
                                        <div class="col-8" style="margin-left:8px">
                                            <!-- Hier könnten rbts hin! -->
                                        </div>
                                    </div>
                                </div>
                                </div>
                            <div style="height:0.936768149882904vh"></div> <div style="height:0.936768149882904vh"></div>
                           
                            <div style="height:0.936768149882904vh"></div>
                            <div class="col-12" id="con4">
                                <div class="col-12" id="container2" style="margin-left:2px">
                                    <asp:Label ID="lbl_von" runat="server" BorderStyle="None" ClientIDMode="Predictable">Von:</asp:Label>                                   
                                    <asp:TextBox ID="pickdate1" Type="Date" CssClass="classTarget" AutoPostback="false" runat="server" ClientIDMode="Predictable"></asp:TextBox>
                                    <asp:RequiredFieldValidator ControlToValidate="pickdate1" Display="Dynamic" ID="valreq_pickdate1" runat="server" ErrorMessage=""></asp:RequiredFieldValidator>
                                    <asp:CustomValidator runat="server" ID="valdaterage_1" OnServerValidate="valdaterage_1_ServerValidate" ControlToValidate="pickdate1" ForeColor="Red" Display="Dynamic" ErrorMessage="Fehler in Von-Feld" SetFocusOnError="true"></asp:CustomValidator> 
                                    <asp:Label ID="lbl_bis" runat="server" BorderStyle="None">Bis:</asp:Label>                                       
                                    <asp:Textbox ID="pickdate2" Type="Date" CssClass="classTarget" AutoPostback="false" runat="server" ClientIDMode="Predictable"></asp:Textbox>
                                    <asp:RequiredFieldValidator ControlToValidate="pickdate2" Display="Dynamic" ID="valreq_pickdate2" runat="server" ErrorMessage=""></asp:RequiredFieldValidator>
                                    <asp:CustomValidator ControlToValidate="pickdate2" runat="server" Display="Dynamic" ID="valdaterange_2" OnServerValidate="valdaterange_2_ServerValidate" ErrorMessage="Fehler in Bis-Feld" SetFocusOnError="true"></asp:CustomValidator>
                                </div>
                                <div id="Abstand"></div>
                            </div>
                            <hr />
                            <div class="col-12" id="cont3">
                                    <div id="Abstand"></div>
                                    <!-- Desktop/Tablet -->
                              <div class="d-none d-md-block">                                        
                                <div class="container">
                                        <div class="row">
                                            <div id="rowcol1" class="row-cols-1">    
                                                <asp:Label ID="lbl_LKWs" style="color:#043381;font-size:1em" runat="server">LKW-Kennzeichen</asp:Label>
                                                <asp:TextBox ID="txt_LKW" runat="server" style="width:145px;margin-left:16px" ClientIDMode="Predictable"></asp:TextBox>
                                                <asp:RequiredFieldValidator runat="server" ControlToValidate="txt_LKW" ID="reqval_txt_LKW" Enabled="false" ForeColor="Red"></asp:RequiredFieldValidator>
                                                <asp:RegularExpressionValidator ControlToValidate="txt_LKW" runat="server" ID="regex_txt_LKW" ValidationExpression="[A-Z0-9]{4,30}\d" ForeColor="Red" Display="Dynamic" ErrorMessage="Falsches Kennzeichen-Format!" SetFocusOnError="true"></asp:RegularExpressionValidator>
                                                <asp:Label ID="lbl_KdNrAuftrsg" runat="server" style="color:#043381;margin-left:10px" Font-Size="1em">Kunden-Auftragsnummer</asp:Label>
                                                <asp:TextBox ID="txt_KdNrAuftrag" runat="server" style="width:145px;margin-left:16px"></asp:TextBox>
                                                <asp:RequiredFieldValidator ControlToValidate="txt_KdNrAuftrag" runat="server" Display="Dynamic" ForeColor="Red" ID="reqval_txt_KdNrAuftrag" Enabled="false"></asp:RequiredFieldValidator>
                                                <asp:RegularExpressionValidator ControlToValidate="txt_KdNrAuftrag" ID="regex_txt_KdNrAuftrag" Enabled="false" runat="server" Display="Dynamic" ForeColor="Red" ValidationExpression="[0-9]{2,8}" ErrorMessage="Wrong Input!"></asp:RegularExpressionValidator>
                                            </div>
                                            <div id="rowcol2" class="row-cols-1" style="margin-top:6px">
                                                <asp:Label ClientIDMode="Predictable" style="color:#043381; font-size:1em;" ID="lbl_Absender" runat="server">Absender:</asp:Label>
                                                <asp:TextBox ID="txt_Absender" runat="server" style="width:145px;margin-left:63px"></asp:TextBox>
                                                <asp:RequiredFieldValidator ControlToValidate="txt_Absender" runat="server" ForeColor="Red" Enabled="false"></asp:RequiredFieldValidator>
                                                <asp:RegularExpressionValidator ControlToValidate="txt_Absender" runat="server" ID="regex_txt_Absender" ForeColor="Red" ValidationExpression="[^!,]{2,90}" SetFocusOnError="true" Display="Dynamic" ErrorMessage="Wrong Input! Try again!"></asp:RegularExpressionValidator>
                                                <asp:Label ID="lbl_Empaenger" ClientIDMode="Predictable" Font-Size="1em" runat="server" style="color:#043381;margin-left:11px">Empfänger:</asp:Label>
                                                <asp:TextBox ID="txt_Empfaenger" runat="server" style="width:145px;margin-left:102px"></asp:TextBox>
                                                <asp:RequiredFieldValidator ControlToValidate="txt_Empfaenger" runat="server" Enabled="false" ForeColor="Red" ID="reqval_txt_Empfaenger"></asp:RequiredFieldValidator>
                                                <asp:RegularExpressionValidator ControlToValidate="txt_Empfaenger" runat="server" ID="regex_txt_Empfaenger" ValidationExpression="[^!,]{2,90}" Display="Dynamic" ForeColor="Red" ErrorMessage="Empfänger: Falsche Eingabe!" SetFocusOnError="true"></asp:RegularExpressionValidator>
                                           </div>
                                            <div id="rowcol3" class="row-row-cols-1" style="margin-top:6px">
                                                <asp:Label ID="lbl_ReNr" ClientIDMode="Predictable" style="font-size:1em;color:#043381" runat="server">Rechnungs-Nr:</asp:Label>
                                                <asp:TextBox ID="txt_ReNr" runat="server" style="width:145px;margin-left:34px" AutoCompleteType="Notes"></asp:TextBox>
                                                <asp:RequiredFieldValidator ControlToValidate="txt_ReNr" runat="server" ID="reqval_txt_ReNr" Display="Dynamic" ForeColor="Red" Enabled="false" ></asp:RequiredFieldValidator>
                                                <asp:RegularExpressionValidator ControlToValidate="txt_ReNr" runat="server" ID="regex_txt_ReNr" ForeColor="Red" ValidationExpression="[0-9]{1,8}" Display="Dynamic" ErrorMessage="Please stay in the range of 8 numbers!"></asp:RegularExpressionValidator>
                                            </div>                                   
                                    </div></div>
                                </div>
                                    <!-- Mobil -->
                                <div class="d-md-none">
                                    <div class="container" style="margin-left:-10px">
                                     <div class="row" style="height:166px">
                                           <div id="rowcols4" class="row-cols-1" style="margin-right:/*1.52px;*/0.33480176211453744vw;">
                                               <asp:Label ID="lbl_LKW_M" runat="server" style="color:#043381" Font-Size="1em">LKW Kennzeichen:</asp:Label>
                                               <asp:TextBox ID="txt_LKW_M" runat="server" style="width:155px;margin-left:37px" ClientIDMode="Predictable"></asp:TextBox> 
                                               <asp:RequiredFieldValidator ControlToValidate="txt_LKW_M" runat="server" ID="regval_txt_LKW_M" Enabled="false"></asp:RequiredFieldValidator>
                                               <asp:RegularExpressionValidator ControlToValidate="txt_LKW_M" runat="server" ForeColor="Red" ID="regex_txt_LKW_M" ValidationExpression="[A-Z0-9]{4,30}\d" Display="Dynamic" ErrorMessage="Wrong plate format!" SetFocusOnError="true" Enabled="false"></asp:RegularExpressionValidator>
                                           </div>
                                         <div id="rowcols7" class="row-cols-1" style="margin-right:/*1.52px;*/0.33480176211453744vw;">
                                             <asp:Label ID="lbl_KdnNrAuftrag_M" runat="server" style="color:#043381;font-size:1em">KundenNr-Auftrag:</asp:Label>
                                               <asp:TextBox ID="txt_KdNrAuftrag_M" runat="server" style="width:155px;margin-left:28px" ClientIDMode="Predictable"></asp:TextBox> 
                                               <asp:RequiredFieldValidator ControlToValidate="txt_KdNrAuftrag_M" runat="server" ForeColor="Red" Enabled="false" ID="reqval_txt_KdNrAuftrag_M"></asp:RequiredFieldValidator>
                                               <asp:RegularExpressionValidator runat="server" ID="regex_txt_KdNrAuftrag_M" ControlToValidate="txt_KdNrAuftrag_M" ForeColor="Red" Display="Dynamic" ValidationExpression="[A-Z0-9]{5,30}/d" Enabled="false" ErrorMessage="No valid input found!"></asp:RegularExpressionValidator>
                                           </div>
                                           <div id="rowcols5" class="row-cols-1" style="margin-right:/*1.52px;*/0.33480176211453744vw;">
                                               <asp:Label ID="lbl_absender_M" runat="server" style="color:#043381" Font-Size="1em">Absender:</asp:Label>
                                             <asp:TextBox ID="txt_Absender_M" runat="server" style="width:155px;margin-left:92px"></asp:TextBox>
                                             <asp:RequiredFieldValidator ControlToValidate="txt_Absender_M" runat="server" style="width:155px;margin-left:18px" Enabled="false" ID="req_txt_Absender_M" ErrorMessage="" ForeColor="Red"></asp:RequiredFieldValidator>
                                             <asp:RegularExpressionValidator ControlToValidate="txt_Absender_M" runat="server" ID="regex_txt_Absender_M" Enabled="false" ValidationExpression="[^!,]{2,90}" ForeColor="Red" SetFocusOnError="true" Display="Dynamic" ErrorMessage="Wrong Input! Try again!"></asp:RegularExpressionValidator>
                                           </div>
                                               <div id="rowcols8" class="row-cols-1" style="margin-right:/*1.52px;*/0.33480176211453744vw;">
                                                <asp:Label ID="lbl_Empfaenger_M" runat="server" style="color:#043381" Font-Size="1em">Empfänger</asp:Label>
                                               <asp:TextBox ID="txt_Empfaenger_M" runat="server" style="width:155px;margin-left:84px"></asp:TextBox>
                                             <asp:RequiredFieldValidator ControlToValidate="txt_Empfaenger_M" runat="server" ID="reqval_txt_Empfaenger_M" ForeColor="Red" Enabled="false" Display="Dynamic"></asp:RequiredFieldValidator>
                                             <asp:RegularExpressionValidator ControlToValidate="txt_Empfaenger_M" ID="regex_txt_Empaenger_M" runat="server" ForeColor="Red" Enabled="false" ValidationExpression="[^!,]{2,90}" Display="Dynamic" style="width:105px;margin-left:13px" SetFocusOnError="true" ErrorMessage="Error! Try again!"></asp:RegularExpressionValidator>
                                          </div>
                                         <div id="rowcol6" class="row-cols-1" style="margin-right:/*1.52px;*/0.33480176211453744vw;">
                                             <asp:Label ID="lbl_ReNr_M" runat="server" style="color:#043381" Font-Size="1em">Rechnungs-Nummer:</asp:Label>
                                             <asp:TextBox ID="txt_ReNr_M" runat="server" style="width:155px;margin-left:7px"></asp:TextBox>  
                                             <asp:RequiredFieldValidator Enabled="false" ControlToValidate="txt_ReNr_M" runat="server" Display="Dynamic" ForeColor="Red" ErrorMessage="*"></asp:RequiredFieldValidator>
                                             <asp:RegularExpressionValidator ControlToValidate="txt_ReNr_M" runat="server" ID="regex_txt_ReNr_M" ForeColor="Red" Display="Dynamic" ValidationExpression="[0-9]{1,8}" Enabled="false" ErrorMessage="Please stay in the range of 8 numbers!"></asp:RegularExpressionValidator>
                                         </div>
                                      </div>
                                    </div>
                                </div>
                             </div>
                            </div>
                           </div>
                        </div>
            <div style="height:1.529051987767584vh"></div>
                    <div id="accordion">
                        <div class="accordion" id="accordionExample">
                            <div class="accordion-item">
                                <h2 class="accordion-header" id="headingOne">
                                    <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="false" aria-controls="collapseOne" style="height:10px">Erweiterte Suche</button>
                                </h2>
                            </div>
                            <asp:HiddenField ID="hfAccordionIndex" runat="server"/>
                            <div id="collapseOne" class="accordion-collapse collapse hide" aria-labelledby="headingOne" data-bs-parent="#accordionExample">
                                <div class="card card-body">
                                    <!--optionale Parameter könnten hierhin-->
                                </div>
                            </div>
                        </div>
                    </div>
                    <div id="Abstand_laenger" style="height:/*24px*/ 1.873536299765808vh;"></div>                                
            <asp:Button ID="btn_SendData" ClientIDMode="Predictable" CssClass="btn btn-primary" runat="server" Text="Erhalte Rechnungen!" CausesValidation="false" style="margin-top:2px;margin-bottom:auto;padding-bottom:2px;color:#043381;font-size:1.33em;background-color:#fff;height:35px;width:250px;"/>
            <div id="Abstand_lang" style="height: /*32px*/ 2.498048399687744vh;"></div> 
                       <div class="g-3">        
                            <div id="conovertab">
                                <asp:Table class="table table-responsive table-striped table-borderless" ID="normaltable" runat="server"  BorderStyle="Solid" style="border: 2px solid #043381;overflow-x:auto;width:1256px">
                                    <asp:TableHeaderRow ID="tbl_Header_row" runat="server" style="background-color:#043381;color:#fff">
                                        <asp:TableHeaderCell ID="tbl_HeaderCellIndex" runat="server" AbbreviatedText="Index">Index-Nr</asp:TableHeaderCell>
                                        <asp:TableHeaderCell ID="tbl_HeaderCell_ReNr" runat="server" AbbreviatedText="InvcNr">Invoice Number</asp:TableHeaderCell>
                                        <asp:TableHeaderCell ID="tbl_HeaderCell_LKWNr" runat="server" AbbreviatedText="LKW">LKW Nr</asp:TableHeaderCell>
                                        <asp:TableHeaderCell ID="tbl_HeaderCell_Auftragsdatum" runat="server" AbbreviatedText="OrderDate">Order date</asp:TableHeaderCell>
                                        <asp:TableHeaderCell ID="tbl_HeaderCell_KundenAuftrNummer" runat="server" AbbreviatedText="Cust. Order Num">Customer Order Number</asp:TableHeaderCell>
                                        <asp:TableHeaderCell ID="tbl_HeaderCell_Absender" runat="server" AbbreviatedText="Sender">Sender</asp:TableHeaderCell>
                                        <asp:TableHeaderCell ID="tbl_HeaderCell_Empfaenger" runat="server" AbbreviatedText="Reciev">Reciever</asp:TableHeaderCell>
                                        <asp:TableHeaderCell ID="tbl_HeaderCell_Info" runat="server" AbbreviatedText="Info" style="Width:75px">Information</asp:TableHeaderCell>
                                    </asp:TableHeaderRow>
                                </asp:Table>
                            </div>
                        </div>
            <%                 End If
                        End If
                    End If
                Catch ex As Exception
                    'Response.Write(ex.Message & ex.StackTrace)
                    Response.Write("Fehler bei den SQL-Einstellungen. Bitte den Admin kontaktieren.")
                End Try%>
                </div>
            </div>
        </div>
    </ContentTemplate></asp:UpdatePanel>   
</asp:Content>

