<%@ Page Title="Supplier Wise cost and Collection Report" Language="C#" MasterPageFile="~/SunMaster.Master" AutoEventWireup="true" CodeBehind="SupplierwisecostandcollectionReport.aspx.cs" Inherits="SUNWEB.SupplierwisecostandcollectionReport" %>
<%@ Register Assembly="AjaxControlToolkit" TagPrefix="asp" Namespace="AjaxControlToolkit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

<link type="text/css" rel="Stylesheet" href="css/NestedDG.css" />
     <style type="text/css">
    @media only screen and (max-width: 600px) {
    table, th, td {
        font-size: 10px;
        font-weight:bold;
        
    }
    
     .Labels{font-size:10px; }
     .alnright { text-align: right; }
       
             }
    
    
    
    </style>

    
    <style type="text/css">
        .overlay
        {
            position: fixed;
            top: 0px;
            left: 0px;
            z-index: 0;
            height: 100%;
            width: 100%;
            top: 0;
            background-color: White;
            filter: alpha(opacity=60);
            opacity: 0.9;
            -moz-opacity: 1;
        }
        
        .LoadingDivCss
        {
            margin: 0;
            position: absolute;
            top: 50%;
            left: 50%;
            margin-right: -50%;
            transform: translate(-50%, -50%);
        }
        
        .LoadingImgCss
        {
            height: 100px;
            width: 100px;
        }
        .GRID 
        {
            background-color: white;
            color:black;
        }

    </style>



</asp:Content>

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

    <div align="left">
               
        <asp:Button ID="btnExcel" runat="server" Text="Export"    
                ToolTip="To Export the Report Click Here"  CssClass="btn btn-success btn-xs" 
                onclick="btnExcel_Click"/>
    </div>
    <br/>
  <asp:UpdatePanel runat="server" ID="updatepanel1" UpdateMode="Conditional">
  <ContentTemplate>


        <div class="section-block">
      <h6 class="section-title"> SUPPLIER WISE COST AND COLLECTION  REPORT
      </h6>
  </div>

        <br/>
        <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="txtFromDt"  class="form-control" runat="server"  ></asp:TextBox>
                                                   <asp:CalendarExtender ID="calFirstDueDate"  Format="yyyy-MM-dd" runat="server"  TargetControlID="txtFromDt"  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="txtToDt" class="form-control" runat="server" ></asp:TextBox>
                                                <asp:CalendarExtender ID="CalendarExtender1" Format="yyyy-MM-dd" runat="server"  TargetControlID="txtToDt"  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="btnGenerate1" runat="server" Text="Item Group P/L Report"  
                                                CssClass="btn btn-primary" onclick="btnGenerate1_Click" OnClientClick="return validate()" />
   
                                                <asp:Button ID="btnGenerate" runat="server" Text="Supplier wise Purchase Report"  
                                                CssClass="btn btn-primary" onclick="btnGenerate_Click" OnClientClick="return validate()" />

                                               </div>

 
                                        </div>
                                
                                 </div>
                                 
                                
                                                         
                                </div>
                            </div>
        </div>
 
        
      
 <%--Report area starts here--%>
        <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>
                   <%--<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">

        <table>
        <tr>
        <td>
        <asp:GridView ID="GridView1" EmptyDataText="No Data Found !"
        runat="server" showfooter="true"  BorderColor="Transparent" 
        DataKeyNames="Date" AutoGenerateColumns="False" Font-Size="13px"
        Width="100%"  CssClass="GRID"
        OnPageIndexChanging="GridView1_PageIndexChanging" AllowPaging="True" PageSize="32" OnRowDataBound="GridView1_RowDataBound" >
            <%--OnRowDataBound="GridView1_RowDataBound"--%>

            <HeaderStyle  />
            <HeaderStyle BackColor = "White" ForeColor="Black" />
            <footerstyle backcolor= "White" ForeColor="Black" />
            <AlternatingRowStyle BackColor="White" ForeColor="Black" />
            
            <RowStyle  />

            <%--Dynamically loading 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>

        </td>
        </tr> 
        </table>
        </div> 

        </caption> 
        </tbody> 

        </table>

        </div>
        <%--</caption>--%>
        <%--</tbody>--%>
        </table> 

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



     <script type="text/javascript">
     function switchViews(obj, row) {
         var div = document.getElementById(obj);
         var img = document.getElementById('img' + obj);

         if (div.style.display == "none") {
             div.style.display = "inline";
             img.src = "IMG/minus.gif";
         } else {
             div.style.display = "none";
             img.src = "IMG/plus.gif";
         }
     }
     </script>


  </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>
