<%@ Page Language="C#" MasterPageFile="~/masterpage/MasterPage.master" AutoEventWireup="true"
    CodeFile="PushTransfes.aspx.cs" Inherits="PushTransfes" Title="eGen Service" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script src="../javascript/scriptvalidation.js" type="text/javascript"></script>
        <script type="text/javascript" language="javascript">

            function showtr(selectedItemValue)
           {
               if (selectedItemValue == 'Select Agent Id')
               {
                   document.getElementById("divAgentdetail").style.display = 'none';
               }
               else 
               {
                   document.getElementById("divAgentdetail").style.display = 'block';
               }
           }
           function askToConfirm() {
               if (confirm('Are you sure You want to move on,Please Check the Partner Id Again')) {
                   //alert('Hahaha!! I just joking');
                   return true;
               }
               else {

                   alert('Its Better to check the ID  Again');
                   return false;
               }
           }
            
//            function confirmHappy()
//            {
//                var hh=confirm("Are You Sure want to Continue");
//                if (hh==true)
//                {
//                alert("Rs. 2000.00 has been Successfully transferred to <Agent ID>");
//                }
//                else
//                {
//                alert("You have cancelled the transaction");
//                }
//            }
</script>

<script type="text/javascript" language="javascript">
    function DisableRightClick(event) {

        //For mouse right click

        if (event.button == 2) {

            alert("Right Clicking not allowed!");

        }

    }

    function DisableCtrlKey(e) {

        var code = (document.all) ? event.keyCode : e.which;

        var message = "Ctrl key functionality is disabled!";

        // look for CTRL key press

        if (parseInt(code) == 17) {

            //alert(message);

            window.event.returnValue = false;

        }

    }

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <form>
    <div id="middle">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
            <tr>
                <td colspan="4" class="hdr">
                    <a href="FundTransper.aspx">MDS Fund Request</a><span style="padding-right: 30px;">&nbsp;</span>
                    <span style="padding-left: 50px;">&nbsp;</span><a href="PushTransfes.aspx" class="active">Push
                        Transfer</a>
                </td>
            </tr>
            <tr>
                <td style="height: 30px; text-align:center" colspan="4"><asp:Label ID="lblerror" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td width="12%">
                </td>
                <td width="33%">
                    Select Account ID
                </td>
                <td width="3%">
                    <strong>:</strong>
                </td>
                <td width="52%">
                    <asp:DropDownList ID="ddl_AgentID" runat="server" Style="width: 185px;" AutoPostBack="true"  
                        onselectedindexchanged="ddl_AgentID_SelectedIndexChanged1">
                    </asp:DropDownList>
                    
                    <asp:RequiredFieldValidator ID="rfv_AgentId" runat="server" ErrorMessage="Please Select Agent Id" ControlToValidate="ddl_AgentID"
                     InitialValue="Select Agent Id" Display="None"></asp:RequiredFieldValidator>
                     
                    <cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" TargetControlID="rfv_AgentId">
                    </cc1:ValidatorCalloutExtender>
                
                </td>
            </tr>
            <tr>
                <td colspan="4" width="100%">
                    
                    <div ID="divAgentdetail" runat="server" visible="false">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                            <tr>
                                <td width="11%">
                                </td>
                                <td width="33%">
                                    Distributor Name
                                </td>
                                <td width="4%">
                                    <strong>:</strong>
                                </td>
                                <td width="52%">
                                    <asp:Label ID="lbl_AgentName" runat="server"></asp:Label>
                                    <asp:Label ID="lbl_AgentLastName" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td>
                                    Available Balance
                                </td>
                                <td>
                                    <strong>:</strong>
                                </td>
                                <td>
                                    <asp:Label ID="lbl_AgentAvailabelBalance" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td></td>
                                <td>Select Type </td>
                                <td><strong>:</strong></td>
                                <td><asp:DropDownList ID="ddl_Actiononamount" runat="server" >
                                    <asp:ListItem>Select</asp:ListItem> 
                                    <asp:ListItem>Credit</asp:ListItem>                                   
                                    <asp:ListItem>Roll Back</asp:ListItem>                                    
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td>
                                    Bank Name
                                </td>
                                <td>
                                    <strong>:</strong>
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_BankName" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfv_BankName" runat="server" ErrorMessage="Please Enter Bank Name" ControlToValidate="txt_BankName" 
                                         Display="None"></asp:RequiredFieldValidator>
                                    <cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" TargetControlID="rfv_BankName">
                                    </cc1:ValidatorCalloutExtender>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td>
                                    Amount
                                </td>
                                <td>
                                    <strong>:</strong>
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_Amount" runat="server" onkeypress="return digitonly(this,event)" MaxLength="5" oncopy="return false"  onpaste="return false" oncut="return false" onmousedown="DisableRightClick(event)" onkeydown="return DisableCtrlKey(event)" autocomplete="off"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfv_Amount" runat="server" ErrorMessage="Please Enter Amount" ControlToValidate="txt_Amount" 
                                         Display="None"></asp:RequiredFieldValidator>
                                    <cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" TargetControlID="rfv_Amount">
                                    </cc1:ValidatorCalloutExtender>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td>
                                    Remark
                                </td>
                                <td>
                                    <strong>:</strong>
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_Remark" runat="server" TextMode="MultiLine"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfv_Remark" runat="server" ErrorMessage="Please Enter Remark" ControlToValidate="txt_Remark" 
                                         Display="None"></asp:RequiredFieldValidator>
                                    <cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" TargetControlID="rfv_Remark">
                                    </cc1:ValidatorCalloutExtender>
                                </td>
                            </tr>
                        </table>
                    </div>
                   
                    <tr>
                        <td colspan="3">
                        </td>
                        <td style="padding: 0 0 0 80px;">
                            <asp:Button ID="btnSubmit" runat="server" Text="Submit"  OnClientClick="return askToConfirm()"
                                style="margin: 15px 0 0 0;" onclick="btnSubmit_Click"  />
                            <%--<input name="button" type="button" class="button" style="margin: 15px 0 0 0;" onclick="confirmHappy()"
                                value="Submit" />--%>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4" style="height: 30px"><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
                        </td>
                    </tr>
                </td>   
            </tr>      
        </table>
    </div>
    </form>
    <div id="right" style="background: none">
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td class="cdr">
                    <strong>Push Transfer instruction</strong>
                </td>
            </tr>
            <tr>
                <td style="padding: 10px 0 30px 5px; font-size: 15px">
                    Comming Soon
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
