<%@ Page Title="OnlineKDS Details" Language="C#" MasterPageFile="~/SunMaster.Master" AutoEventWireup="true" CodeBehind="OnlineKDSDetails.aspx.cs" Inherits="SUNWEB.OnlineKDSDetails" %>
<%@ Register Assembly="AjaxControlToolkit" TagPrefix="asp" Namespace="AjaxControlToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    
    <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
    <script src="Scripts/sweetalert.min.js"></script>
    <script src="Scripts/sweetalert2.js"></script>
 <style>
  table 
  {
 
  width: 100%;
  align-content:center;
  }
 td {
   padding: 1px;
   text-align: left;
     
 }
tr:hover {background-color:#f5f5f5;}



</style>

 
    <style>
        .DivSubtotal {
            margin-left: 6px;
            margin-right: 24px;
            /*font-size: 11pt;*/
            font-weight: 900;
            text-indent: 3pt;
            font-size:12pt;

        }

        .QTYCss {
            font-size: 9pt;
            font-weight: 100;
          
            /*font-family:Arial;*/
        }

        .divFooterCss {
            text-indent: 20px;
            width: 100%;
            text-align:center;
            /*font-family: Arial;*/
            font-family:Helvetica;
            font-size: 11pt;
        }

        .divLeft {
            float: left;
            width: 100px;
            text-indent: 3px;
            /*font-size: 11pt;*/
            font-size:12pt;
            font-family:Arial;
            font-weight: 900;
           
        }

        .divRight {
            float: right;
            width: 100px;
            text-indent: 30px;
            /*font-weight: 100;*/
            font-size: 12pt;     
            font-weight:900;
            font-family:Arial;
        }

        .ButtonBack {
            height: 45px;
            font-size: 16px;
            border: medium;
            font-family: Arial;
            width: 96%;
            margin: 8px;
            border-radius: 30px;
            font-weight: 900;
            background-color: black;
            color: white;
            
        }


        .stickyViewBill {
            position: -webkit-sticky;
            position: fixed;
            /* background-color: lightgrey;*/
            /*background-color: #e5e5e5;*/
            background:  linear-gradient(to top, #ffffff 0%, #333300 330%);
            padding: 0px;
            font-size: 20px;
            width: 100%;
            bottom: 0px;
            left: 0px;
            height: 60px;
        }
    </style>
     <script type="text/javascript">
         
         function sweetAlertConfirm(btnConfirm) {
             //alert("test");
             var datalist = document.getElementById("<%=dtOLOrderView.ClientID%>");
             if (datalist != undefined) {
                 if (btnConfirm.dataset.confirmed == undefined) {
                     btnConfirm.dataset.confirmed = false;
                 } else if (btnConfirm.dataset.confirmed == 'false') {
                     btnConfirm.dataset.confirmed = false;
                 } else {
                     btnConfirm.dataset.confirmed = true;
                     btnConfirm.click();
                     return true;
                 }
              
                 event.preventDefault();
                 Swal.fire({
                     title: 'Are you sure want to send this order?',
                     text: "You won't be able to revert this!",
                     showCancelButton: true,
                     confirmButtonColor: '#008000',
                     cancelButtonColor: '#d33',
                     confirmButtonText: 'Yes',
                     cancelButtonText: "No",
                 }).then((isConfirm) => {
                     if (isConfirm.value) {
                         btnConfirm.dataset.confirmed = true;
                         btnConfirm.click();
                     } else {
                         swal("Cancelled", "Your order havent send.", "error");
                         btnConfirm.dataset.confirmed = false;
                     }
                 });
             }
         }

     </script>

    <script type="text/javascript">
         
         function sweetAlertConfirm1(btnCancel) {
          
             var datalist = document.getElementById("<%=dtOLOrderView.ClientID%>");
             if (datalist != undefined) {
                 if (btnCancel.dataset.confirmed == undefined) {
                     btnCancel.dataset.confirmed = false;
                 } else if (btnConfirm.dataset.confirmed == 'false') {
                     btnCancel.dataset.confirmed = false;
                 } else {
                     btnCancel.dataset.confirmed = true;
                     btnCancel.click();
                     return true;
                 }
               
                 event.preventDefault();
                 Swal.fire({
                     title: 'Are you sure want to Cancel this order?',
                     text: "You won't be able to revert this!",
                     showCancelButton: true,
                     confirmButtonColor: '#008000',
                     cancelButtonColor: '#d33',
                     confirmButtonText: 'Yes',
                     cancelButtonText: "No",
                 }).then((isConfirm) => {
                     if (isConfirm.value) {
                         btnCancel.dataset.confirmed = true;
                         btnCancel.click();
                     } else {
                         swal("Cancelled", "Your order havent send.", "error");
                         btnCancel.dataset.confirmed = false;
                     }
                 });
             }
         }

     </script>



    
 </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">


                      <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 align="right">
                                            <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" Enabled="false"
                                            onselectedindexchanged="cmbBranches_SelectedIndexChanged"></asp:DropDownList>
                                            </div>

                                            
                                           
                                        </div>


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

   
    
     <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <ContentTemplate>

                <table style="text-align:left; margin-left:10px">
               <tr>
                   <td></td>
                 <td>
                     <asp:Label ID="Label4" runat="server" Text="Trans-No"></asp:Label> : <b> <asp:Label ID="lblHTransNO" runat="server" ></b></asp:Label>
                 </td>   
                 <td >
                      <asp:Label ID="Label6" runat="server" Text="Order Date"></asp:Label> :  <b><asp:Label ID="lblOrderDate" runat="server" ></b></asp:Label>
                 </td>

                </tr>

                 <tr>
                   <td></td>
                 <td>
                 <asp:Label ID="Label7" runat="server" Text="Pay Type"></asp:Label> :<b> <asp:Label ID="lblPaymentType" runat="server" > </b></asp:Label>
                 </td>   
                 <td>
                  <asp:Label ID="Label9" runat="server" Text="&nbsp;Pay&nbsp;&nbsp; Date"></asp:Label> :<b> <asp:Label ID="lblPaymentDate" runat="server" ></b></asp:Label>
                 </td>
                 <td>
                 <asp:HiddenField ID="hidTransid" runat="server" />
                 <asp:HiddenField ID="hidUserid" runat="server" />
                 </td>

                </tr>


               </table>
          <separatortemplate>
          <hr class="Dt_RowSeparator" />
          </separatortemplate>

             <%-- <table>
                    <tr>
                        <td>
                         <table style="margin-left:10px; width:100%" >
                         <thead>
                         <tr>
                         
                          <td style="width:20%; font-family: Arial;text-align:left; font-weight:bold ">Item</td>
                          <td style="width:20%;  font-family: Arial;text-align:left;font-weight:bold"> U.Price</td>
                          <td style="width:30%; font-family: Arial;text-align:left;font-weight:bold" >Qty</td>
                          <td style="width:20px; font-family: Arial;text-align:left;font-weight:bold">Amount</td>
                       </tr>
                      </thead>
                     </table>
                   </td>

                </tr>
           </table>
         --%>

            <asp:DataList runat="server" RepeatColumns="1" ID="dtOLOrderView"  Width="95%" border="0"  OnItemDataBound="dtOLOrderView_ItemDataBound">

              <HeaderTemplate>
                   <table style="margin-left:10px; width:95%">
                        <tr>
                            
                             <td style="width:40%; font-family: Arial;text-align:left;padding-top:1px; font-weight:bold "><strong>Item Name</strong></td>
                             <td style="width:35%; font-family: Arial;text-align:left;padding-top:1px;font-weight:bold"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;U.Price</strong></td>
                             <td style="width:25%; font-family: Arial;text-align:left;padding-top:1px;font-weight:bold"><strong>&nbsp;&nbsp;&nbsp;Qty</strong></td>
                             <td style="width:35%; font-family: Arial;text-align:left;padding-top:1px;font-weight:bold"> <strong>Amount</strong></td>
                        </tr>
                    </table>
                </HeaderTemplate>

              <ItemTemplate>
                <asp:Label ID="lblTransid" Text='<%# Eval("Transid") %>' runat="server" Visible="false" />
                <asp:Label ID="lblTransNo" Text='<%# Eval("TransNo") %>' runat="server" Visible="false" />
                <asp:Label ID="lblItemID" Text='<%# Eval("ItemID")%>' runat="server"  Visible="false"/>

              <table style="margin-left:10px; width:95% ;font-size:11px; ">
                
                 <tr>
                    <td style="width:20%; font-family: Arial;text-align:left;">
                       <asp:Label ID="lblInventoryDesc" Text='<%# Eval("InventoryDesc")%>' runat="server" />
                    </td>
                     <td style="width:20%;  font-family: Arial;text-align:left;">
                       <asp:Label ID="lblUnitPrice" Text='<%# "S$ " + Eval("Price", "{0:N2}")%>' runat="server" />
                    </td>
                    <td style="width:15%; font-family: Arial;text-align:left;">
                       <asp:Label ID="lblQty" Text='<%# Eval("Qty")%>' runat="server" /> 
                    </td>
                    <td style="width:20%; font-family: Arial;text-align:left;">
                      <asp:Label ID="lblAmount" Text='<%# "S$ "+ Eval("Amount" ,"{0:N2}")%>' runat="server" /> 
                    </td>
                    
                    
                   </tr>

                   <tr>
            
                       
                       <td style="width:50%; font-family: Arial;text-align:left;padding-top:2px">
                         <asp:DataList ID="dlCondiments" Width="155px" runat="server">
                         <HeaderTemplate>
                         </HeaderTemplate>
                         <ItemTemplate>

                         
                       <div style="text-indent:0px; text-align:left">
                       + <asp:Label ID="lblCondiment" Text='<%#Eval("CondimentName")%>' runat="server" />
                       </div>
                      
                        
                         </ItemTemplate>
                         </asp:DataList>
                                    
                       </td>

                  
                  </tr>


            </table>
              
    
         </ItemTemplate>
         
        </asp:DataList>


          <separatortemplate>
          <hr class="Dt_RowSeparator" />
          </separatortemplate>

                 <table style="text-align:left; font-size:12px; font-weight:bold; margin-left:10px">
                  <tr>
                   <td style="width:20%;"></td>
                   <td style="width:20%;"></td>
                   <td style="width:20%;text-align:center"> <asp:Label ID="lblQtyDL" runat="server" Text="0.00"></asp:Label></td>
                   <td style="width:20%;"> <asp:Label ID="lblSubTotalDL" runat="server" Text="0.00"></asp:Label></td>
                 </tr>
                 </table>

                 <separatortemplate>
          <hr class="Dt_RowSeparator" />
          </separatortemplate>


          <h5> <b>&nbsp;&nbsp;&nbsp;Payment Details : </b></h5>
         <%-- <div class="DivSubtotal">
          <asp:Label ID="Label2" runat="server" Text="Total Qty :"></asp:Label>
          <asp:Label ID="lblTQTY" runat="server" Text="0 Item(s)" CssClass="QTYCss"></asp:Label>
          </div>--%>

         <%-- <div class="divFooterCss">
              <div class="divLeft">
              <asp:Label ID="Label1" runat="server" Text="Subtotal"></asp:Label>
              <asp:Label ID="Label3" runat="server" Text="GST"></asp:Label>
              <br />
              <asp:Label ID="Label5" runat="server" Text="Total"></asp:Label>
              </div>
              <div class="divRight">
              <asp:Label ID="lblSubtotal" runat="server" Text="0.00"></asp:Label>
              <br />
              <asp:Label ID="lblGST" runat="server" Text="0.00"></asp:Label>
              <br />
              <asp:Label ID="lblTOTAL" runat="server" Text="0.00"></asp:Label>
              </div>
          </div>--%>
            
            <table style="text-align:left; font-size:16px; font-weight:bold; margin-left:10px">
               <tr>
                   <td></td>
               
                 <td>
                     <asp:Label ID="Label2" runat="server" Text="Total Qty" ></asp:Label>
                 </td>  
                   <td></td>
                   <td></td>
                   <td></td>
                 <td>
                     <asp:Label ID="lblTQTY" runat="server" Text="0 Item(s)"></asp:Label>
                 </td>

                </tr>

                <tr>
                   <td></td>
                   <td>
                    <asp:Label ID="Label1" runat="server" Text="Subtotal"></asp:Label>
                    </td>
                    <td></td>
                    <td></td>
                   <td></td>
                    <td>
                    <asp:Label ID="lblSubtotal" runat="server" Text="0.00"></asp:Label>
                    </td>

                </tr>
                <tr>
                    <td></td>
                 
                    <td>
                    <asp:Label ID="Label3" runat="server" Text="GST"></asp:Label>
                    </td>
                    <td></td>  
                    <td></td>   
                    <td></td>
                    <td>
                    <asp:Label ID="lblGST" runat="server" Text="0.00"></asp:Label>
                    </td>
                    
                </tr>

                <tr>
                <td></td>
                <td>
                
                <asp:Label ID="Label5" runat="server" Text="Total"></asp:Label>
                </td>
                <td></td>
                <td></td>
                <td></td>
                <td>
                <hr />
                <asp:Label ID="lblTOTAL" runat="server" Text="0.00"></asp:Label>
                <hr />
                </td>

                </tr>

            </table>


              <table style="text-align:left; font-size:12px;  margin-left:10px">
                  <tr style=" font-weight:500">
                     <th > <h5><b> Delivery Address</b> </h5> </th>
                                           
                  </tr>

                  <tr>
                  <td> Customer Name  </td>
                  
                  <td><asp:label id="lblCustomerName" runat="server"></asp:label></td>

                  </tr>
                  <tr>
                  <td> Mobile  </td>
                  
                  <td><asp:label id="lblCustMobile" runat="server"></asp:label></td>

                  </tr>

                  <tr>
                      <td>Address</td>
                      <td><asp:label id="lblAddress1" runat="server"></asp:label></td>

                  </tr>
                  <tr>
                  <td> </td>
                  
                  <td><asp:label id="lblAddress2" runat="server"></asp:label></td>

                  </tr>
               <%-- <tr>
                   <td> Place </td>
                   <td><asp:label id="lblAddress3" runat="server"></asp:label></td>
                  </tr>
                 <tr>
                  <td>Pincode</td>
                  <td><asp:label id="lblAddress4" runat="server"></asp:label></td>
                 </tr>--%>
              </table>
              <br />
              <div align="center">
              <asp:Button ID="btnCofirm" runat="server" Text="Cofirm"   BackColor="Green" ForeColor="White"  Width="70px" Height="40px" OnClick="btnCofirm_Click" />
              <asp:Button ID="btnCancel" runat="server" Text="Cancel"  BackColor="red" ForeColor="White" Width="70px" Height="40px"  OnClick="btnCancel_Click"/>              
            </div> 
         <br />
      </ContentTemplate>
     </asp:UpdatePanel>
    
    <br /><br />
</asp:Content>
