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

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
  
    <style type="text/css">
        body {
            font-family: Arial;
            font-size: 10pt;
        }

        .Grid td {
            background-color: white;
            color:black;
            font-size: 10pt;
            line-height: 200%
        }

        .Grid th {
            background-color:white;
            color: #ffffff;;
            font-size: 10pt;
            line-height: 200%
        }

        .ChildGrid td {
            background-color: #eee !important;
            color: black;
            font-size: 10pt;
            line-height: 200%
        }

        .ChildGrid th {
            background-color: #6C6C6C !important;
            color: White;
            font-size: 10pt;
            line-height: 200%
        }
    </style>
   <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <script type="text/javascript">
        $("[src*=plus]").live("click", function () {
            $(this).closest("tr").after("<tr><td></td><td colspan = '999'>" + $(this).next().html() + "</td></tr>")
            $(this).attr("src", "images/minus.png");
        });
        $("[src*=minus]").live("click", function () {
            $(this).attr("src", "images/plus.png");
            $(this).closest("tr").next().remove();
        });
    </script>

    <script type="text/javascript">

        //Search Members
        function CloseModalMemberInformationList()
        {
            var modal = document.getElementById("ModalMemberList");
            modal.style.display = "none";
        }

        function ShowModalMemberInformationList()
        {
          var modal = document.getElementById("ModalMemberList");
          modal.style.display = "block";
        }
        function CloseModal()
        {
            var modal = document.getElementById("ModalMemberList");
            modal.style.display = "none";
        }


        function ShowGridA() {
            document.getElementById("<%= GridA.ClientID %>").style.display = "none";
            document.getElementById("<%= GridB.ClientID %>").style.display = "none";
            console.log("Grid A Called ");
            }


        function ShowGridB()
        {
            document.getElementById("<%= GridA.ClientID %>").style.display = "none";
            document.getElementById("<%= GridB.ClientID %>").style.display = "block";
            console.log("Grid B Called ");
        }

       
    </script>

      <%--Model Popup Css Code :--%>
    <style type="text/css">
        @media only screen and (max-width: 600px)
         {
          div 
           {
           text-align:left;        
           }
         }
</style>
    <style type="text/css">


        /* Create two equal columns that floats next to each other */
        .columnLeft {
          float: left;
          width: 50%;
          padding-left: 15px;
          height: auto; /* Should be removed. Only for demonstration */

        }

        .columnRight {
          float: left;
          width: 50%;
          padding-right:17px;
          height: auto; /* Should be removed. Only for demonstration */
          text-align:right;
          margin-right:-10px;
        }
        /* Clear floats after the columns */
        .row:after {
          content: "";
          display: table;
          clear: both;
        }

        .hrefCss
        {
            text-decoration: underline;
        }
          </style>


    <style type="text/css">
        .modalCss
        {
            display: none; /* Hidden by default */
            position: fixed; /* Stay in place */
            z-index: 1; /* Sit on top */
            padding-top: 80px; /* Location of the box */
            left: 0;
            top: 0;
            width: 100%; /* Full width */
            height: 100%; /* Full height */
            overflow: auto; /* Enable scroll if needed */
            background-color: rgb(0,0,0); /* Fallback color */
            background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
        }
               
        
        .modal-dialogCss
        {
        }
        
        /* Modal Content */
        .modal-contentCss
        {
            background-color: #fefefe;
            margin: auto;
            /*padding: 20px;*/
           /* border: 1px solid #888;*/
            width: 400px;
            border-radius: 3px; 
        }
        
        
        /* Create two equal columns that floats next to each other */
        .column
        {
            float: left;
            width: 40%;
            padding: 2px;
            margin-left:7px;
            height: auto; /* Should be removed. Only for demonstration */
        }
        
        /* Clear floats after the columns */
        .row:after
        {
            content: "";
            display: table;
            clear: both;
        }
        
         .ButtonSearch 
            {
                background: #ffc108;
                margin: 0;
                font-family: Circular Std Book;
                font-size: 14px;
                line-height: inherit;
                border-width: thin;
                border-color: #212529;
                border-radius: 2px;
                color: #212529;
                
               }
        
    </style>
      <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;
            _smoz-opacity: 1;
        }
        
        .LoadingDivCss
        {
            margin: 0;
            position: absolute;
            top: 50%;
            left: 50%;
            margin-right: -50%;
            transform: translate(-50%, -50%);
        }
        
        .LoadingImgCss
        {
            height: 100px;
            width: 100px;
        }
    </style>
    <script type="text/javascript">
        function showProgress() {
            var updateProgress = $get("<%= UpdateProgress.ClientID %>");
            updateProgress.style.display = "block";
        }

    </script>
     


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel runat="server" ID="updatepanel1" UpdateMode="Conditional">
  <ContentTemplate>
      <div class="section-block">
          <h6 class="section-title"> CAMPAIGN REPORT
          </h6>
      </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" autocomplete="off"  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" autocomplete="off"  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">
                                <caption>
                                <label for="validationCustom03">
                                 MobileNo
                                </label>
                                <asp:TextBox ID="txtRMobileNo"  class="form-control" runat="server"  ></asp:TextBox>
                                </caption>
                                </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="Label1"  ForeColor="Gray" runat="server" Text="Campaign Type"></asp:Label></label>
                                 <asp:DropDownList ID="cmbCampaignType" CssClass="custom-select"  AutoPostBack="true" 
                                  runat="server"    OnSelectedIndexChanged="cmbCampaignType_SelectedIndexChanged">
                                
                                 </asp:DropDownList>
                                 </div>
                              
                               </div>
                               <div class="form-row">
                               <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()" />
                                &nbsp;&nbsp;&nbsp;&nbsp;
                                <asp:Button ID="btnClear" runat="server" Text="Clear" CssClass="btn btn-primary" OnClick="btnClear_Click" />
                                <asp:HiddenField ID="hidMobileNo" runat="server"  /> 
                                </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">
        <h5 class="card-header" style="background-color: #4c4c4c; color: White;">
        <span style="font-size:14px;color:#F8F9FA"> CAMPAIGN  REPORTS  </span>&nbsp;&nbsp;
        <button type="button"  onclick="ShowModalMemberInformationList()" class="ButtonSearch">
         Search
        </button>


        </h5>
         <asp:Label ID="lblMsgTotalSelection" runat="server" CssClass="Labels"></asp:Label>
         </b> 
         </p>
         </h4>
          <%--Grid For Cash Redemption --%>
      
      <table>
          <tr>
          <td>

        <div id="GridA" runat="server">  
        <div class="card-body">
        <div class="table-responsive">
        <table id="Table1" class="table table-striped table-bordered second" style="width: 100%;">
        <tbody>
        <caption>
        <asp:Panel ID="Panel2" runat="server"  Height="500px" ScrollBars="Auto"  Width="1500px">
                            <asp:GridView ID="grdWebTransHistory" Font-Size="Smaller" CssClass="Grid"   Height="750px" Width="1200px" 
                             runat="server" AutoGenerateColumns="False"  OnRowDataBound="grdWebTransHistory_RowDataBound" 
                             DataKeyNames="OrderId" BorderWidth="1px" CellPadding="3" ShowFooter="true" >
                                 <HeaderStyle BackColor= "White" ForeColor="Black" />
                                  <footerstyle backcolor="White" ForeColor="Black" />
                                  <Columns>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <asp:Image ID="Image1" runat="server" Style="cursor: pointer" ImageUrl="~/images/plus.png" />
                                            <asp:Panel ID="pnlwebtransHistory" runat="server" Style="display: none">
                                                <%--Add the Webtransdetails Gridview Here --%>

                                                <asp:GridView ID="grdWebtrans" runat="server" AutoGenerateColumns="false" CssClass="Grid" OnRowDataBound="grdWebtrans_RowDataBound" DataKeyNames="Orderid">
                                                    <Columns>
                                                        <asp:TemplateField>
                                                            <ItemTemplate>
                                                                <asp:Image ID="Image1" runat="server" Style="cursor: pointer" ImageUrl="~/images/plus.png" />
                                                                <asp:Panel ID="pnlWebtrans" runat="server" Style="display: none">
                                                                    <asp:GridView ID="grdWebtransdetails" CssClass="Grid" runat="server" AutoGenerateColumns="false"  OnRowDataBound="grdWebtransdetails_RowDataBound" DataKeyNames="Orderid">
                                                                        <Columns>
                                                                            <asp:TemplateField>
                                                                                <ItemTemplate>
                                                                                    <asp:Image ID="Image1" runat="server" Style="cursor: pointer" ImageUrl="~/images/plus.png" />
                                                                                    <asp:Panel ID="pnlwebtransdetails" runat="server" Style="display: none">
                                                                                        <asp:GridView ID="grdWebtransdetailsCondiment" runat="server" AutoGenerateColumns="false">
                                                                                            <Columns>
                                                                                                <asp:BoundField ItemStyle-Width="170px" DataField="CondimentDesc" HeaderText="Condiment" />

                                                                                            </Columns>
                                                                                        </asp:GridView>
                                                                                    </asp:Panel>
                                                                                </ItemTemplate>


                                                                            </asp:TemplateField>


                                                                            <asp:BoundField ItemStyle-Width="170px" DataField="InventoryID" HeaderText="InventoryID" />
                                                                            <asp:BoundField ItemStyle-Width="170px" DataField="Barcode" HeaderText="Barcode" />
                                                                            <asp:BoundField ItemStyle-Width="170px" DataField="InventoryName" HeaderText="InventoryName" />
                                                                            <asp:BoundField ItemStyle-Width="170px" DataField="Description" HeaderText="Description" />
                                                                            <asp:TemplateField HeaderText="ItemId" Visible="false">
                                                                                <ItemTemplate>
                                                                                    <asp:Label ID="lblItemid" runat="server" Text='<%# Bind("Itemid") %>'></asp:Label>
                                                                                </ItemTemplate>
                                                                            </asp:TemplateField>


                                                                            <asp:TemplateField HeaderText="ActualPrice" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Left">
                                                                                <ItemTemplate>
                                                                                    <asp:Label ID="lblActualPrice" runat="server" Text='<%#Eval("ActualPrice","{0:F2}") %>'></asp:Label>
                                                                                </ItemTemplate>
                                                                            </asp:TemplateField>
                                                                            <asp:TemplateField HeaderText="Price" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Left">
                                                                                <ItemTemplate>
                                                                                    <asp:Label ID="lblPrice" runat="server" Text='<%#Eval("Price","{0:F2}") %>'></asp:Label>
                                                                                </ItemTemplate>
                                                                            </asp:TemplateField>
                                                                        </Columns>
                                                                    </asp:GridView>
                                                                </asp:Panel>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>

                                                        <asp:BoundField ItemStyle-Width="170px" DataField="WebTransid" HeaderText="WebTransid" />
                                                        <asp:BoundField ItemStyle-Width="170px" DataField="QueueNo" HeaderText="QueueNo" />
                                                        <asp:BoundField ItemStyle-Width="150px" DataField="PaymentType" HeaderText="PaymentType" />
                                                        <asp:TemplateField HeaderText="PaymentAmount" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblPaymentAmount" runat="server" Text='<%#Eval("PaymentAmount","{0:F2}") %>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="TransDate" ItemStyle-Width="280px" ItemStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                              <asp:Label ID="lblTransDate" runat="server" Text='<%#Eval("TransDate","{0:dd/mm/yyyy}") %>'></asp:Label>
                                                                
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:BoundField ItemStyle-Width="150px" DataField="DiscType" HeaderText="DiscType" />
                                                        <asp:TemplateField HeaderText="DiscAmount" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblDiscAmount" runat="server" Text='<%#Eval("DiscAmount","{0:F2}") %>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="DiscValue" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                                <asp:Label ID="lblDiscValue" runat="server" Text='<%#Eval("DiscValue","{0:F2}") %>'></asp:Label>
                                                         </ItemTemplate>
                                                        </asp:TemplateField>

                                                    </Columns>
                                                </asp:GridView>

                                                <asp:GridView ID="grdAdjustment" runat="server" Width="1000px" AutoGenerateColumns="false" CssClass="Grid"  DataKeyNames="ReferenceNo">
                                                    <Columns>
                                                                                                            
                                                     <asp:TemplateField HeaderText="Pre.CashbackValue" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Left">
                                                     <ItemTemplate>
                                                     <asp:Label ID="lblAdjPreviousCashBackValue" runat="server" Text='<%#Eval("PreviousCashbackValue","{0:F2}") %>'></asp:Label>
                                                     </ItemTemplate>
                                                     </asp:TemplateField>

                                                      <asp:TemplateField HeaderText="CashbackAdjustment" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Left">
                                                     <ItemTemplate>
                                                     <asp:Label ID="lblAdjCashbackAdjustment" runat="server" Text='<%#Eval("CashBackAdjAmount","{0:F2}") %>'></asp:Label>
                                                     </ItemTemplate>
                                                     </asp:TemplateField>
                                                      <asp:TemplateField HeaderText="Cashback_Balance" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Left">
                                                     <ItemTemplate>
                                                     <asp:Label ID="lblAdjCashbackAdjustment" runat="server" Text='<%#Eval("CashBackBal","{0:F2}") %>'></asp:Label>
                                                     </ItemTemplate>
                                                     </asp:TemplateField>
                                                     <asp:TemplateField HeaderText="Adjustment Date" ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Left">
                                                     <ItemTemplate>
                                                     <asp:Label ID="lblAdjdate" runat="server" Text='<%#Eval("CreatedDate") %>'></asp:Label>  
                                                     </ItemTemplate>
                                                     </asp:TemplateField>
                                                     <asp:BoundField ItemStyle-Width="270px" DataField="Notes" HeaderText="Reason" />
                                                        
                                                     <asp:BoundField ItemStyle-Width="170px" DataField="CreatedBy" HeaderText="Done By" />

                                                    </Columns>
                                                </asp:GridView>

                                            </asp:Panel>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="OrderId" Visible="false">
                                    <ItemTemplate>
                                    <asp:Label ID="lblOrderIds" runat="server" Text='<%#Eval("OrderId") %>'></asp:Label>
                                    </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="CustomerName" Visible="false">
                                    <ItemTemplate>
                                    <asp:Label ID="lblCustomerName" runat="server" Text='<%#Eval("CustomerName") %>'></asp:Label>
                                    </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="UserName">
                                    <ItemTemplate>
                                    <asp:Label ID="lblUserName" runat="server" Text='<%#Eval("UserName") %>'></asp:Label>
                                    </ItemTemplate>
                                    </asp:TemplateField>



                                    <asp:TemplateField HeaderText="TransDate" ItemStyle-Width="280px" ItemStyle-HorizontalAlign="Left">
                                    <ItemTemplate>
                                    <asp:Label ID="lblTransDate"  Width="250px" runat="server" Text='<%#Eval("TransDate","{0:dd/mm/yyyy}") %>'></asp:Label>
                                    </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Transid">
                                     <ItemTemplate>
                                     <asp:Label ID="lblTransid" runat="server" Text='<%#Eval("Transid") %>'></asp:Label>
                                     </ItemTemplate>
                                     <FooterTemplate>
                                     <b style="margin-left:700px">TOTAL </b>   
                                     </FooterTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="CB.Earn&nbsp;|&nbsp;CB.Redeem" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                <asp:Label ID="lblRCBECB" runat="server" Text='<%#Eval("R_CashBack_CashBackEarn") %>'></asp:Label>
                                </ItemTemplate>
                                <FooterTemplate>
                                <asp:Label ID="lblTotalCB_Earn" runat="server"  Width="50px"/>|
                                <asp:Label ID="lblTotalCB_Redeem" runat="server"  Width="50px"/>
                                
                                </FooterTemplate>
                                </asp:TemplateField>

                                </Columns>
                                <FooterStyle BackColor="White" ForeColor="Black" HorizontalAlign="Center"></FooterStyle>
                                <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>
                          </asp:Panel>
           

           
      
       </caption>
       </table>
       </div>
       </div>
        </div>

          </td>    
          </tr>
          <tr>
          <td>
        <%--Grid For Points --%>
        <div id="GridB" runat="server"> 
        <div class="card-body" >
        <div class="table-responsive">
        <table id="Table1" class="table table-striped table-bordered second" style="width: 100%;">
        <tbody>
        <caption>
        <asp:Panel ID="Panel1" runat="server"  Height="500px" ScrollBars="Auto"  Width="1500px">
                            <asp:GridView ID="grdMain" Font-Size="Smaller" CssClass="Grid"   Height="750px" Width="1200px" 
                             runat="server" AutoGenerateColumns="False"  OnRowDataBound="grdMain_RowDataBound" 
                             DataKeyNames="Orderid" BorderWidth="1px" CellPadding="3" ShowFooter="true" >
                                 <HeaderStyle BackColor= "White" ForeColor="Black" />
                                  <footerstyle backcolor="White" ForeColor="Black" />
                                  <Columns>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <asp:Image ID="Image1" runat="server" Style="cursor: pointer" ImageUrl="~/images/plus.png" />
                                            <asp:Panel ID="pnlwebtransHistory" runat="server" Style="display: none">
                                                <%--Add the Webtransdetails Gridview Here --%>

                                                <asp:GridView ID="grdWebtrans2" runat="server" AutoGenerateColumns="false" CssClass="Grid" OnRowDataBound="grdWebtrans2_RowDataBound" DataKeyNames="Orderid">
                                                    <Columns>
                                                        <asp:TemplateField>
                                                            <ItemTemplate>
                                                                <asp:Image ID="Image1" runat="server" Style="cursor: pointer" ImageUrl="~/images/plus.png" />
                                                                <asp:Panel ID="pnlWebtrans" runat="server" Style="display: none">
                                                                    <asp:GridView ID="grdWebtransdetails2" CssClass="Grid" runat="server" AutoGenerateColumns="false"  OnRowDataBound="grdWebtransdetails2_RowDataBound" DataKeyNames="Orderid">
                                                                        <Columns>
                                                                            <asp:TemplateField>
                                                                                <ItemTemplate>
                                                                                    <asp:Image ID="Image1" runat="server" Style="cursor: pointer" ImageUrl="~/images/plus.png" />
                                                                                    <asp:Panel ID="pnlwebtransdetails" runat="server" Style="display: none">
                                                                                        <asp:GridView ID="grdWebtransdetailsCondiment2" runat="server" AutoGenerateColumns="false">
                                                                                            <Columns>
                                                                                                <asp:BoundField ItemStyle-Width="170px" DataField="CondimentDesc" HeaderText="Condiment" />

                                                                                            </Columns>
                                                                                        </asp:GridView>
                                                                                    </asp:Panel>
                                                                                </ItemTemplate>


                                                                            </asp:TemplateField>


                                                                            <asp:BoundField ItemStyle-Width="170px" DataField="InventoryID" HeaderText="InventoryID" />
                                                                            <asp:BoundField ItemStyle-Width="170px" DataField="Barcode" HeaderText="Barcode" />
                                                                            <asp:BoundField ItemStyle-Width="170px" DataField="InventoryName" HeaderText="InventoryName" />
                                                                            <asp:BoundField ItemStyle-Width="170px" DataField="Description" HeaderText="Description" />
                                                                            <asp:TemplateField HeaderText="ItemId" Visible="false">
                                                                            <ItemTemplate>
                                                                            <asp:Label ID="lblItemid" runat="server" Text='<%# Bind("Itemid") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                            </asp:TemplateField>

                                                                            <asp:TemplateField HeaderText="ActualPrice" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Left">
                                                                            <ItemTemplate>
                                                                            <asp:Label ID="lblActualPrice" runat="server" Text='<%#Eval("ActualPrice","{0:F2}") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                            </asp:TemplateField>
                                                                            <asp:TemplateField HeaderText="Price" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Left">
                                                                            <ItemTemplate>
                                                                            <asp:Label ID="lblPrice" runat="server" Text='<%#Eval("Price","{0:F2}") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                            </asp:TemplateField>
                                                                        </Columns>
                                                                    </asp:GridView>
                                                                </asp:Panel>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>

                                                        <asp:BoundField ItemStyle-Width="170px" DataField="WebTransid" HeaderText="WebTransid" />
                                                        <asp:BoundField ItemStyle-Width="170px" DataField="QueueNo" HeaderText="QueueNo" />
                                                        <asp:BoundField ItemStyle-Width="150px" DataField="PaymentType" HeaderText="PaymentType" />
                                                        <asp:TemplateField HeaderText="PaymentAmount" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                        <asp:Label ID="lblPaymentAmount" runat="server" Text='<%#Eval("PaymentAmount","{0:F2}") %>'></asp:Label>
                                                        </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="TransDate" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                        <asp:Label ID="lblTransDate" runat="server" Text='<%#Eval("TransDate","{0:dd/mm/yyyy}") %>'></asp:Label>
                                                        </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:BoundField ItemStyle-Width="150px" DataField="DiscType" HeaderText="DiscType" />
                                                        <asp:TemplateField HeaderText="DiscAmount" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                        <asp:Label ID="lblDiscAmount" runat="server" Text='<%#Eval("DiscAmount","{0:F2}") %>'></asp:Label>
                                                        </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="DiscValue" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                        <asp:Label ID="lblDiscValue" runat="server" Text='<%#Eval("DiscValue","{0:F2}") %>'></asp:Label>
                                                        </ItemTemplate>
                                                        </asp:TemplateField>

                                                     </Columns>
                                                </asp:GridView>

                                                <asp:GridView ID="grdAdjustment2" runat="server" Width="1000px" AutoGenerateColumns="false" CssClass="Grid"  DataKeyNames="ReferenceNo">
                                                    <Columns>
                                                                                                            
                                                     <asp:TemplateField HeaderText="Pre.CashbackValue" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Left">
                                                     <ItemTemplate>
                                                     <asp:Label ID="lblAdjPreviousCashBackValue" runat="server" Text='<%#Eval("PreviousPoint","{0:F2}") %>'></asp:Label>
                                                     </ItemTemplate>
                                                     </asp:TemplateField>

                                                      <asp:TemplateField HeaderText="CashbackAdjustment" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Left">
                                                     <ItemTemplate>
                                                     <asp:Label ID="lblAdjCashbackAdjustment" runat="server" Text='<%#Eval("AdjustPoints","{0:F2}") %>'></asp:Label>
                                                     </ItemTemplate>
                                                     </asp:TemplateField>
                                                      <asp:TemplateField HeaderText="Cashback_Balance" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Left">
                                                     <ItemTemplate>
                                                     <asp:Label ID="lblAdjCashbackAdjustment" runat="server" Text='<%#Eval("TotalPoints","{0:F2}") %>'></asp:Label>
                                                     </ItemTemplate>
                                                     </asp:TemplateField>
                                                     <asp:TemplateField HeaderText="Adjustment Date" ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Left">
                                                     <ItemTemplate>
                                                     <asp:Label ID="lblAdjdate" runat="server" Text='<%#Eval("CreatedDate") %>'></asp:Label>  
                                                     </ItemTemplate>
                                                     </asp:TemplateField>
                                                     <asp:BoundField ItemStyle-Width="270px" DataField="Notes" HeaderText="Reason" />
                                                        
                                                     <asp:BoundField ItemStyle-Width="170px" DataField="CreatedBy" HeaderText="Done By" />

                                                    </Columns>
                                                </asp:GridView>

                                            </asp:Panel>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="CustomerName">
                                    <ItemTemplate>
                                    <asp:Label ID="lblCustomerName" runat="server" Text='<%#Eval("CustomerName") %>'></asp:Label>
                                    </ItemTemplate>
                                    </asp:TemplateField>

                                   <asp:TemplateField HeaderText="UserName">
                                  <ItemTemplate>
                                  <asp:Label ID="lblUserName" runat="server" Text='<%#Eval("UserName") %>'></asp:Label>
                                  </ItemTemplate>
                                  </asp:TemplateField>
                                    <asp:TemplateField HeaderText="TransDate">
                                    <ItemTemplate>
                                    <asp:Label ID="lblTransDate" runat="server" Text='<%#Eval("TransDate","{0:dd/MM/yyyy}") %>'></asp:Label>
                                    </ItemTemplate>
                                    </asp:TemplateField>

                                     <asp:TemplateField HeaderText="Transid">
                                     <ItemTemplate>
                                     <asp:Label ID="lblPTransid" runat="server" Text='<%#Eval("Orderid") %>'></asp:Label>
                                     </ItemTemplate>
                                     <FooterTemplate>
                                     <b style="margin-left:700px">TOTAL </b>   
                                     </FooterTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Earn.Points" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                    <asp:Label ID="lblRPointsEarn" runat="server" Text='<%#Eval("Points") %>'></asp:Label>
                                    </ItemTemplate>
                                    <FooterTemplate>
                                    <asp:Label ID="lblTotalPoint" runat="server"  Width="100px"/>
                                    </FooterTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Redeem.Points" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                    <asp:Label ID="lblRDPoints" runat="server" Text='<%#Eval("RDPoints") %>'></asp:Label>
                                    </ItemTemplate>
                                    <FooterTemplate>
                                    <asp:Label ID="lblTotalRDPoint" runat="server"  Width="100px"/>
                                    </FooterTemplate>
                                    </asp:TemplateField>

                                </Columns>
                                <FooterStyle BackColor="White" ForeColor="Black" HorizontalAlign="Center"></FooterStyle>
                                <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>
                              </asp:Panel>
       </caption>
       </table>
       </div>
       </div>
       </div>
       </td>
       </tr>

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

     <div class="modalCss" id="ModalMemberList">
             <div class="modal-dialogCss">
             <div class="modal-body" >
             <div class="row">
             <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
             <div class="card" style="width:500px; height:550px; margin-left:745px">
             <h5 class="card-header" style="background-color: #4c4c4c; color: White;">CUSTOMER LIST
             <button type="button" class="close"  style="color:White; opacity:1;" onclick="CloseModal()" data-dismiss="modal">
             &times;</button>
             </h5>
             <div class="card-body">
             <div class="table-responsive" style="height: 500px; padding: 0px 20px 0px 20px;">
             <table id="example" class="table table-striped table-bordered second" style="width:70%">
             <tbody>
                 <div class="row">
                 <div class="column">
                 <label for="validationCustom03">
                 Mobile No
                 </label>
                 <asp:TextBox ID="txtMobSearch" runat="server" class="form-control" placeholder="Enter Mobile No" Width="250px">
                 </asp:TextBox>
                 </div>
                 </div>
                 <div class="row">
                 <div class="column">
                 <asp:Button ID="btnMemSearch" runat="server" class="btn btn-primary" 
                 OnClick="btnMemSearch_Click" Text="Apply" />
                 </div>
                 </div>
                 <caption>
                 <asp:Panel ID="Panel8" runat="server" BackColor="white" Height="350px"     ScrollBars="Auto" Width="380px">
                 <asp:GridView ID="grdMember" runat="server" AutoGenerateColumns="False" 
                 BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
                 CellPadding="3" DataKeyNames="CustomerID" Font-Size="Small" Height="270px" 
                 onselectedindexchanged="grdMember_SelectedIndexChanged" Width="350px">
                 <Columns>
                 <%--<asp:TemplateField HeaderText="SNo">
                 <ItemTemplate>
                 <%#Container.DataItemIndex + 1%>
                 </ItemTemplate>
                 </asp:TemplateField>
                 --%>
                 <asp:TemplateField HeaderText="CustomerID" ItemStyle-Width="200px" Visible="true">
                 <ItemTemplate>
                 <asp:Label ID="lblCustomerID" runat="server" Text='<%#Eval("CustomerID") %>'></asp:Label>
                 </ItemTemplate>
                 </asp:TemplateField>
                <%-- <asp:TemplateField HeaderText="MobileNo" ItemStyle-Width="200px" Visible="true">
                 <ItemTemplate>
                 <asp:Label ID="lblMobileNo" runat="server" Text='<%#Eval("Mobile") %>'></asp:Label>
                 </ItemTemplate>
                 </asp:TemplateField>--%>
                 <asp:TemplateField HeaderText="CustomerName" ItemStyle-Width="200px">
                 <ItemTemplate>
                 <asp:Label ID="lblCustomerName" runat="server" 
                 Text='<%#Eval("CustomerName") %>'></asp:Label>
                 </ItemTemplate>
                 </asp:TemplateField>
                 <asp:ButtonField CommandName="Select"  
                 ItemStyle-ForeColor="Blue" Text="Edit" />
                 </Columns>
                 <FooterStyle BackColor="White" ForeColor="#000066" />
                 <HeaderStyle BackColor="White" Font-Bold="True" ForeColor="White" />
                 <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                 <RowStyle ForeColor="#000066" />
                 <SelectedRowStyle BackColor="gray" Font-Bold="True" ForeColor="White" />
                 <SortedAscendingCellStyle BackColor="#F1F1F1" />
                 <SortedAscendingHeaderStyle BackColor="#007DBB" />
                 <SortedDescendingCellStyle BackColor="#CAC9C9" />
                 <SortedDescendingHeaderStyle BackColor="#00547E" />
                 </asp:GridView>
                 <br />
                 </asp:Panel>
                 </caption>
                 </tbody>
                 </table>
                 </div>
                 </div>
                 </div>
                 </div>
                 </div>
                 <div>
                </div>
               </div>
               </div>
               </div>

     </ContentTemplate>
     </asp:UpdatePanel>
    <asp:UpdateProgress ID="UpdateProgress" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
       <ProgressTemplate>
       <div class="overlay">
       <div class="LoadingDivCss">
           <img alt="" src="IMG/Spinner.gif" class="LoadingImgCss" />
       </div>
       </div>
      </ProgressTemplate>
  </asp:UpdateProgress>


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