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

      <script type="text/javascript" language="javascript">

          $(document).ready(function ()
          {
              var DB = '<%= Session["BranchDB"] %>';
         
         
         var ChkValue = localStorage.getItem("Cvalue");
              if (ChkValue == "C")
              {
             Show_Model_CashBack5();
              }
              var ChkValue1 = localStorage.getItem("Cvalue1");
              if (ChkValue1 == "C1")
              {
                  ShowModalLoyaltyPointsList8();

              }
             

            var ChkValue2 = localStorage.getItem("Cvalue2");
             if (ChkValue2 == "C2")
             {
                 ShowModalPointsMonths7();
             }
     });

      </script>


    <script language="javascript" type="text/javascript">

        function validate()
          {

            if (document.getElementById("<%=txtMembershipName.ClientID %>").value == "")
            {
                alert("Enter the Membership Name");
                document.getElementById("<%=txtMembershipName.ClientID %>").focus();
                return false;
            }

            if (document.getElementById("<%=txtCashbackRate.ClientID %>").value == "")
            {
                alert("Enter Cashback Rate");
                document.getElementById("<%=txtCashbackRate.ClientID %>").focus();
                return false;
            }

           }

        function validate5()
        {

            if (document.getElementById("<%=txtLPName.ClientID %>").value == "") {
                alert("Enter the Loyalty Point Name");
                document.getElementById("<%=txtLPName.ClientID %>").focus();
                return false;
            }

            if (document.getElementById("<%=txtLpRate.ClientID %>").value == "")
            {
                alert("Enter the Loyalty Point Rate");
                document.getElementById("<%=txtLpRate.ClientID %>").focus();
                return false;
            }

            if (document.getElementById("<%=txtRDRate.ClientID %>").value == "")
            {
                 alert("Enter the Loyalty Point Redeem Rate");
                 document.getElementById("<%=txtRDRate.ClientID %>").focus();
                 return false;
             }


        }

        function validate7() {

            if (document.getElementById("<%=txtRPointExpiryMonth.ClientID %>").value == "")
            {
                 alert("Enter the PointExpiry Months");
                 document.getElementById("<%=txtRPointExpiryMonth.ClientID %>").focus();
                 return false;
             }
             
         }

        function isNumberKey(evt, obj) {

            var charCode = (evt.which) ? evt.which : event.keyCode
            var value = obj.value;
            var dotcontains = value.indexOf(".") != -1;
            if (dotcontains)
                if (charCode == 46) return false;
            if (charCode == 46) return true;
            if (charCode > 31 && (charCode < 48 || charCode > 57))
                return false;
            return true;
        }


        function isNumber(evt) {
            var charCode = evt.which ? evt.which : evt.keyCode;
            // Only digits 0-9
            if (charCode < 48 || charCode > 57) {
                return false;
            }
            return true;
        }


        function refershingpage()
        {
            localStorage.setItem("Cvalue", "C");
            location.href = 'CRMMembershipcampaign.aspx';
        }


        function Show_Model_CashBack5() {
            var modal = document.getElementById("CashBackListModel");
            modal.style.display = "block";
            localStorage.removeItem("Cvalue");
        }


        function refershingpage5()
        {
            localStorage.setItem("Cvalue1", "C1");
            location.href = 'CRMMembershipcampaign.aspx';
        }

        function ShowModalLoyaltyPointsList8()
        {
            var modal_b = document.getElementById("LoyaltyPointsList");
            modal_b.style.display = "block";
            localStorage.removeItem("Cvalue1");
        }


        function refershingpage7() {
            localStorage.setItem("Cvalue2", "C2");
            location.href = 'CRMMembershipcampaign.aspx';
        }

        function ShowModalPointsMonths7() {
            var modal_b = document.getElementById("PointExpiryMonths");
            modal_b.style.display = "block";
            localStorage.removeItem("Cvalue2");
        }


    </script>

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

    <script type="text/javascript">

        //Search Popup For CashBack Tap
       
        function Show_Model_CashBack()
        {
           var modal = document.getElementById("CashBackListModel");
            modal.style.display = "block";
        }

        function CloseModal()
        {
            var modal2 = document.getElementById("CashBackListModel");
            modal2.style.display = "none";
        }


        //Search Popup For Loyaltypoints Tap

        function ShowModalLoyaltyPointsList()
        {
            var modal_b = document.getElementById("LoyaltyPointsList");
            modal_b.style.display = "block";
        }

        function CloseModal5()
        {
            var modal_c = document.getElementById("LoyaltyPointsList");
            modal_c.style.display = "none";
        }


        function ShowModalPointExpiry()
        {
            var modal_b = document.getElementById("PointExpiryMonths");
            modal_b.style.display = "block";
        }

        function CloseModal6() {
            var modal_c = document.getElementById("PointExpiryMonths");
            modal_c.style.display = "none";
        }


        


        
    </script>
 </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;">
                           MEMBERSHIP CAMPAIGN 
                         </td>    
     
                         </tr>
                         </table>
    

                         <div class="row" style ="display:none">
                         <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" Visible="false"></asp:Label></label>
                         <asp:DropDownList ID="cmbBranches" CssClass="custom-select"  
                         runat="server" AutoPostBack="true" 
                         onselectedindexchanged="cmbBranches_SelectedIndexChanged" Visible="false"></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>
                      </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">MEMBERSHIP </span>&nbsp;&nbsp;
                              <asp:Button ID="btnAddNew" OnClick="btnAddNew_Click" runat="server" class="btn btn-success"  Text="Add New" />
                              <button type="button"  onclick="ShowModalPointExpiry()" class="btn btn-warning"> 
                                Create Months
                              </button>
                              <button type="button"  onclick="Show_Model_CashBack()" class="btn btn-warning"> 
                              Search
                              </button>
                              </h5> 
                              <div class="card-body">
                              <div class="card-body border-top">
                              <div class="form-row">
                              <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                              <label for="validationCustom04">
                              Membership Name 
                              </label>
                              <asp:TextBox ID="txtMembershipName" runat="server" class="form-control" ></asp:TextBox>
                              <br />
                              </div>
                            
                              <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                              <label for="validationCustom04">
                              CashBack Rate 
                              </label>
                              <asp:TextBox ID="txtCashbackRate" onkeypress="return isNumberKey(event,this)" class="form-control" runat="server" ></asp:TextBox>
                              </div>
                              <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                              <label for="validationCustom04">
                              Loyalty Point Link 
                              </label>
                              <asp:DropDownList ID="cmbLPLink" CssClass="custom-select"  
                              runat="server" AutoPostBack="true"></asp:DropDownList>
                              </div
                             </div>
                        
                            </div>


                            <div class="form-row">
                            <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                <label for="validationCustom03">
                                    <asp:Label ID="lblPointExpiryInMonths" ForeColor="Gray" runat="server" Text="Point Expiry In Months"></asp:Label></label>
                                <asp:DropDownList ID="cmbPointInMonths" CssClass="custom-select"
                                    runat="server" AutoPostBack="false" >
                                </asp:DropDownList>
                            </div>


                            <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                <label for="validationCustom03">
                                    Notes</label>
                                <asp:TextBox ID="txtNotes" runat="server" class="form-control"> </asp:TextBox>
                            </div>

                           

                      

                                  
                          </div>
                         <asp:Button ID="btnCBSave" runat="server" Text="Save" OnClientClick="return  validate()" OnClick="btnCBSave_Click" CssClass="btn btn-primary" />
                         <asp:Button ID="btnCBUpdate" runat="server" Text="Update" OnClientClick="return  validate()" OnClick="btnCBUpdate_Click" CssClass="btn btn-primary" />  
                         <asp:HiddenField ID="hidmid" runat="server" />
                         </div>
                         </div>
                         </div>
                       </div>
                       </div>
                
               <br />
               <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">LOYALTY POINTS </span>&nbsp;&nbsp;
                  <asp:Button ID="btnaddNew2" OnClick="btnaddNew2_Click" runat="server" class="btn btn-success" Text="Add New" />
                  <button type="button"  onclick="ShowModalLoyaltyPointsList()" class="btn btn-warning"> 
                  Search
                  </button>
                            
                  </h5>
                   <div class="card-body border-top">
                     <div class="form-row">
                      <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                      <label for="validationCustom04"> Loyalty Point Name </label>
                      <asp:TextBox ID="txtLPName" class="form-control" runat="server"></asp:TextBox>
                     </div>
                     <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                    <label for="validationCustom04">
                     Loyalty Point Rate 
                    </label>
                    <asp:TextBox ID="txtLpRate" onkeypress="return isNumberKey(event,this)" class="form-control" runat="server" ></asp:TextBox>
                    </div>
                     
                  <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                    <label for="validationCustom04">
                     Loyalty Point Redeem Rate 
                    </label>
                    <asp:TextBox ID="txtRDRate" onkeypress="return isNumberKey(event,this)" class="form-control" runat="server" ></asp:TextBox>
                    </div>
                    </div> 
                    <div class="form-row">
                    <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                    <label for="validationCustom03">
                      Tier CheckPoints
                    </label>

                    <asp:TextBox ID="txtCheckPoints" onkeypress="return isNumber(event,this)" runat="server"  class="form-control" ></asp:TextBox>
                    </div>
                    <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                     <label for="validationCustom03">
                     Notes</label>
                     <asp:TextBox ID="txtLPNotes" runat="server" TextMode="MultiLine"  class="form-control" ></asp:TextBox>
                     </div>

                  
                  </div>
                     
                    <asp:Button ID="btnLPSave" runat="server" Text="Save" OnClick="btnLPSave_Click" OnClientClick="return  validate5()" CssClass="btn btn-primary" />
                    <asp:Button ID="btnLPUpdate" runat="server" Text="Update" OnClick="btnLPUpdate_Click" OnClientClick="return  validate5()" CssClass="btn btn-primary" />  
                    <asp:HiddenField ID="hidLPid" runat="server" />
              </div>   
           
             </div>
             </div>
             </div>
                
        

        <div class="modalCss" id="CashBackListModel">
                     <div class="modal-dialogCss" style="width:95%">
                   
                    
                       <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=" margin-left:180px">
                      
                            <h7 class="card-header" style="background-color: #4c4c4c; color: White;">CASHBACK COMPAIGN LIST
                             <button type="button" class="close"  style="color:White; opacity:1;" onclick="CloseModal()" data-dismiss="modal">
                              &times;</button>
                            </h7>
                            <div class="card-body">
                                <div class="table-responsive" style="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">
                                  Membership Name
                                  </label>
                                  <asp:TextBox ID="txtsMembershipName" runat="server" class="form-control" Width="250px" 
                                   placeholder="Enter Membership Name">
                                   </asp:TextBox>
                                   </div>
                                   </div>
                                 <div class="row">
                                 <div class="column">
                                 <asp:Button ID="btnCashBackSearch" OnClick="btnCashBackSearch_Click"   runat="server" class="btn btn-primary"  Text="Apply" />
                                 <asp:Button ID="btnclearPop" Text="Clear" runat="server" OnClientClick="refershingpage()" class="btn btn-primary" />
                                
                                 </div>
                                 </div>
                                <caption>
                                <asp:Panel ID="Panel8" runat="server" BackColor="white" Height="540px" 
                                ScrollBars="Auto" Width="1510px">
                                <asp:GridView ID="grdCashBack" runat="server" AutoGenerateColumns="False" 
                                BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
                                CellPadding="3" DataKeyNames="MembershipID" Font-Size="Small" Height="170px" 
                                onselectedindexchanged="grdCashBack_SelectedIndexChanged" Width="600px">
                                <Columns>
                                <%--<asp:TemplateField HeaderText="SNo">
                                  <ItemTemplate>
                                  <%#Container.DataItemIndex + 1%>
                                  </ItemTemplate>
                                  </asp:TemplateField>
                                 --%>
                                 <asp:TemplateField HeaderText="MID" Visible="false">
                                 <ItemTemplate>
                                 <asp:Label ID="lblMID" runat="server" Text='<%#Eval("MID") %>'></asp:Label>
                                 </ItemTemplate>
                                 </asp:TemplateField>

                                 <asp:TemplateField HeaderText="Membership Name" ItemStyle-Width="250px">
                                 <ItemTemplate>
                                 <asp:Label ID="lblMembershipName" runat="server" 
                                 Text='<%#Eval("MembershipName") %>'></asp:Label>
                                 </ItemTemplate>
                                 </asp:TemplateField>
                                 <asp:TemplateField HeaderText="CashBack Rate" ItemStyle-Width="250px">
                                 <ItemTemplate>
                                 <asp:Label ID="lblCashBackRate" runat="server" 
                                 Text='<%#Eval("CashBackRate") %>'></asp:Label>
                                 </ItemTemplate>
                                 </asp:TemplateField>
                                  <asp:ButtonField CommandName="Select"  
                                 ItemStyle-ForeColor="Green" 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="#669999" Font-Bold="True" ForeColor="White" />
                                 <SortedAscendingCellStyle BackColor="#F1F1F1" />
                                 <SortedAscendingHeaderStyle BackColor="#007DBB" />
                                 <SortedDescendingCellStyle BackColor="#CAC9C9" />
                                 <SortedDescendingHeaderStyle BackColor="#00547E" />
                                 </asp:GridView>
                                 </asp:Panel>
                                     
                                 </caption>
                                           
                              </tbody>
                              </table>
                            </div>
                          </div>
                         </div>
                       </div>
                     </div>
                   </div>
               </div>
            </div>
        <div class="modalCss" id="LoyaltyPointsList">
        <div class="modal-dialogCss" style="width:95%">
        
                    
                       <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="margin-left:180px">
                      
                            <h7 class="card-header" style="background-color: #4c4c4c; color: White;">LOYALTY POINT COMPAIGN LIST
                             <button type="button" class="close"  style="color:White; opacity:1;" onclick="CloseModal5()" data-dismiss="modal">
                              &times;</button>
                            </h7>
                            <div class="card-body">
                                <div class="table-responsive" style=" padding:0px 20px 0px 20px;">
                                <table id="example" class="table table-striped table-bordered second">
                            
                                <tbody>
                                <div class="row">
                                <div class="column">
                                 <label for="validationCustom03">
                                   LoyaltyPoint Name 
                                  </label>
                                  <asp:TextBox ID="txtRLPName" runat="server" class="form-control" Width="250px" 
                                   placeholder="Enter LoyaltyPoint Name">
                                   </asp:TextBox>
                                   </div>
                                   </div>
                                 <div class="row">
                                 <div class="column">
                                 <asp:Button ID="btnLPSearch" OnClick="btnLPSearch_Click" runat="server" class="btn btn-primary"  Text="Apply" />
                                 <asp:Button ID="btnClearForLaoyaltyPoint" Text="Clear" runat="server" OnClientClick="refershingpage5()" class="btn btn-primary" />
                                 </div>
                                 </div>
                                <caption>
                                <asp:Panel ID="Panel1" runat="server" BackColor="white" Height="540px" 
                                ScrollBars="Auto" Width="1500px">
                                <asp:GridView ID="grdLP" runat="server" AutoGenerateColumns="False" 
                                BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
                                CellPadding="3" DataKeyNames="ID" Font-Size="Small" Height="170px" 
                                onselectedindexchanged="grdLP_SelectedIndexChanged" Width="500px">
                                <Columns>
                                <%--<asp:TemplateField HeaderText="SNo">
                                  <ItemTemplate>
                                  <%#Container.DataItemIndex + 1%>
                                  </ItemTemplate>
                                  </asp:TemplateField>
                                 --%>
                                 <asp:TemplateField HeaderText="LpID" Visible="false">
                                 <ItemTemplate>
                                 <asp:Label ID="lblSLpID" runat="server" Text='<%#Eval("LpID") %>'></asp:Label>
                                 </ItemTemplate>
                                 </asp:TemplateField>

                                 <asp:TemplateField HeaderText="LpName" ItemStyle-Width="250px">
                                 <ItemTemplate>
                                 <asp:Label ID="lblSLpName" runat="server" 
                                 Text='<%#Eval("LpName") %>'></asp:Label>
                                 </ItemTemplate>
                                 </asp:TemplateField>
                                 <asp:TemplateField HeaderText="LPRate" ItemStyle-Width="250px">
                                 <ItemTemplate>
                                 <asp:Label ID="lblsLPRate" runat="server" 
                                 Text='<%#Eval("LPRate") %>'></asp:Label>
                                 </ItemTemplate>
                                 </asp:TemplateField>

                                <asp:TemplateField HeaderText="RDRate" ItemStyle-Width="250px">
                                <ItemTemplate>
                                <asp:Label ID="lblsRDRate" runat="server" 
                                 Text='<%#Eval("RDRate") %>'></asp:Label>    
                                 </ItemTemplate>
                                 </asp:TemplateField>
                                <asp:TemplateField HeaderText="TierCheckPoints" ItemStyle-Width="250px">
                                <ItemTemplate>
                                <asp:Label ID="lblCheckPoints" runat="server" 
                                 Text='<%#Eval("CheckPoints") %>'></asp:Label>    
                                </ItemTemplate>
                                </asp:TemplateField>


                                 <asp:ButtonField CommandName="Select"  
                                 ItemStyle-ForeColor="Green" 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="#669999" Font-Bold="True" ForeColor="White" />
                                 <SortedAscendingCellStyle BackColor="#F1F1F1" />
                                 <SortedAscendingHeaderStyle BackColor="#007DBB" />
                                 <SortedDescendingCellStyle BackColor="#CAC9C9" />
                                 <SortedDescendingHeaderStyle BackColor="#00547E" />
                                 </asp:GridView>
                                 </asp:Panel>
                                     
                                 </caption>
                                         
                                           
                                   </tbody>
                                     
                                    </table>
                                    </div>
                               
                                   </div>

                             
                                  </div>

                        
                                 </div>

                    
                     
                             </div>




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

        <div class="modalCss" id="PointExpiryMonths">
             <div class="modal-dialogCss" style="width:95%">
           
            
               <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=" margin-left:180px">
              
                    <h7 class="card-header" style="background-color: #4c4c4c; color: White;">POINT EXPIRY MONTH 
                     <button type="button" class="close"  style="color:White; opacity:1;" onclick="CloseModal6()" data-dismiss="modal">
                      &times;</button>
                    </h7>
                    <div class="card-body">
                        <div class="table-responsive" style="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">
                           PointExpiry Month
                          </label>
                          <asp:TextBox ID="txtRPointExpiryMonth" MaxLength="2" runat="server" onkeypress="return isNumber(event,this)" class="form-control" Width="250px" 
                           placeholder="Enter Point Expiry Month">
                           </asp:TextBox>
                           </div>
                           </div>
                         <div class="row">
                         <div class="column">
                         <asp:Button ID="btnSavePointExpiry" OnClick="btnSavePointExpiry_Click"  OnClientClick="return validate7()"  runat="server" class="btn btn-primary"  Text="Save" />
                         <asp:Button ID="btnUpdatePointExpiry" OnClick="btnUpdatePointExpiry_Click" OnClientClick="return validate7()"   runat="server" class="btn btn-primary"  Text="Update" />
                         <asp:Button ID="Button2" Text="Clear" runat="server" OnClientClick="refershingpage7()" class="btn btn-primary" />
                        <asp:HiddenField ID="hidpeid" runat="server" />
                         </div>
                         </div>
                        <caption>
                        <asp:Panel ID="Panel2" runat="server" BackColor="white" Height="540px" 
                        ScrollBars="Auto" Width="1510px">
                        <asp:GridView ID="grdPointExpiryMonths" runat="server" AutoGenerateColumns="False" 
                        BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
                        CellPadding="3" DataKeyNames="PeID" Font-Size="Small" Height="170px" 
                        onselectedindexchanged="grdPointExpiryMonths_SelectedIndexChanged" Width="600px">
                        <Columns>
                        <%--<asp:TemplateField HeaderText="SNo">
                          <ItemTemplate>
                          <%#Container.DataItemIndex + 1%>
                          </ItemTemplate>
                          </asp:TemplateField>
                         --%>
                         <asp:TemplateField HeaderText="PEID" Visible="false">
                         <ItemTemplate>
                         <asp:Label ID="lblPEID" runat="server" Text='<%#Eval("PEID") %>'></asp:Label>
                         </ItemTemplate>
                         </asp:TemplateField>

                         <asp:TemplateField HeaderText="PeMonths" ItemStyle-Width="250px">
                         <ItemTemplate>
                         <asp:Label ID="lblpemonths" runat="server" 
                         Text='<%#Eval("PeMonths") %>'></asp:Label>
                         </ItemTemplate>
                         </asp:TemplateField>
                         
                          <asp:ButtonField CommandName="Select"  
                         ItemStyle-ForeColor="Green" 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="#669999" Font-Bold="True" ForeColor="White" />
                         <SortedAscendingCellStyle BackColor="#F1F1F1" />
                         <SortedAscendingHeaderStyle BackColor="#007DBB" />
                         <SortedDescendingCellStyle BackColor="#CAC9C9" />
                         <SortedDescendingHeaderStyle BackColor="#00547E" />
                         </asp:GridView>
                         </asp:Panel>
                             
                         </caption>
                                   
                      </tbody>
                      </table>
                    </div>
                  </div>
                 </div>
               </div>
             </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>
