<%@ Page Title="OnlineKDS" Language="C#" MasterPageFile="~/SunMaster.Master" AutoEventWireup="true" CodeBehind="OnlineKDS.aspx.cs" Inherits="SUNWEB.OnlineKDS" %>
<%@ Register Assembly="AjaxControlToolkit" TagPrefix="asp" Namespace="AjaxControlToolkit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<meta http-equiv="refresh" content="30">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:UpdatePanel runat="server" ID="updatepanel1" UpdateMode="Conditional">
  <ContentTemplate>
       <table style="margin-left: 1%; width: 98%;">
       <tr>
      <td style="font-size:large; width: 50%; font-family:'Open Sans', sans-serif; font-weight:bolder;">
      ONLINE KDS
     </td>    
     
     </tr>
     </table>
    

      <div class="row">
                 
                          <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                            <div class="card">
                                                    
                                <div class="card-body">
                                 
                                
                                 <div class="form-row">
                                            <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                                <caption>
                                                    <label for="validationCustom03">
                                                      FROM DATE
                                                   </label>
                                                   <asp:TextBox ID="txtStartDt"  class="form-control" runat="server"  ></asp:TextBox>
                                                   <asp:CalendarExtender ID="calFirstDueDate"  Format="yyyy-MM-dd" runat="server"  TargetControlID="txtStartDt"  PopupPosition="BottomLeft" FirstDayOfWeek="Sunday"></asp:CalendarExtender>                         
                                                     
                                                </caption>
 
                                                    
                                                
                                            </div>
                                            <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                                <label for="validationCustom03"> TO DATE
                                                 </label>

                                                 <asp:TextBox ID="txtEndDt" class="form-control" runat="server" ></asp:TextBox>
                                                <asp:CalendarExtender ID="CalendarExtender1" Format="yyyy-MM-dd" runat="server"  TargetControlID="txtEndDt"  PopupPosition="BottomLeft" FirstDayOfWeek="Sunday"></asp:CalendarExtender>                         
                                                
                                           

                                            </div>
                                            <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                                <label for="validationCustom03">
                                                   <asp:Label ID="lblBranchAliasName"  ForeColor="Gray" runat="server" Text="Branch Name"></asp:Label></label>
                                              <asp:DropDownList ID="cmbBranches" CssClass="custom-select"  
                                                runat="server" AutoPostBack="true" 
                                            onselectedindexchanged="cmbBranches_SelectedIndexChanged"></asp:DropDownList>
                                            </div>

                                               <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">

                                                <asp:Button ID="btnGetReports" runat="server" Text="Apply"  
                                                CssClass="btn btn-primary" onclick="btnGetReports_Click" OnClientClick="return validate()" />
   
                                               </div>
                                        </div>
                                
                                 </div>
                                 
                                
                                                         
                                </div>
                            </div>
                        </div>
 
   
   <div>
       <h4>&nbsp;<asp:Label ID="lblGreeting" runat="server"></asp:Label></h4>
           <%--<asp:Button ID="btnPdf" runat="server" Text="PDF" 
            ToolTip="To Export  the Report Click Here"  CssClass="btn btn-secondary" 
            onclick="btnPdf_Click"/>--%>   
     </div>


    <div class="simple-card">
        <ul class="nav nav-tabs" id="myTab2" role="tablist">
            <li class="nav-item"><a class="nav-link active border-left-0" id="home-tab-simple"
                data-toggle="tab" href="#OrderList" role="tab" aria-controls="Order List" aria-selected="true">
                Order List </a></li>
            <li class="nav-item"><a class="nav-link" id="profile-tab-simple" data-toggle="tab"
                href="#Completed" role="tab" aria-controls="Completed List" aria-selected="false">
                Completed List</a> </li>
            <li class="nav-item"><a class="nav-link" id="profile-tab-simple1" data-toggle="tab"
                href="#Cancelled" role="tab" aria-controls="Cancelled List" aria-selected="false">
                Cancelled List</a> </li>
            <li class="nav-item"><a class="nav-link" id="profile-tab-simple2" data-toggle="tab"
                href="#Advanced" role="tab" aria-controls="Advance Bookings" aria-selected="false">
                Advance Bookings</a> </li>
         </ul>
        <div class="tab-content" id="myTabContent5">
         <div class="tab-pane fade show active" id="OrderList" role="tabpanel" aria-labelledby="home-tab-simple">
                <div class="card">
                    <%--<h5 class="card-header"  >
                        Order List </h5>--%>
                    <h5 class="card-header" style="background-color: #4c4c4c; color: White;font-size:14px;">Order List </h5>

                    <div class="card-body">
                    <div >


                    <div class="card-body">
                    <div class="table-responsive">
                    <div align="center" >
                    <table id="example4" class="table table-striped table-bordered" style="width:100%">
                    <tbody>
                    <caption>
                    <div align="center">

                    <asp:GridView ID="GridView1"
                    runat="server" showfooter="true"  BorderColor="Transparent" 
                    DataKeyNames="TransID" AutoGenerateColumns="false" Font-Size="13px"
                    Width="100%"
                    OnPageIndexChanging="GridView1_PageIndexChanging" AllowPaging="True" PageSize="20"  OnRowCommand="GridView1_RowCommand"  >

                        <HeaderStyle CssClass="dataTable" />
                        <HeaderStyle BackColor = "White" ForeColor="Black" />
                        <footerstyle backcolor= "White" ForeColor="Black" />
                        <%--<AlternatingRowStyle CssClass="dataTableAlt" />--%>
                        <RowStyle CssClass="dataTable" />

                            <Columns>

 
                            <asp:TemplateField HeaderText="TransID" SortExpression="TransID" ItemStyle-HorizontalAlign="left" >                                   
                            <ItemTemplate >
                            <asp:Label ID="lblTransid"   runat="server" Text='<%#Eval("TransID") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="TransNo" SortExpression="TransNo" ItemStyle-HorizontalAlign="left" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblTransNo"   runat="server" Text='<%#Eval("TransNo") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="PayDate" SortExpression="PayDate" ItemStyle-HorizontalAlign="left" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblPayDate"   runat="server" Text='<%#Eval("PayDate") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="DeliveryDate" SortExpression="DeliveryDate" ItemStyle-HorizontalAlign="left" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblDeliveryDate"   runat="server" Text='<%#Eval("DeliveryDate") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="P.Amount" SortExpression="PayAmt" ItemStyle-HorizontalAlign="Right" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblPayAmt"   runat="server" Text='<%#Eval("PayAmt") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="P.Type" SortExpression="PaymentType" ItemStyle-HorizontalAlign="Left" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblPaymentType"   runat="server" Text='<%#Eval("PaymentType") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Status" SortExpression="Olstatus" ItemStyle-HorizontalAlign="Left" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblOlstatus"   runat="server" Text='<%#Eval("Olstatus") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                             <asp:TemplateField>  
                             <ItemTemplate>  
                             <asp:Button ID="btnDetail" runat="server" Width="60" Text="Detail" BackColor="Black" ForeColor="White" CommandName="EditDetails" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" />  
                             </ItemTemplate>  
                             </asp:TemplateField>

                             </Columns>

                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                        <RowStyle ForeColor="#000066" />
                                        <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                                        <SortedAscendingCellStyle BackColor="#F1F1F1" />
                                        <SortedAscendingHeaderStyle BackColor="#007DBB" />
                                        <SortedDescendingCellStyle BackColor="#CAC9C9" />
                                        <SortedDescendingHeaderStyle BackColor="#00547E" />
                        </asp:GridView>                     
                    </div>
                    </caption>
                    </table>
                    </div>
                    </div>
                    </div>


                    </div>
                    </div>
                </div>
         </div>

         <div class="tab-pane fade" id="Completed" role="tabpanel" aria-labelledby="profile-tab-simple">
                <div class="card">
 <%--                   <h5 class="card-header">
                        Completed List</h5>--%>
                    <h5 class="card-header" style="background-color: #4c4c4c; color: White;font-size:14px;">Completed List </h5>
                    <div class="card-body">
                    <div >


                    <div class="card-body">
                    <div class="table-responsive">
                    <div align="center" >
                    <table id="Table1" class="table table-striped table-bordered" style="width:100%">
                    <tbody>
                    <caption>
                    <div align="center">

                    <asp:GridView ID="GridView2"
                    runat="server" showfooter="true"  BorderColor="Transparent" 
                    DataKeyNames="TransID" AutoGenerateColumns="false" Font-Size="13px"
                    Width="100%"
                    OnPageIndexChanging="GridView2_PageIndexChanging" AllowPaging="True" PageSize="20"  OnRowCommand="GridView1_RowCommand"  >

                        <HeaderStyle CssClass="dataTable" />
                        <HeaderStyle BackColor = "White" ForeColor="Black" />
                        <footerstyle backcolor= "White" ForeColor="Black" />
                        <%--<AlternatingRowStyle CssClass="dataTableAlt" />--%>
                        <RowStyle CssClass="dataTable" />

                            <Columns>

 
                            <asp:TemplateField HeaderText="TransID" SortExpression="TransID" ItemStyle-HorizontalAlign="left" >                                   
                            <ItemTemplate >
                            <asp:Label ID="lblTransid"   runat="server" Text='<%#Eval("TransID") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="TransNo" SortExpression="TransNo" ItemStyle-HorizontalAlign="left" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblTransNo"   runat="server" Text='<%#Eval("TransNo") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="PayDate" SortExpression="PayDate" ItemStyle-HorizontalAlign="left" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblPayDate"   runat="server" Text='<%#Eval("PayDate") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="DeliveryDate" SortExpression="DeliveryDate" ItemStyle-HorizontalAlign="left" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblDeliveryDate"   runat="server" Text='<%#Eval("DeliveryDate") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="P.Amount" SortExpression="PayAmt" ItemStyle-HorizontalAlign="Right" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblPayAmt"   runat="server" Text='<%#Eval("PayAmt") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="P.Type" SortExpression="PaymentType" ItemStyle-HorizontalAlign="Left" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblPaymentType"   runat="server" Text='<%#Eval("PaymentType") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Status" SortExpression="Olstatus" ItemStyle-HorizontalAlign="Left" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblOlstatus"   runat="server" Text='<%#Eval("Olstatus") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                             <asp:TemplateField>  
                             <ItemTemplate>  
                             <asp:Button ID="btnDetail" runat="server" Width="60" Text="Detail" BackColor="Black" ForeColor="White" CommandName="EditDetails" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" />  
                             </ItemTemplate>  
                             </asp:TemplateField>

                             </Columns>

                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                        <RowStyle ForeColor="#000066" />
                                        <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                                        <SortedAscendingCellStyle BackColor="#F1F1F1" />
                                        <SortedAscendingHeaderStyle BackColor="#007DBB" />
                                        <SortedDescendingCellStyle BackColor="#CAC9C9" />
                                        <SortedDescendingHeaderStyle BackColor="#00547E" />
                        </asp:GridView>                     
                    </div>
                    </caption>
                    </table>
                    </div>
                    </div>
                    </div>


                    </div>
                    </div>

                </div>
         </div>

         <div class="tab-pane fade" id="Cancelled" role="tabpanel" aria-labelledby="profile-tab-simple">
                <div class="card">
 <%--                    <h5 class="card-header">
                        Cancelled List</h5>--%>
                    <h5 class="card-header" style="background-color: #4c4c4c; color: White;font-size:14px;">Cancelled List </h5>
                    <div class="card-body">
                    <div >


                    <div class="card-body">
                    <div class="table-responsive">
                    <div align="center" >
                    <table id="Table2" class="table table-striped table-bordered" style="width:100%">
                    <tbody>
                    <caption>
                    <div align="center">

                    <asp:GridView ID="GridView3"
                    runat="server" showfooter="true"  BorderColor="Transparent" 
                    DataKeyNames="TransID" AutoGenerateColumns="false" Font-Size="13px"
                    Width="100%"
                    OnPageIndexChanging="GridView3_PageIndexChanging" AllowPaging="True" PageSize="20"  OnRowCommand="GridView1_RowCommand"  >

                        <HeaderStyle CssClass="dataTable" />
                        <HeaderStyle BackColor = "White" ForeColor="Black" />
                        <footerstyle backcolor= "White" ForeColor="Black" />
                        <%--<AlternatingRowStyle CssClass="dataTableAlt" />--%>
                        <RowStyle CssClass="dataTable" />

                            <Columns>

 
                            <asp:TemplateField HeaderText="TransID" SortExpression="TransID" ItemStyle-HorizontalAlign="left" >                                   
                            <ItemTemplate >
                            <asp:Label ID="lblTransid"   runat="server" Text='<%#Eval("TransID") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="TransNo" SortExpression="TransNo" ItemStyle-HorizontalAlign="left" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblTransNo"   runat="server" Text='<%#Eval("TransNo") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="PayDate" SortExpression="PayDate" ItemStyle-HorizontalAlign="left" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblPayDate"   runat="server" Text='<%#Eval("PayDate") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="DeliveryDate" SortExpression="DeliveryDate" ItemStyle-HorizontalAlign="left" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblDeliveryDate"   runat="server" Text='<%#Eval("DeliveryDate") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="P.Amount" SortExpression="PayAmt" ItemStyle-HorizontalAlign="Right" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblPayAmt"   runat="server" Text='<%#Eval("PayAmt") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="P.Type" SortExpression="PaymentType" ItemStyle-HorizontalAlign="Left" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblPaymentType"   runat="server" Text='<%#Eval("PaymentType") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Status" SortExpression="Olstatus" ItemStyle-HorizontalAlign="Left" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblOlstatus"   runat="server" Text='<%#Eval("Olstatus") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                             <asp:TemplateField>  
                             <ItemTemplate>  
                             <asp:Button ID="btnDetail" runat="server" Width="60" Text="Detail" BackColor="Black" ForeColor="White" CommandName="EditDetails" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" />  
                             </ItemTemplate>  
                             </asp:TemplateField>

                             </Columns>

                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                        <RowStyle ForeColor="#000066" />
                                        <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                                        <SortedAscendingCellStyle BackColor="#F1F1F1" />
                                        <SortedAscendingHeaderStyle BackColor="#007DBB" />
                                        <SortedDescendingCellStyle BackColor="#CAC9C9" />
                                        <SortedDescendingHeaderStyle BackColor="#00547E" />
                        </asp:GridView>                     
                    </div>
                    </caption>
                    </table>
                    </div>
                    </div>
                    </div>


                    </div>
                    </div>
                </div>
         </div>

         <div class="tab-pane fade" id="Advanced" role="tabpanel" aria-labelledby="profile-tab-simple">
                <div class="card">
 <%--                    <h5 class="card-header">
                        Cancelled List</h5>--%>
                    <h5 class="card-header" style="background-color: #4c4c4c; color: White;font-size:14px;">Advance Bookings </h5>
                    <div class="card-body">
                    <div >


                    <div class="card-body">
                    <div class="table-responsive">
                    <div align="center" >
                    <table id="Table3" class="table table-striped table-bordered" style="width:100%">
                    <tbody>
                    <caption>
                    <div align="center">

                    <asp:GridView id="GridView4"
                    runat="server" showfooter="true"  BorderColor="Transparent" 
                    DataKeyNames="TransID" AutoGenerateColumns="false" Font-Size="13px"
                    Width="100%"
                    OnPageIndexChanging="GridView4_PageIndexChanging" AllowPaging="True" PageSize="20"  OnRowCommand="GridView4_RowCommand"  >

                        <HeaderStyle CssClass="dataTable" />
                        <HeaderStyle BackColor = "White" ForeColor="Black" />
                        <footerstyle backcolor= "White" ForeColor="Black" />
                        <%--<AlternatingRowStyle CssClass="dataTableAlt" />--%>
                        <RowStyle CssClass="dataTable" />

                            <Columns>

 
                            <asp:TemplateField HeaderText="TransID" SortExpression="TransID" ItemStyle-HorizontalAlign="left" >                                   
                            <ItemTemplate >
                            <asp:Label ID="lblTransid"   runat="server" Text='<%#Eval("TransID") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="TransNo" SortExpression="TransNo" ItemStyle-HorizontalAlign="left" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblTransNo"   runat="server" Text='<%#Eval("TransNo") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="PayDate" SortExpression="PayDate" ItemStyle-HorizontalAlign="left" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblPayDate"   runat="server" Text='<%#Eval("PayDate") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="DeliveryDate" SortExpression="DeliveryDate" ItemStyle-HorizontalAlign="left" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblDeliveryDate"   runat="server" Text='<%#Eval("DeliveryDate") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="P.Amount" SortExpression="PayAmt" ItemStyle-HorizontalAlign="Right" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblPayAmt"   runat="server" Text='<%#Eval("PayAmt") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="P.Type" SortExpression="PaymentType" ItemStyle-HorizontalAlign="Left" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblPaymentType"   runat="server" Text='<%#Eval("PaymentType") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Status" SortExpression="Olstatus" ItemStyle-HorizontalAlign="Left" >                                    
                            <ItemTemplate >
                            <asp:Label ID="lblOlstatus"   runat="server" Text='<%#Eval("Olstatus") %>'></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>

                             <asp:TemplateField>  
                             <ItemTemplate>  
                             <asp:Button ID="btnDetail" runat="server" Width="60" Text="Detail" BackColor="Black" ForeColor="White" CommandName="EditDetails" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" />  
                             </ItemTemplate>  
                             </asp:TemplateField>

                             </Columns>

                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                        <RowStyle ForeColor="#000066" />
                                        <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                                        <SortedAscendingCellStyle BackColor="#F1F1F1" />
                                        <SortedAscendingHeaderStyle BackColor="#007DBB" />
                                        <SortedDescendingCellStyle BackColor="#CAC9C9" />
                                        <SortedDescendingHeaderStyle BackColor="#00547E" />
                        </asp:GridView>                     
                    </div>
                    </caption>
                    </table>
                    </div>
                    </div>
                    </div>


                    </div>
                    </div>
                </div>
         </div>


        </div> 

         

    </div> 


    

     </ContentTemplate>
     </asp:UpdatePanel>

     <br /><br />
</asp:Content>
