<%@ Page Title="Compaign Adjustment" Language="C#" MasterPageFile="~/SunMaster.Master" AutoEventWireup="true" 
    CodeBehind="CampaignAdjustment.aspx.cs" Inherits="SUNWEB.CampaignAdjustment" %>
<%@ 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"] %>';
                LoadcompaignTypeText(DB);
                LoadcompaignTypeText2(DB);
                var ChkValue = localStorage.getItem("Cvalue");
                if (ChkValue == "C") {
                    ShowModalIcustomers();
                }
                var ChkValue1 = localStorage.getItem("Cvalue1");
                if (ChkValue1 == "C1") {
                    ShowModalIcustomers1();
                }


                
             });


    function AllowOnlyNumeric() {
        // Get the ASCII value of the key that the user entered
        var key = window.event.keyCode;

        // Verify if the key entered was a numeric character (0-9) or a decimal (.)
        if ((key > 47 && key < 58) || key == 46)
            // If it was, then allow the entry to continue
            return;

        else
            // If it was not, then dispose the key and continue with entry
            window.event.returnValue = null;
        alert("Number Only Allowed")
    }





    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 refershingpage()
            {
                localStorage.setItem("Cvalue", "C");
                location.href = 'CampaignAdjustment.aspx';
            }

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

      function validate()
      {
     <%-- if (document.getElementById("<%=txtMobileNo.ClientID %>").value == "")
      {
       alert("Enter the MobileNo");
       document.getElementById("<%=txtMobileNo.ClientID %>").focus();
       return false;
       }--%>
      if (document.getElementById("<%=txtCustomerName.ClientID %>").value == "")
      {
        alert("Enter the Customer Name");
        document.getElementById("<%=txtCustomerName.ClientID %>").focus();
        return false;
      }
      if (document.getElementById("<%=txtCID.ClientID %>").value == "")
      {
        alert("Provide CID");
        document.getElementById("<%=txtCID.ClientID %>").focus();
        return false;
      }
      if (document.getElementById("<%=txtActiveCompaignType.ClientID %>").value == "")
      {
        alert("Provide  Active CampaignType");
        document.getElementById("<%=txtActiveCompaignType.ClientID %>").focus();
        return false;
      }
      if (document.getElementById("<%=txtCurrentValue.ClientID %>").value == "")
      {
        alert("Provide Current Value");
        document.getElementById("<%=txtCurrentValue.ClientID %>").focus();
        return false;
      }
      if (document.getElementById("<%=txtAdjustValue.ClientID %>").value == "")
      {
        alert("Enter Adjust Value");
        document.getElementById("<%=txtAdjustValue.ClientID %>").focus();
        return false;
      }
      if (document.getElementById("<%=txtCreatedBy.ClientID %>").value == "")
      {
        alert("Enter Created By ");
        document.getElementById("<%=txtCreatedBy.ClientID %>").focus();
        return false;
      }
    }
        </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>

   <%--Model Popup  Javascript Code :--%>
   <script type="text/javascript">
     
        //Search Members
        function CloseModalMemberInformationList() {
            var modal = document.getElementById("ModalMemberList");
            modal.style.display = "none";
        }

       function CloseModalMemberInformationList1() {
           var modal = document.getElementById("ModalMemberList1");
           modal.style.display = "none";
       }


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

       function ShowModalMemberInformationList1() {
           var modal = document.getElementById("ModalMemberList1");
           modal.style.display = "block";
       }


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

       function CloseModal1() {
           var modal = document.getElementById("ModalMemberList1");
           modal.style.display = "none";
       }


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


       function ShowModalIcustomers1() {
           var modal = document.getElementById("ModalMemberList1");
           modal.style.display = "block";
           localStorage.removeItem("Cvalue1");
       }

       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 == 45) return true;
           if (charCode > 31 && (charCode < 48 || charCode > 57))
               return false;
           return true;
       }


       function LoadcompaignTypeText(DB) {
           $.ajax({
               type: "POST",
               url: "CampaignAdjustment.aspx/IsCashbackEnable",
               data: "{DB:'" + DB + "'}",
               async: false,
               contentType: 'application/json; charset=utf-8',
               dataType: 'json',
               error: function (XMLHttpRequest, textStatus, errorThrown) {

               },
               success: function (result) {
                   var data = JSON.parse(result.d);
                   if (data) {
                       ret = data.ini_value.toString();
                       if (ret == "1")
                       {
                           
                           document.getElementById("lblCurrentValueText").innerHTML = "In Amounts";
                           document.getElementById("lblCurrentValue2Text").innerHTML = "In Amounts";
                       }
                       else if (ret == "0")
                       {
                       
                       }


                    }
                }

            });
       }
       function LoadcompaignTypeText2(DB) {
           $.ajax({
               type: "POST",
               url: "CampaignAdjustment.aspx/IsPointredemptionEnable",
               data: "{DB:'" + DB + "'}",
               async: false,
               contentType: 'application/json; charset=utf-8',
               dataType: 'json',
               error: function (XMLHttpRequest, textStatus, errorThrown) {

               },
               success: function (result) {
                   var data = JSON.parse(result.d);
                   if (data) {
                       ret = data.ini_value.toString();
                       if (ret == "1") {
                           
                           document.getElementById("lblCurrentValueText").innerHTML = "In Points";
                           document.getElementById("lblCurrentValue2Text").innerHTML = "In Points";
                       }
                       else if (ret == "0") {

                       }


                   }
               }

           });
       }

       
   </script>


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel runat="server" ID="updatepanel1" UpdateMode="Conditional">
    <ContentTemplate>
   <table style="width:100%;padding-bottom:10px;">
       <tr>
       <td style="font-size:large;width:50%; font-family:'Open Sans', sans-serif; font-weight:bolder;">
        CAMPAIGN ADJUSTMENT
       </td>    
       <td align="right" style="padding-bottom:0px;">
       <label for="validationCustom05">
       Branch
       <asp:Label ID="lblBranchAliasName" runat="server"></asp:Label>
       </label>
       <asp:DropDownList ID="cmbBranches" CssClass="form-select-sm" runat="server"  Width="200px" Height="35px"
        AutoPostBack="true" OnSelectedIndexChanged="cmbBranches_SelectedIndexChanged">
       </asp:DropDownList>
       </td>
       </tr>
      </table>
        <br />

<%--   <div class="container-fluid mb-3">
  <div class="row align-items-center">
    
    <!-- Left Column: Title -->
    <div class="col-md-6">
      <h7 style="font-family: 'Open Sans', sans-serif; font-weight: bold;">
        CAMPAIGN ADJUSTMENT
      </h7>
    </div>
    
    <!-- Right Column: Branch Dropdown -->
    <div class="col-md-6 text-md-end">
      <div class="d-inline-flex align-items-center gap-2">
        <label for="cmbBranches" class="mb-0 me-2">Branch</label>
        <asp:Label ID="lblBranchAliasName" runat="server" CssClass="me-2" />
        <asp:DropDownList ID="cmbBranches"
        CssClass="custom-select" runat="server" Width="200px" Height="35px" AutoPostBack="true"
        OnSelectedIndexChanged="cmbBranches_SelectedIndexChanged">
        </asp:DropDownList>
      </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">
          <div class="card-body">
              <h5 class="card-header" style="background-color: #4c4c4c; color: White;">
              <span style="font-size:14px;color:#F8F9FA">CAMPAIGN ADJUSTMENT  </span>&nbsp;&nbsp;
              <asp:Button ID="btnAddnew1" OnClick="btnAddnew1_Click" runat="server" class="btn btn-success"  Text="Add New" />
              <button type="button"  onclick="ShowModalMemberInformationList()" class="btn btn-warning">
              Search
              </button>
              </h5>

            <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">User Name</label>
               <asp:TextBox ID="txtUserName" 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">Customer Name</label>
               <asp:TextBox ID="txtCustomerName" 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">CID</label>
               <asp:TextBox ID="txtCID" runat="server" class="form-control" Enabled ="false" > </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">Active Campaign Type</label>
             <asp:TextBox ID="txtActiveCompaignType" runat="server" Enabled="false" 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">Rate</label>
             <asp:TextBox ID="txtRate" runat="server" Enabled="false" 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">Current Value</label> (<label id="lblCurrentValueText">In</label>)
             <asp:TextBox ID="txtCurrentValue" runat="server" Enabled="false" class="form-control"> </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">Adjust Value  </label> (<label id="lblCurrentValue2Text">In</label>)
             <asp:TextBox ID="txtAdjustValue"  onkeypress="return isNumberKey(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">Created By </label>
             <asp:TextBox ID="txtCreatedBy" runat="server" class="form-control"> </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">Notes </label>
             <asp:TextBox ID="txtNotes"  TextMode="MultiLine" runat="server" class="form-control"> </asp:TextBox>
             </div>
             </div>
             <div>
             <asp:Button ID="btnSave" runat="server" Text="Save"  
                CssClass="btn btn-primary" onclick="btnSave_Click" OnClientClick="return validate()" />
                <asp:Button ID="btnClear" runat="server" Text="Clear"  
                CssClass="btn btn-primary" onclick="btnClear_Click" />
                </div>
              <div>
              <asp:HiddenField ID="hidMembershipType" runat="server" />
              </div>
            </div> 
          </div>
         </div>
      </div>

        <%-- This Search for Campaign Adjustment --%>
        <div class="modalCss" id="ModalMemberList">
             <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:105px;">
             <h7 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>
             </h7>
             <div class="card-body">
             <table id="example" class="table table-striped table-bordered second">
             <tbody>
                 <div class="row">
                 <div class="column">
                 <label for="validationCustom03">
                   UserName
                 </label>
                 <asp:TextBox ID="txtMobSearch" runat="server" class="form-control" placeholder="Enter UserName" 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" />
                <asp:Button ID="btnclearPop" Text="Clear" runat="server" OnClientClick="refershingpage()"  class="btn btn-primary" />
                <br />
                <asp:Label ID="customeridmsg" runat="server" Text="Userid doesn't Exist" ForeColor="Red"></asp:Label>
                 </div>
                

                 </div>
                 <caption>
                <asp:Panel ID="Panel8" runat="server" Height="550px" ScrollBars="Auto" Width="1600px" >
                 <asp:GridView ID="grdMember" runat="server" AutoGenerateColumns="False" 
                 BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
                 CellPadding="3" DataKeyNames="CustomerID" Font-Size="Small" Height="100px" 
                 onselectedindexchanged="grdMember_SelectedIndexChanged" Width="650px">
                 <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="UserName" ItemStyle-Width="200px">
                  <ItemTemplate>
                  <asp:Label ID="lblUserName" runat="server" 
                  Text='<%#Eval("UserName") %>'></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="Select" />
                 </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>
                 
                 </asp:Panel>
                 </caption>
                 </tbody>
                 </table>
               
             </div>
             </div>
             </div>
             </div>
             <div>
             </div>
             </div>
             </div>
        </div>

        <%-- This Search for CampaignAdjustmentList --%>
        <div class="modalCss" id="ModalMemberList1">
          <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:105px">
             <h5 class="card-header" style="background-color: #4c4c4c; color: White;"> CUSTOMER LIST
             <button type="button" class="close"  style="color:White; opacity:1;" onclick="CloseModal1()" data-dismiss="modal">
             &times;</button>
             </h5>
             <div class="card-body">
            <div class="table-responsive" style="padding:0px 20px 0px 20px;">
           
                        
             <tbody>
                 <div class="row">
                 <div class="column">
                 <label for="validationCustom03">
                 UserName
                 </label>
                 <asp:TextBox ID="txtUserName1" runat="server" class="form-control" placeholder="Enter UserName" Width="250px">
                 </asp:TextBox>
                 </div>
                 </div>
                 <div class="row">
                 <div class="column">
                 <asp:Button ID="btnSearch1" runat="server" class="btn btn-primary" 
                 OnClick="btnSearch1_Click" Text="Apply" />
                <asp:Button ID="btnClearpopup1" Text="Clear" runat="server" OnClientClick="refershingpage1()"  class="btn btn-primary" />
                <br />
                 <asp:Label ID="customeridmsg1" runat="server" Text="Userid doesn't Exist" ForeColor="Red"></asp:Label>
                 </div>
                 

                 </div>
                 <caption>
                 <asp:Panel ID="Panel1" runat="server" BackColor="white" Height="600px" ScrollBars="Auto" Width="1600px">
                 <asp:GridView ID="grdMember1" runat="server" AutoGenerateColumns="False" 
                 BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
                 CellPadding="1" DataKeyNames="CustomerID" Font-Size="Small" Height="700px" 
                 onselectedindexchanged="grdMember1_SelectedIndexChanged" Width="750px">
                 <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="lblCustomerID1" runat="server" Text='<%#Eval("CustomerID") %>'></asp:Label>
                 </ItemTemplate>
                 </asp:TemplateField>
                 <asp:TemplateField HeaderText="CustomerName" ItemStyle-Width="200px">
                 <ItemTemplate>
                 <asp:Label ID="lblusername" runat="server"  Text='<%#Eval("UserName") %>'></asp:Label>
                 </ItemTemplate>
                 </asp:TemplateField>
                <%-- <asp:TemplateField HeaderText="MobileNo" ItemStyle-Width="200px" Visible="true">
                 <ItemTemplate>
                 <asp:Label ID="lblMobileNo1" runat="server" Text='<%#Eval("Mobile") %>'></asp:Label>
                 </ItemTemplate>
                 </asp:TemplateField>--%>
                 <asp:TemplateField HeaderText="CustomerName" ItemStyle-Width="200px">
                 <ItemTemplate>
                 <asp:Label ID="lblCustomerName1" runat="server"  Text='<%#Eval("CustomerName") %>'></asp:Label>
                 </ItemTemplate>
                 </asp:TemplateField>
                 <asp:ButtonField CommandName="Select"  
                 ItemStyle-ForeColor="Blue" Text="Select" />
                 </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>
            </div>
                 
              </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"> ADJUST HISTORY REPORTS  </span>&nbsp;&nbsp;
         <asp:Button ID="btnAddNew" OnClick="btnAddNew_Click" runat="server" class="ButtonSearch" BackColor="green" ForeColor="white" Text="Add New" />
         <button type="button" id="abcid" value="a"  onclick="ShowModalMemberInformationList1()" class="ButtonSearch">
              Search
              </button>
              </h5>
         <asp:Label ID="lblMsgTotalSelection" runat="server" CssClass="Labels"></asp:Label>
         </b> 
         </p>
         </h4>
         <div class="card-body">
             <div class="row">
                <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                <div class="card">
                <div class="card-body">
                <div class="form-row">
                <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                <caption>
                <label for="validationCustom03">
                FROM DATE
                </label>
                <asp:TextBox ID="txtStartDt" class="form-control" autocomplete="off" 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" autocomplete="off" 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">UserName</label>
               <asp:TextBox ID="RtxtUserName" runat="server" class="form-control"> </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"  style="display:none">
               <label for="validationCustom03">MobileNo</label>
               <asp:TextBox ID="txtRMobileNo" 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">Campaign Type</label>
              <asp:DropDownList ID="cmbCampaignType" runat="server" CssClass="custom-select"> </asp:DropDownList>
              </div>
               <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
               <label for="validationCustom03">Customer Name</label>
               <asp:TextBox ID="txtRCustomerName" 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">CID</label>
               <asp:TextBox ID="txtRcid" runat="server" class="form-control" Enabled ="false" > </asp:TextBox>
               </div>

         </div>
         <div class="form-row">
             
          </div>   
         <div>
         <asp:Button ID="btnSearchCampaignAdjust" runat="server" Text="Search"  
          CssClass="btn btn-primary" onclick="btnSearchCampaignAdjust_Click" />
          <asp:Button ID="btnClear1" runat="server" Text="Clear"  
          CssClass="btn btn-primary" onclick="btnClear1_Click" />
          </div>     
          </div>
         </div>
         </div>
        </div>


        <div class="table-responsive">
        <table id="Table1" class="table table-striped table-bordered second" style="width: 100%">
        <tbody>
        <caption>
        <div align="left">
        <asp:Panel ID="Panel2" runat="server" BackColor="white" Height="580px"     ScrollBars="Auto" Width="1550px">
        <asp:GridView ID="grdCompaignAdjustList" runat="server" AutoGenerateColumns="False" Font-Size="12px"
         AllowSorting="true" EmptyDataText="No Data Found ! " Width="700px" ShowFooter="True" OnRowDataBound="grdCompaignAdjustList_RowDataBound"
         BorderWidth="1px" CellPadding="3">
        <Columns>
       
         <asp:TemplateField HeaderText="Reference No" ItemStyle-Width="180px" ItemStyle-HorizontalAlign="Center">
         <ItemTemplate>
         <asp:Label ID="lblReferenceNo" runat="server" Width="100px" Text='<%#Eval("ReferenceNo") %>'></asp:Label>
         </ItemTemplate>
       
         </asp:TemplateField>
         <asp:TemplateField HeaderText="Compaign-Type" ItemStyle-Width="180px" ItemStyle-HorizontalAlign="Center">
         <ItemTemplate>
         <asp:Label ID="lblCompaignType" Width="100px" runat="server" Text='<%#Eval("CompaignType") %>'></asp:Label>
         </ItemTemplate>
         
         <ItemStyle Width="80px"></ItemStyle>
         </asp:TemplateField>
         <asp:TemplateField HeaderText="CustomerName" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center">
         <ItemTemplate>
         <%--<asp:Label ID="lblCustomerName" runat="server" Text='<%#Eval("Amount" ,"{0:F2}") %>'></asp:Label>--%>
         <asp:Label ID="lblCustomerName" runat="server" Text='<%#Eval("CustomerName") %>'></asp:Label>
         </ItemTemplate>
         <FooterTemplate>
         <asp:Label ID="lblGrandDiscQTY" runat="server" />
         </FooterTemplate>
         <FooterStyle HorizontalAlign="Center" />
         <ItemStyle Width="80px"></ItemStyle>
         </asp:TemplateField>
       <%--  <asp:TemplateField HeaderText="Mobile" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Right">
         <ItemTemplate>
         <asp:Label ID="lblMobile" runat="server" Text='<%#Eval("Mobile") %>'></asp:Label>
         </ItemTemplate>
         <FooterStyle HorizontalAlign="Right" />
         <ItemStyle Width="80px"></ItemStyle>
         </asp:TemplateField>--%>

         <asp:TemplateField HeaderText="Rate" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center">
         <ItemTemplate>
         <asp:Label ID="lblRate" runat="server" Text='<%#Eval("Rate" ,"{0:F2}") %>'></asp:Label>
         </ItemTemplate>
         <ItemStyle Width="80px"></ItemStyle>
         </asp:TemplateField>
             
         <asp:TemplateField HeaderText="Pre.Cashback Amount" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center">
         <ItemTemplate>
         <asp:Label ID="lblPCashback" runat="server" Width="130px" Text='<%#Eval("PreviousCashbackValue" ,"{0:F2}") %>'></asp:Label>
         </ItemTemplate>
         <ItemStyle Width="80px"></ItemStyle>
         </asp:TemplateField>

         <asp:TemplateField HeaderText="CashbackAdjustAmount" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center">
         <ItemTemplate>
         <asp:Label ID="lblCashbackAdjustAmount" runat="server" Text='<%#Eval("CashBackAdjAmount" ,"{0:F2}") %>'></asp:Label>
         </ItemTemplate>
         <ItemStyle Width="80px"></ItemStyle>
         </asp:TemplateField>
         <asp:TemplateField HeaderText="CurrentCashbackAmt" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center">
         <ItemTemplate>
         <asp:Label ID="lblCashBackBal" runat="server" Text='<%#Eval("CashBackBal" ,"{0:F2}") %>'></asp:Label>
         </ItemTemplate>
         <ItemStyle Width="80px"></ItemStyle>
         </asp:TemplateField>

         <asp:TemplateField HeaderText="Pre.Point" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center">
         <ItemTemplate>
         <asp:Label ID="lblPreviousPoint" runat="server" Text='<%#Eval("PreviousPoint" ,"{0:F2}") %>'></asp:Label>
         </ItemTemplate>
         <ItemStyle Width="80px"></ItemStyle>
         </asp:TemplateField>
         <asp:TemplateField HeaderText="Adj.Point" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center">
         <ItemTemplate>
         <asp:Label ID="lblAdjustPoint" runat="server" Text='<%#Eval("AdjustPoints" ,"{0:F2}") %>'></asp:Label>
         </ItemTemplate>
         <ItemStyle Width="80px"></ItemStyle>
         </asp:TemplateField>
         <asp:TemplateField HeaderText="Tot.Point" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center">
         <ItemTemplate>
         <asp:Label ID="lblTotalPoint" runat="server" Text='<%#Eval("TotalPoints" ,"{0:F2}") %>'></asp:Label>
         </ItemTemplate>
         <ItemStyle Width="80px"></ItemStyle>
         </asp:TemplateField>
                    
         <asp:TemplateField HeaderText="Reason" ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Right">
         <ItemTemplate>
         <asp:Label ID="lblNotes" runat="server" Text='<%#Eval("Notes") %>'></asp:Label>
         </ItemTemplate>                                                            
         <FooterStyle HorizontalAlign="Right" />
         <ItemStyle Width="200px"></ItemStyle>
         </asp:TemplateField>

         <asp:BoundField DataField="CreatedDate" HeaderText="CreateDate" DataFormatString="{0:dd-M-yyyy}"/>
         <asp:TemplateField HeaderText="Created By" ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Right">
         <ItemTemplate>
         <asp:Label ID="lblCreatedBy" runat="server" Text='<%#Eval("CreatedBy") %>'></asp:Label>
         </ItemTemplate>                                                            
         <FooterStyle HorizontalAlign="Right"/>
         <ItemStyle Width="200px"></ItemStyle>
         </asp:TemplateField>

         <asp:TemplateField HeaderText="UserName" ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Right">
         <ItemTemplate>
         <asp:Label ID="lblUserName" runat="server" Text='<%#Eval("UserName") %>'></asp:Label>
         </ItemTemplate>                                                            
         <FooterStyle HorizontalAlign="Right"/>
         <ItemStyle Width="200px"></ItemStyle>
         </asp:TemplateField>


         </Columns>
         <FooterStyle BackColor="White" ForeColor="Black"></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>
         </div>
         </caption>
         </tbody>
         </table>
         </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>
