<%@ Page Title="RetailDashboard Page" Language="C#" MasterPageFile="~/Subweb.Master" AutoEventWireup="true" CodeBehind="RetailDashboard.aspx.cs" Inherits="SUNWEB.RetailDashboard" %>
<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>

<%@ Register Assembly="AjaxControlToolkit" TagPrefix="asp" Namespace="AjaxControlToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style type="text/css">
/*Calendar Control CSS*/
.cal_Theme1 .ajax__calendar_container   {
background-color: #3D59AB	;
border:solid 1px #77D5F7;
}

.cal_Theme1 .ajax__calendar_header  {
background-color: #ffffff;
margin-bottom: 4px;
}

.cal_Theme1 .ajax__calendar_title,
.cal_Theme1 .ajax__calendar_next,
.cal_Theme1 .ajax__calendar_prev    {
color: #004080;
padding-top: 3px;
}

.cal_Theme1 .ajax__calendar_body    {
background-color: #fffff;
border: solid 1px #77D5F7;
}

.cal_Theme1 .ajax__calendar_dayname {
text-align:center;
font-weight:bold;
margin-bottom: 4px;
margin-top: 2px;
color: #004080;
}

.cal_Theme1 .ajax__calendar_day {
color: #004080;
text-align:center;
}

.cal_Theme1 .ajax__calendar_hover .ajax__calendar_day,
.cal_Theme1 .ajax__calendar_hover .ajax__calendar_month,
.cal_Theme1 .ajax__calendar_hover .ajax__calendar_year,
.cal_Theme1 .ajax__calendar_active  {
color: #004080;
font-weight: bold;
background-color: #DEF1F4;
}


 
.cal_Theme1 .ajax__calendar_today   {
font-weight:bold;
}

.cal_Theme1 .ajax__calendar_other,
.cal_Theme1 .ajax__calendar_hover .ajax__calendar_today,
.cal_Theme1 .ajax__calendar_hover .ajax__calendar_title {
color: #bbbbbb;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
     <table>
 <tr>
 
 <td>
 <asp:TextBox ID="txtStartDt" runat="server"    Width="100px"></asp:TextBox>
             <asp:CalendarExtender ID="calFirstDueDate"  Format="yyyy-MM-dd" runat="server" CssClass="cal_Theme1" TargetControlID="txtStartDt"  PopupPosition="BottomLeft" FirstDayOfWeek="Sunday"></asp:CalendarExtender>                         
 </td>    
 <td><asp:TextBox ID="txtEndDt" runat="server"   Width="100px"></asp:TextBox>
             <asp:CalendarExtender ID="CalendarExtender1" Format="yyyy-MM-dd" runat="server" CssClass="cal_Theme1" TargetControlID="txtEndDt"  PopupPosition="BottomLeft" FirstDayOfWeek="Sunday"></asp:CalendarExtender>                         
 </td>
 <td>
 <asp:Button ID="btnGetReports" runat="server" Text="Get Reports"  
         CssClass="btn-brand" onclick="btnGetReports_Click" />
 </td>
 </tr>
 </table>


      <div align="right">
     <asp:Label ID="lblBranchAliasName"  ForeColor="Blue" runat="server"></asp:Label><asp:DropDownList ID="cmbBranches" CssClass="custom-select"  Width="250px" runat="server"></asp:DropDownList>&nbsp;&nbsp; 
     </div>
      <div class="dashboard-ecommerce">
                <div class="container-fluid dashboard-content ">
                    <!-- ============================================================== -->
                    <!-- pageheader  -->
                    <!-- ============================================================== -->
                    <div class="row">
                        <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                            <div class="page-header">
                                <h2 class="pageheader-title">Retail Dashboard </h2>
                                <p class="pageheader-text">Retail Dashboard Information </p>
                                <div class="page-breadcrumb">
                                   
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- ============================================================== -->
                    <!-- end pageheader  -->
                    <!-- ============================================================== -->
                    <div class="ecommerce-widget">

                          <div class="row">

                          <div class="col-xl-3 col-lg-3 col-md-6 col-sm-12 col-12">
                                <div class="card border-3 border-top border-top-primary">
                                    <div class="card-body">
                                        <h2 class="text-muted">Total Sales</h2>
                                        <div class="metric-value d-inline-block">
                                        <h2 class="mb-1"> <asp:Label ID="lblRTotalSale" runat="server"></asp:Label> </h2>
                                        </div>
                                     
                                    </div>
                                </div>
                            </div>

                          <div class="col-xl-3 col-lg-3 col-md-6 col-sm-12 col-12">
                                <div class="card border-3 border-top border-top-primary">
                                    <div class="card-body">
                                         <h2 class="text-muted">Net Amount</h2>
                                        <div class="metric-value d-inline-block">
                                             <h2 class="mb-1"><asp:Label id="lblDNetAmount" runat="server"></asp:Label>   </h2>
                                        </div>
                                     
                                    </div>
                                </div>
                            </div>
                            </div>
                             
                           <%--Total MothlySales--%>
                           <%--<div class="col-xl-3 col-lg-6 col-md-6 col-sm-12 col-12">
                                <div class="card">
                                    <div class="card-body">
                                        <h4 class="text-muted">Total Monthly Sales</h4>
                                        <div class="metric-value d-inline-block">
                                            <h2 class="mb-1"> <asp:Label ID="lblTotalMonthlySales" runat="server"></asp:Label> </h2>
                                        </div>
                                        
                                    </div>
                                    <div id="sparkline-revenue2"></div>
                                </div>
                            </div>--%>
                            


                       

                            <%--Cashin Drawer Value - Removed --%>
                            <%--<div class="col-xl-3 col-lg-6 col-md-6 col-sm-12 col-12">
                                <div class="card">
                                    <div class="card-body">
                                        <h3 class="text-muted">Cash in Drawer</h3>
                                        <div class="metric-value d-inline-block">
                                            <h2 class="mb-1"><asp:Label  id="lblDCashindrawer" runat="server"></asp:Label>  </h2>
                                        </div>
                                        
                                    </div>
                                    <div id="sparkline-revenue4"></div>
                                </div>
                            </div>--%>

                            </div>
                             
                           

                            <div class="row">
                            
                            <div class="col-xl-9 col-lg-12 col-md-6 col-sm-12 col-12">
                                <div class="card">
                                    <h5 class="card-header">Retail Transaction Information</h5>
                                    <div class="card-body p-0">
                                        <div class="table-responsive">
                                            <table class="table">
                                                <thead class="bg-light" class="border-0">
                                                 
                                                    <tr>
                                                     
                                                        <td>
                                                            <asp:Label ID="lblTable" runat="server" /><asp:Label ID="Label1" runat="server" />
                                                             <asp:Label ID="lblTable1" runat="server" /><asp:Label ID="Label3" runat="server" />
                                                             <asp:Label ID="lblPayouts" runat="server" /><asp:Label ID="Label4" runat="server" />
                                                             <asp:Label ID="lblReceiving" runat="server" /><asp:Label ID="Label5" runat="server" />

                                                 

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

                            <div class="col-xl-9 col-lg-12 col-md-6 col-sm-12 col-12">
                                <div class="card">
                                    <h5 class="card-header">Retail Discout Details</h5>
                                    <div class="card-body p-0">
                                        <div class="table-responsive">
                                            <table class="table">
                                                <thead class="bg-light">
                                                    <tr>
                                                     
                                                        <td>
                                                              <asp:Label ID="lblCashinDrawer" runat="server" /><asp:Label ID="Label6" runat="server" />
                                                              <asp:Label ID="lblRounding" runat="server" /><asp:Label ID="Label7" runat="server" />
                                                              <asp:Label ID="lblRefund" runat="server" /><asp:Label ID="Label8" runat="server" />
                                                              <asp:Label ID="lblGrossAmount" runat="server" /><asp:Label ID="Label9" runat="server" />
                                                              <asp:Label ID="lblItemDiscount" runat="server" /><asp:Label ID="Label10" runat="server" />
                                                              <asp:Label ID="lblTotDiscount" runat="server" /><asp:Label ID="Label11" runat="server" />
                                                              <asp:Label ID="lblPriceShiftDiscount" runat="server" /><asp:Label ID="Label13" runat="server" />
                                                              <asp:Label ID="lblDiscountTotal" runat="server" /><asp:Label ID="Label12" runat="server" />
                                                              <asp:Label ID="lblGST" runat="server" /><asp:Label ID="Label14" runat="server" />
                                                              <asp:Label ID="lblSVC" runat="server" /><asp:Label ID="Label15" runat="server" />
                                                              <asp:Label ID="lblNetAmt" runat="server" /><asp:Label ID="Label16" runat="server" />
                                                              <asp:Label ID="lblVoucher" runat="server" /><asp:Label ID="Label17" runat="server" />
                                                        </td>
                                                        
                                                    </tr>
                                                    
                                                </thead>
                                                
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        
                         <div class="col-xl-9 col-lg-12 col-md-6 col-sm-12 col-12">
                                <div class="card">
                                    <h5 class="card-header">Retail Transaction Status&nbsp;</h5>
                                    <div class="card-body p-0">
                                        <div class="table-responsive">
                                            <table class="table">
                                                <thead class="bg-light">
                                                    <tr >
                                                     
                                                        <td>
                                                            <asp:Label ID="lblHold" runat="server" /><asp:Label ID="Label18" runat="server" />
                                                             <asp:Label ID="lblCancel" runat="server" /><asp:Label ID="Label20" runat="server" />
                                                             <asp:Label ID="lblVoid" runat="server" /><asp:Label ID="Label22" runat="server" />
                                                             <asp:Label ID="lblExchange" runat="server" /><asp:Label ID="Label24" runat="server" />
                                                             <asp:Label ID="lblNosalespersonOpen" runat="server" /><asp:Label ID="Label19" runat="server" />
                                                             <asp:Label ID="lblNoofReceipts" runat="server" /><asp:Label ID="Label21" runat="server" />
                                                             <asp:Label ID="lblAvgReceipts" runat="server" /><asp:Label ID="Label23" runat="server" />

                                                        </td>
                                                        
                                                    </tr>
                                                    
                                                </thead>
                                                
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                        </div>
                        
                        <div class="row">
                            <!-- ============================================================== -->
              				                        <!-- product category  -->
                            <!-- ============================================================== -->
                            
                            
                            <div class="col-xl-6 col-lg-12 col-md-12 col-sm-12 col-12">
                                <div class="card">
                                    <div class="card-header">
                                         <div class="float-right">
                                           <asp:DropDownList ID="cmbsel" class="custom-select" AutoPostBack="true" runat="server" 
                                                 onselectedindexchanged="cmbsel_SelectedIndexChanged">
                                           <asp:ListItem Value="0" Text="Select"></asp:ListItem>
                                           <asp:ListItem Value="1" Text="LastWeek Sale"></asp:ListItem>
                                           <asp:ListItem Value="2" Text="CurrWeek Sale"></asp:ListItem>
                                           
                                           </asp:DropDownList>

                                                
                                            </div> 
                                        <h6 class="mb-0">Total Sale  Comparision Between Current Week and Last Week</h6>
                                    </div>
                                    <div class="card-body">
                                        <asp:Chart ID="Chart1" runat="server" 
                                        BorderlineWidth="0" Height="320px" Palette="None"
                                        Width="432px">
                           <Series>
                          <asp:Series Name="Series1"  XValueMember="Day"   YValueMembers="Lastweeksale" 
                          LegendText="Last Week" IsValueShownAsLabel="false"  ChartArea="ChartArea1" 
                          MarkerBorderColor="#DBDBDB" YValuesPerPoint="4"  >
                         </asp:Series>        
                        <asp:Series Name="Series2"  XValueMember="Day"  YValueMembers="CurrentWeekSal" 
                        LegendText="Current Week" IsValueShownAsLabel="false" ChartArea="ChartArea1" 
                       MarkerBorderColor="Yellow" YValuesPerPoint="4">
                      </asp:Series>
                      </Series>
                     <Legends>
                     <asp:Legend Title="Last Week Sale  "></asp:Legend>
                    </Legends>

                    <Titles>
                    <asp:Title Docking="Bottom" Text="Last Week Sale & Current Week Sale  Comparision"></asp:Title>
                    </Titles>
 
 
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1">
            <Area3DStyle Enable3D="True" IsClustered="True" WallWidth="2" />
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>
                                        
                                        <asp:Chart ID="Chart2" runat="server" 
                                        BorderlineWidth="0" Height="320px" Palette="None"
                                        Width="432px">
                           <Series>
                          <asp:Series Name="Series1"  XValueMember="Day"   YValueMembers="Lastweeksale" 
                          LegendText="Last Week" IsValueShownAsLabel="false"  ChartArea="ChartArea1" 
                          MarkerBorderColor="#DBDBDB" YValuesPerPoint="4"  >
                         </asp:Series>        
                      </Series>
                     <Legends>
                     <asp:Legend Title="Last Week Sale  "></asp:Legend>
                    </Legends>

                    <Titles>
                    <asp:Title Docking="Bottom" Text="Last Week Sale & Current Week Sale  Comparision"></asp:Title>
                    </Titles>
 
 
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1">
            <Area3DStyle Enable3D="True" IsClustered="True" WallWidth="2" />
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>

                   <asp:Chart ID="Chart3" runat="server" 
                    BorderlineWidth="0" Height="320px" Palette="None"
                     Width="432px">
                           <Series>
                          <asp:Series Name="Series1"  XValueMember="Day"  YValueMembers="CurrentWeekSal" 
                        LegendText="Current Week" IsValueShownAsLabel="false" ChartArea="ChartArea1" 
                       MarkerBorderColor="Yellow" YValuesPerPoint="4">
                      </asp:Series>
                      </Series>
                     <Legends>
                     <asp:Legend Title="Last Week Sale  "></asp:Legend>
                    </Legends>

                    <Titles>
                    <asp:Title Docking="Bottom" Text="Last Week Sale & Current Week Sale  Comparision"></asp:Title>
                    </Titles>
 
 
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1">
            <Area3DStyle Enable3D="True" IsClustered="True" WallWidth="2" />
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>

                                        
                                    </div>
                                </div>
                            </div>
                            <div class="col-xl-6 col-lg-12 col-md-12 col-sm-12 col-12">
                                <div class="card">
                                    <div class="card-header">
                                          
                                        <h6 class="mb-0">Total Sale  Between &nbsp;&nbsp;&nbsp; <asp:Label ID="lblLinechartStdt" runat="server" ></asp:Label>&nbsp;&nbsp;&nbsp;  And  &nbsp;&nbsp;&nbsp;<asp:Label ID="lblLineChartEndDt" runat="server"></asp:Label>   </h6>
                                    </div>
                                    <div class="card-body">
                                        
                                        <asp:Panel ID="Panel3"  runat="server" BackColor="white" Height="250px" 
                    ScrollBars="Auto" Width="430px">
                  <asp:Chart ID="Chart4" runat="server" ClientIDMode="Predictable" 
                    BorderlineWidth="0" Height="270px" Palette="None" 
                     Width="410px">
                           <Series>
                            <asp:Series ChartType="Line"  YValuesPerPoint="20"    XValueMember="PayDate" YValueMembers="TotalSales" LegendText=" Total Sale Till Date In Current Month " IsValueShownAsLabel="false" MarkerStyle="Circle" 
                            Name="Series1">
          
                      </asp:Series>
                      </Series> 
                   <Titles>
                    <asp:Title Docking="Bottom" Text="Total Sale "></asp:Title>
                    </Titles>
 
 
                 <ChartAreas>
                 <asp:ChartArea BorderColor="192, 255, 192" Name="ChartArea1">
                
                   <Area3DStyle LightStyle="Realistic" IsRightAngleAxes="False" />
                  </asp:ChartArea>
                  </ChartAreas>
                  </asp:Chart>

                  </asp:Panel>

                                        
                       </div>
                      </div>
                      </div>
                            
                     </div>
                        
              </div>
            </div>
           
   </asp:Content>
