<%@ Page Title="" Language="C#" MasterPageFile="~/masterpage/MasterPage.master" AutoEventWireup="true" CodeFile="MoneyTransferGo.aspx.cs" Inherits="Agent_MoneyTransferGo" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
 <link href="../css/bootstrap.min.css" rel="stylesheet" />
    <style>
        h3 {
            font-family: 'Bitter', serif;
            font-weight: 400;
            line-height: 1.2em;
            margin: 0 0 1em 0;
            color: #3b363a;
            
        }
        /* The Modal (background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    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 Content/Box */
.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 35%; /* Could be more or less, depending on screen size */
}

/* The Close Button */
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
 .Background
        {
            background-color: Black;
            filter: alpha(opacity=90);
            opacity: 0.8;
        }
        .Popup
        {
            background-color: #FFFFFF;
            border-width: 3px;
            border-style: solid;
            border-color: black;
            padding-top: 10px;
            padding-left: 10px;
            width: 400px;
            height: 350px;
        }
        .lbl
        {
            font-size:16px;
            font-style:italic;
            font-weight:bold;
        }
    </style>
    <script type="text/javascript">
        function validateNumber(event) {
            var key = window.event ? event.keyCode : event.which;
            if (event.keyCode === 8 || event.keyCode === 46) {
                return true;
            } else if (key < 48 || key > 57) {
                return false;
            } else {
                return true;
            }
        };
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
     
<div class="container" style="width:100%;">				
					<div class="row"><p style="text-align:center;"><span style="color: red; "><asp:Label ID="lblmsg" runat="server"></asp:Label></span></p></div>
					<div class="row">
	                            <div class="table-responsive">
	                            <div class="col-md-5 form-group">
									 	   <div class="col-md-12 form-group">
	                                           <h3 class="box-title">Domestic Money Transfer</h3>
	                                       </div>
	                                       
	                                       <div class="col-md-10 form-group">
                                               <asp:TextBox ID="txtMobileNo" class="form-control" style="width:100% !important;" runat="server" maxlength="10" placeholder="Enter Customer Mobile" onkeypress="return validateNumber(event)" required></asp:TextBox>
	                                           <span class="highlight"></span> <span class="bar"></span>
	                                           
	                                       </div>
	                                       <div class="col-md-10 form-group" align="right">
                                               <asp:Button ID="btnreset" runat="server" class="btn btn-inverse waves-effect waves-light" style="border-radius: 3px;" Text="Reset" />
                                               <asp:Button ID="btnsubmit" runat="server" class="btn btn-danger waves-effect waves-light m-r-10" style="border-radius: 3px;" Text="Submit" OnClick="btnsubmit_Click" />
	                                       </div>
	                                   
	                           </div>
	                           	<div id="divSender" runat="server" class="col-md-7 form-group" style="padding:19px 0px 0px 0px;border: 1px solid #ccc;" visible="false">
									<div class="col-md-6 form-group">
										<p><strong>Sender Id :</strong>&emsp;&emsp;<span style="color: red;"><asp:Label ID="lblsenderId" runat="server"></asp:Label></span></p>
										
									</div>
									<div class="col-md-6 form-group">
										<p><strong>Sender Name :</strong>&emsp;&emsp;<span style="color:red;white-space:pre;"><asp:Label ID="lblsendername" runat="server"></asp:Label></span></p>
									</div>
									<div class="col-md-6 form-group">
										<p><strong>KYC Status :</strong>&emsp;&emsp;<span style="color:red;white-space:pre;"><asp:Label ID="lblKYCStatus" runat="server"></asp:Label></span></p>
									</div>
									<div class="col-md-6 form-group">
										<p><strong>Sender Limit :</strong>&emsp;&emsp;<span style="color: red;"><asp:Label ID="lblsenderLimit" runat="server"></asp:Label></span></p>
									</div>
									
									<div class="col-md-12 form-group">
										<div class="col-md-4 form-group">
		                            		<a id="addbene" runat="server">(+)New Beneficiary</a>
		                            	</div>
		                            	<div class="col-md-4 form-group">
											<a onclick="#" id="verifyAccount" href="#"><i class="fa fa-check-square-o" aria-hidden="true"></i>Account
												Verification</a>
										</div>
		                            	<!-- <div class="col-md-4 form-group">
		                            		<a  href="regSenderpage.action" id="refund">Refund Transaction</a>
		                            	</div> -->
		                            </div>
								</div>
	                            
	                            
	                            
	                            </div>
               
               
            		</div>
    <div class="row" style="margin-top: 1%;">
                    
                    <div class="col-md-12">
                        
						<div class="table-responsive">
							<div class="col-md-4 form-group">
							
                            <h3 class="box-title" style="font-size:20px;">BENEFICIARY INFO </h3>
							</div>
							<div class="col-md-8 form-group">
								<!-- <a  href="regSenderpage.action" style="float: right;padding-right:20px;" class="">(+)New Sender Registration</a> -->
									<a id="MainContent_lkKYCLink" class="Kyc divlbl" href="#" style="float: right; padding-right:20px;  text-decoration: underline;"> <span style="color: red;">Click Here To Update Sender KYC</span></a>
							</div>

                           
                               <asp:GridView ID="gvBeni" runat="server" AutoGenerateColumns="false"  Width="100%"  CellPadding="4" ForeColor="#333333" GridLines="None" RowStyle-Height="20px" Visible="false" OnRowCommand="gvBeni_RowCommand" OnRowDataBound="gvBeni_RowDataBound" >
                                <AlternatingRowStyle BackColor="White" />
                                <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                                <EditRowStyle BackColor="#7C6F57" />
                                <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
                                <RowStyle BackColor="#E3EAEB" />
                                <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
                                <Columns>
                                    <asp:TemplateField HeaderText="S.No." ItemStyle-HorizontalAlign="Center" >
                                        <ItemTemplate >
                                            <%#Container.DisplayIndex+1%>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                     <asp:TemplateField HeaderText="Name" ItemStyle-HorizontalAlign="Center">
                                        <ItemTemplate>
                                            <asp:Label ID="lblBLName" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.beneficiary_name") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Account" ItemStyle-HorizontalAlign="Center">
                                        <ItemTemplate>
                                            <asp:Label ID="lblBLAccount" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.beneficiary_account_no") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Bank Name" ItemStyle-HorizontalAlign="Center">
                                        <ItemTemplate>
                                            <asp:Label ID="lblBLBankName" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.beneficiary_bank_name") %>'></asp:Label>
                                            <asp:HiddenField ID="hdfBLIfsc" runat="server" Value='<%# DataBinder.Eval(Container, "DataItem.beneficiary_ifsc_code") %>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <%--<asp:TemplateField HeaderText="Mobile" ItemStyle-HorizontalAlign="Center">
                                        <ItemTemplate>
                                            <asp:HiddenField ID="hdfBLIfsc" runat="server" Value='<%# DataBinder.Eval(Container, "DataItem.beneficiary_ifsc_code") %>' />
                                            <asp:Label ID="lblBLMobile" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.beneficiary_bank_code") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>--%>
                                     <asp:TemplateField HeaderText="Status" ItemStyle-HorizontalAlign="Center">
                                        <ItemTemplate>
                                            <asp:HiddenField ID="hdfVStatus" runat="server" Value='<%# DataBinder.Eval(Container, "DataItem.is_verified") %>' />
                                            <asp:LinkButton ID="lnkbtnStatus" runat="server"  CommandName="Resend" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.beneficiary_id") %>'></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="IMPS" ItemStyle-HorizontalAlign="Center">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lnkbtnImps" runat="server" Text="Pay Now" CommandName="PAY_IMPS" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.beneficiary_id") %>'></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="NEFT" ItemStyle-HorizontalAlign="Center">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lnkbtnNEFT" runat="server" Text="Pay Now" CommandName="PAY_NEFT" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.beneficiary_id") %>'></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>  
                                     <asp:TemplateField HeaderText="Action" ItemStyle-HorizontalAlign="Center">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lnkbtndelete" runat="server" Text="Delete" CommandName="Remove" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.beneficiary_id") %>'></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>                                                                       
                                </Columns>
                            </asp:GridView>
                                
                                
                         </div>      

                    </div>
                </div>
                
                
               
               
                
                
                
                
            </div>
                      
    <!-- Add Beneficiary -->
   

    <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" PopupControlID="myModal" TargetControlID="addbene" BackgroundCssClass="Background" CancelControlID="btnAddBeneReset" >
</cc1:ModalPopupExtender> 
    <div id="myModal" runat="server" style = "display:none;" >

  <!-- Modal content -->
  <div class="modal-content">
    <span class="close">&times;</span>
      <div align="center">
						<div class="cta-inner">
							<div class="cta-txt">
                               

                                <div class="row" align="center">
                                    <div class="table-responsive">
                            
												<div class="col-md-12 form-group" align="left">
		                                           <h3 class="box-title">Add Beneficiary</h3>
		                                       </div>
		                                       
		                                       <div class="col-md-6 form-group">
                                                   <asp:TextBox ID="txtSenderId" class="form-control" runat="server" ReadOnly="true"></asp:TextBox><span class="highlight"></span> <span class="bar"></span>
		                                       </div>
                                         <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
		                                      <div class="col-md-6 form-group">
													<asp:DropDownList ID="ddlBank" CssClass="form-control" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlBank_SelectedIndexChanged">

													</asp:DropDownList>
													
                                                  <span class="highlight"></span> <span class="bar"></span>
                                                  <asp:RequiredFieldValidator ID="rfvddlBank" runat="server" ControlToValidate="ddlBank" ErrorMessage="Required" ForeColor="Red" InitialValue="0" ValidationGroup="Bene"></asp:RequiredFieldValidator>
		                                           
		                                        </div>
                   
		                                       <div class="col-md-6 form-group">
                                                   <asp:TextBox ID="txtBankAccount" runat="server" class="form-control" placeholder="Bank Account" TextMode="Password" onkeypress="return validateNumber(event)" ></asp:TextBox>
		                                       		<span class="highlight"></span> <span class="bar"></span>
		                                           <asp:RequiredFieldValidator ID="rfvtxtBankAccount" runat="server" ControlToValidate="txtBankAccount" ErrorMessage="Required" ForeColor="Red"  ValidationGroup="Bene"></asp:RequiredFieldValidator>
		                                       </div>
		                                       
		                                       <div class="col-md-6 form-group">
                                                   <asp:TextBox ID="txtCBankAccount" runat="server" placeholder="Confirm Bank Account" class="form-control" onkeypress="return validateNumber(event)" ></asp:TextBox><span class="highlight"></span> <span class="bar"></span>
                                                   <asp:RequiredFieldValidator ID="rfvtxtCBankAccount" runat="server" ControlToValidate="txtCBankAccount" ErrorMessage="Required" ForeColor="Red"  ValidationGroup="Bene"></asp:RequiredFieldValidator>
		                                           
		                                       </div>
		                                       <div class="col-md-6 form-group">
                                                   <asp:TextBox ID="txtBeneName" runat="server" class="form-control" placeholder="Bene Name" ></asp:TextBox><span class="highlight"></span> <span class="bar"></span>
                                                   <asp:RequiredFieldValidator ID="rfvtxtBeneName" runat="server" ControlToValidate="txtBeneName" ErrorMessage="Required" ForeColor="Red"  ValidationGroup="Bene"></asp:RequiredFieldValidator>
		                                           
		                                       </div>
		                                       <div class="col-md-6 form-group">
                                                   <asp:TextBox ID="txtBeneMobile" runat="server" class="form-control" placeholder="Beneficiary Mobile" onkeypress="return validateNumber(event)" ></asp:TextBox><span class="highlight"></span> <span class="bar"></span>
                                                   <asp:RequiredFieldValidator ID="rfvtxtBeneMobile" runat="server" ControlToValidate="txtBeneMobile" ErrorMessage="Required" ForeColor="Red"  ValidationGroup="Bene"></asp:RequiredFieldValidator>
		                                           
		                                       </div>
		                                       <div class="col-md-6 form-group">
                                                   <asp:TextBox ID="txtIFSC" runat="server" class="form-control" placeholder="Enter IFSC (Optional)"></asp:TextBox><span class="highlight"></span> <span class="bar"></span>
		                                           
		                                       </div>

                                         <div class="col-md-6">
		                                           <asp:CheckBox ID="chkboxverify" runat="server" Text="Do you want to verify beneficiary account before Add Beneficiary." />
		                                       </div>
                     </ContentTemplate>
                </asp:UpdatePanel>
		                                       <div class="col-md-12 form-group" align="left">
                                                   <asp:Button id="btnAddBeneReset" runat="server" class="btn btn-inverse waves-effect waves-light" Text="Close" /> 
                                                   <asp:Button ID="btnAddBeneSubmit" runat="server" class="btn btn-success waves-effect waves-light m-r-10" Text="Submit" OnClick="btnAddBeneSubmit_Click" ValidationGroup="Bene" />
			                                       
		                                       </div>
		                                 
		                                   
		                           </div>                                    
                                                                
                                </div>
                     
                        </div>
					</div>
				</div>
  </div>

</div>
    
    <asp:Button ID="BtnTarget" runat="server" Text="Target" Style="display: none" />
<cc1:ModalPopupExtender ID="mp1" runat="server" PopupControlID="Panl1" TargetControlID="BtnTarget" BackgroundCssClass="Background" CancelControlID="btnOTPClose" >
</cc1:ModalPopupExtender>
<asp:Panel ID="Panl1" runat="server" CssClass="modal-content" style = "display:none;padding-top: 10px!important">

  
      <div align="center">
						<div class="cta-inner">
							<div class="cta-txt">
                                <div class="row" align="center">
                                    <div class="table-responsive">
                            
												<div class="col-md-12 form-group" align="left">
		                                           <h3 class="box-title"><asp:Label ID="lblHeader" runat="server" ></asp:Label></h3>
		                                       </div>
		                                       
		                                       <div class="col-md-12 form-group">
                                                   <asp:TextBox ID="txtOTP" class="form-control" runat="server" ></asp:TextBox><span class="highlight"></span> <span class="bar"></span>
		                                       </div>
		                                       <div class="col-md-12 form-group" align="left">
                                                   <asp:Button id="btnOTPClose" runat="server" class="btn btn-inverse waves-effect waves-light" Text="Close" /> 
                                                   <asp:Button ID="btnAddConfirm" runat="server" class="btn btn-success waves-effect waves-light m-r-10" Text="Submit" OnClick="btnAddConfirm_Click" Visible="false" />
                                                   <asp:Button ID="btnDeleteConfirm" runat="server" class="btn btn-success waves-effect waves-light m-r-10" Text="Submit" OnClick="btnDeleteConfirm_Click" Visible="false" />
			                                       
		                                       </div>
		                                 
		                                   
		                           </div>                                    
                                                                
                                </div>
                        </div>
					</div>
				</div>
    
</asp:Panel>

     <asp:Button ID="btnTxnTarget" runat="server" Text="Target" Style="display: none" />
 <cc1:ModalPopupExtender ID="mp_Txn" runat="server" PopupControlID="myTxn" TargetControlID="btnTxnTarget" BackgroundCssClass="Background" CancelControlID="btnTxnClose" >
</cc1:ModalPopupExtender> 
    <div id="myTxn" runat="server" style = "display:none;" >

  <!-- Modal content -->
  <div class="modal-content">
    <span class="close">&times;</span>
      <div align="center">
						<div class="cta-inner">
							<div class="cta-txt">
                               

                                <div class="row" align="center">
                                    <div class="table-responsive">
                            
												<div class="col-md-12 form-group" align="left">
		                                           <h3 class="box-title">Initiate Payment</h3>
		                                       </div>
		                                       
                                              <div class="col-md-6 form-group">
                                                   Bank Account No :<span class="highlight"></span> <span class="bar"></span>    
		                                       </div>
		                                       <div class="col-md-6 form-group">
                                                   <asp:Label ID="lblTxnAccountNo" class="form-control" runat="server"></asp:Label>
                                                   
		                                       </div>
                                        <div class="col-md-6 form-group">
                                                   Bank Name :<span class="highlight"></span> <span class="bar"></span>    
		                                       </div>
		                                       <div class="col-md-6 form-group">
                                                   <asp:Label ID="lblTxnBankName" class="form-control" runat="server"></asp:Label>
                                                   
		                                       </div>
                                        <div class="col-md-6 form-group">
                                                   Beneficiary Name :<span class="highlight"></span> <span class="bar"></span>    
		                                       </div>
		                                       <div class="col-md-6 form-group">
                                                   <%--<asp:Label ID="lblTxnBeneName" class="form-control" runat="server"></asp:Label>--%>
                                                   <asp:TextBox ID="lblTxnBeneName" class="form-control" runat="server"></asp:TextBox>
                                                   
		                                       </div>
                                        <div class="col-md-6 form-group">
                                                   Mobile No :<span class="highlight"></span> <span class="bar"></span>    
		                                       </div>
		                                       <div class="col-md-6 form-group">
                                                   <%--<asp:Label ID="lblTxnBeneMobile" class="form-control" runat="server"></asp:Label>--%>
                                                   <asp:TextBox ID="lblTxnBeneMobile" class="form-control" runat="server"></asp:TextBox>
                                                   <asp:RequiredFieldValidator ID="rfvMobile" runat="server" ControlToValidate="lblTxnBeneMobile" ErrorMessage="Required?" Display="Dynamic" ForeColor="Red" ValidationGroup="Txn" ></asp:RequiredFieldValidator>
                                                   <asp:RegularExpressionValidator ID="revMobie" runat="server" ControlToValidate="lblTxnBeneMobile" ErrorMessage="Required?" Display="Dynamic" ForeColor="Red" ValidationGroup="Txn" ValidationExpression="[0-9]{10}"></asp:RegularExpressionValidator>
                                                   <asp:HiddenField ID="hdfPayMode" runat="server" />
                                                   <asp:HiddenField ID="hdfIFSC" runat="server" />
		                                       </div>
                                        <div class="col-md-6 form-group">
                                                   <asp:TextBox ID="txtTxnReqAmount" runat="server" placeholder="Enter Transfer Amount" MaxLength="5" CssClass="form-control" onkeypress="return validateNumber(event)" ></asp:TextBox><span class="highlight"></span> <span class="bar"></span>    
		                                       </div>
		                                       <div class="col-md-6 form-group">
                                                  <asp:TextBox ID="txtTxnRemark" runat="server" placeholder="Enter Transaction Remark"  CssClass="form-control"></asp:TextBox><span class="highlight"></span> <span class="bar"></span>
                                                   
		                                       </div>
		                                       <div class="col-md-12 form-group" align="left">
                                                   <asp:Button id="btnTxnClose" runat="server" class="btn btn-inverse waves-effect waves-light" Text="Close" /> 
                                                   <asp:Button ID="btnTxnSubmit" runat="server" class="btn btn-success waves-effect waves-light m-r-10" Text="Submit" OnClick="btnTxnSubmit_Click" ValidationGroup="Txn"/>
			                                       
		                                       </div>
		                                 
		                                   
		                           </div>                                    
                                                                
                                </div>
                     
                        </div>
					</div>
				</div>
  </div>

</div>



  <script type="text/javascript">

      function openModal() {
          $('#myModal').modal({ show: true });
      }
 </script>


    <script type="text/javascript">
        // Get the modal
        var modal = document.getElementById('myModal');

        // Get the button that opens the modal
        var btn = document.getElementById("addbene");

        // Get the <span> element that closes the modal
        var span = document.getElementsByClassName("close")[0];

        // When the user clicks the button, open the modal 
        btn.onclick = function () {
            modal.style.display = "block";
        }

        // When the user clicks on <span> (x), close the modal
        span.onclick = function () {
            modal.style.display = "none";
        }

        // When the user clicks anywhere outside of the modal, close it
        window.onclick = function (event) {
            if (event.target == modal) {
                modal.style.display = "none";
            }
        }
</script>
</asp:Content>

