<%@ Page Title="Zoho Integration" Language="C#" MasterPageFile="~/SunMaster.Master" AutoEventWireup="true" CodeBehind="Zoho.aspx.cs" Inherits="SUNWEB.Zoho" %>
<%@ Register Assembly="AjaxControlToolkit" TagPrefix="asp" Namespace="AjaxControlToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</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;">
        ZOHO INTEGRATION
       </td>    
     
     </tr>
     </table>--%>


     <div class="container-fluid">
      <div class="row">
        <div class="col-md-6">
          <h6 class="fw-light" >
            ZOHO INTEGRATION
          </h6>
        </div>
      </div>
    </div>
    

        <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 class="row">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">

       
        <h4  class="card-header" id="idGenReport" runat="server">
        <asp:Label ID="lblMsgTotalSelection" runat="server" CssClass="Labels"> </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"/>--%>  
        </h4>

 

<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="Barcode" AutoGenerateColumns="false" Font-Size="13px"
OnRowDataBound="GridView1_RowDataBound" Width="100%" EmptyDataText="No Record Found !" 
OnPageIndexChanging="GridView1_PageIndexChanging" AllowPaging="True" PageSize="20" >

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

    <Columns>
    <asp:BoundField DataField="Barcode" HeaderText="Barcode"  HeaderStyle-HorizontalAlign="Left"  HtmlEncode="False" ItemStyle-HorizontalAlign="left" ItemStyle-Width="25%"  />
    <asp:BoundField DataField="InventoryDesc" HeaderText="InventoryDesc"  HeaderStyle-HorizontalAlign="Left" HeaderStyle-CssClass="text-left" HtmlEncode="False" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="50%" />
    <asp:BoundField DataField="Qty" HeaderText="Qty"  HeaderStyle-HorizontalAlign="Right" HeaderStyle-CssClass="text-right" HtmlEncode="False" ItemStyle-HorizontalAlign="right" ItemStyle-Width="25%" />
    <asp:BoundField DataField="Price" HeaderText="Price"  HeaderStyle-HorizontalAlign="Right" HeaderStyle-CssClass="text-right" HtmlEncode="False" ItemStyle-HorizontalAlign="right" ItemStyle-Width="25%" />
    <asp:BoundField DataField="Disc" HeaderText="Disc"  HeaderStyle-HorizontalAlign="Right" HeaderStyle-CssClass="text-right" HtmlEncode="False" ItemStyle-HorizontalAlign="right" ItemStyle-Width="25%" />

 
    </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>
</tbody>
</table> 
</div>
</div> 
</div>


<div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
    <asp:Button ID="btnUploadSales" runat="server" Text="Upload Sales to Xero"  
    CssClass="btn btn-primary" onclick="btnUploadSales_Click"  />
</div>

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





     </ContentTemplate>
     </asp:UpdatePanel>

<script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css?v=1.1" rel="stylesheet" />
<!-- Bootstrap 5 -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" />
<!-- Optional Bootstrap Icons -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css" rel="stylesheet" />




</asp:Content>
