<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Masters/AgentMaster.Master"
    CodeBehind="MyCommission.aspx.cs" Inherits="CasheeremitAgent.EWallet.MyCommission" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cpHead" runat="server">
    <script type="text/javascript" src="../Scripts/js/bootstrap-datepicker.js"></script>
    <link href="../Styles/css/datepicker.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/css/datepicker3.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .ui-datepicker-month
        {
            color: #FF4500;
        }
        
        .ui-datepicker-year
        {
            color: #FF4500;
        }
    </style>
    <script type="text/javascript">

        function DatePicker() {

            $('#<%= txtfrmDte.ClientID %>').datepicker({
                inline: true,
                dateFormat: 'dd/mm/yy',
                showOn: "button",
                buttonImage: "../Styles/images/date.jpg",
                buttonImageOnly: true,
                changeMonth: true,
                changeYear: true,
                yearRange: '-100y:c+nn',
                maxDate: '-1d'
            });
        }

        function DatePicker1() {

            $('#<%= txtToDate.ClientID %>').datepicker({
                inline: true,
                dateFormat: 'dd/mm/yy',
                showOn: "button",
                buttonImage: "../Styles/images/date.jpg",
                buttonImageOnly: true,
                changeMonth: true,
                changeYear: true,
                yearRange: '-100y:c+nn',
                maxDate: '0d'
            });
        }
    
    </script>
    <script type="text/javascript">
        function swaRedirect(val, typ) {
            swal({
                title: "",
                text: val,
                type: typ,
                showConfirmButton: true,
                confirmButtonColor: "#DD6B55",
                confirmButtonText: "OK",
                closeOnConfirm: false
            }, function (isConfirm) {
                if (isConfirm) {
                    window.location.href = '<%=redurl %>';
                }
                else {
                }
            });
        }
        window.document.title = "My Commissions";
        
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpLyremit" runat="server">
    <asp:ScriptManager ID="smgr" runat="server">
    </asp:ScriptManager>
    <div class="col-md-12">
        <script type="text/javascript">
           
        </script>
        <div class="box-typ4 rec-his-box working" style="padding-right: 0px;">
            <div class=" col-md-12 margT20" style="border: 0px solid red;">
                <div class="bluHD col-md-12">
                    My Commission</div>
                <div class="col-md-12 vinobox">
                    <div class="dasBox2 col-md-3">
                        <span class=" inerBox2"><span class="clearfix smlTxt">
                            <asp:Literal ID="Literal2" runat="server">Accumulated Total Commission Amount</asp:Literal>
                        </span><span class="val_agnt"><span class="poundval">&pound;</span>
                            <asp:Label ID="lblCmsnAmt" runat="server"></asp:Label></span></span>
                    </div>
                    <div class="dasBox2 col-md-3">
                        <span class=" inerBox2"><span class="clearfix smlTxt">
                            <asp:Literal ID="ltEligblAmt" runat="server">Commission Amount Eligible For Transfer</asp:Literal>
                        </span><span class="val_agnt"><span class="poundval">&pound;</span>
                            <asp:Label ID="lblEligblAmt" runat="server"></asp:Label></span></span>
                    </div>
                    <div class="dasBox2 col-md-3">
                        <span class=" inerBox2"><span class="clearfix smlTxt">
                            <asp:Literal ID="Literal1" runat="server">Settlement Pending Amount</asp:Literal>
                        </span>
                            <div class="clrBoth">
                                &nbsp;</div>
                            <span class="val_agnt"><span class="poundval">&pound;</span>
                                <asp:Label ID="lblSetPndgAmt" runat="server"></asp:Label></span></span>
                    </div>
                    <%--<div class=" boxColr1">
                        <span class="BigTxt"><span class="clearfix smlTxt">
                            <asp:Literal ID="Literal3" runat="server">Total Amount</asp:Literal>
                        </span>
                            <asp:Label ID="lblTotalAmt" runat="server"></asp:Label></span>
                    </div>--%>
                    <div id="divMywallet" runat="server">
                        <div id="dvTransfer" runat="server" class="align-R mrg10-T  mrg10-B ">
                            <span class="clrmob2">
                                <asp:Button ID="btnWalletTransfer" runat="server" Style="margin-left: 20%; width: 25%;"
                                    CssClass="btnB" Visible="false" Text="Transfer Commission to wallet" OnClick="btnWalletWithdrawClick" />
                        </div>
                        <div class="clearfix">
                        </div>
                    </div>
                    <div class="clearfix">
                    </div>
                    <div id="dvWithdrCnfrm" runat="server" visible="false">
                        <div class="span6 mrg10-L" style="margin-left: 25px;">
                            Are you sure you want to transfer your Commission amount to your Wallet?
                        </div>
                        <div class="span5">
                        </div>
                        <div class="clearfix">
                            &nbsp;
                        </div>
                        <div class="align-R mrg10-T col-md-12" style="margin-left: 15%;">
                            <asp:Button ID="btnYes" Text="Yes" runat="server" CssClass="orngBtn2" OnClick="btnYesClick" />
                            <asp:Button ID="btnNo" CausesValidation="false" Text="No" Style="margin-right: 70%;"
                                runat="server" CssClass="graybtn" OnClick="btnNoClick" />
                        </div>
                    </div>
                    <div class="clearfix">
                        &nbsp;
                    </div>
                    <div class="clearfix">
                        &nbsp;
                    </div>
                    <div class="clearfix margT10">
                        &nbsp;</div>
                    <%-- <div class="blueHeadTxt">
                      Below are list of transactions for which commissions accumulated.You can filter by providing dates in search criteria</div>--%>
                    <div class="col-md-6 ">
                        <div class="row mrgBot10">
                            <div class="col-md-3">
                                <asp:Label ID="lblfromdate" runat="server" Text="From Date"></asp:Label>
                                <%--<span class="text-danger f-s-10 starRed">&lowast;</span>--%>
                            </div>
                            <div class=" col-md-7">
                                <%--<input id="txtfrmDte" runat="server" data-provide="datepicker" type="text" class="txtboxM" />--%>
                                <input id="txtfrmDte" style="width: 92%;" runat="server" data-provide="datepicker"
                                    type="text" class="txtboxM" readonly="readonly" />
                                <asp:RegularExpressionValidator ID="reexpdate" runat="server" ValidationGroup="search"
                                    ForeColor="Red" ControlToValidate="txtfrmDte" Display="Dynamic" class="errMsg starRed"
                                    ErrorMessage="Enter Valid From date" ValidationExpression="^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$"></asp:RegularExpressionValidator>
                            </div>
                        </div>
                        <div class="row mrgBot10">
                            <div class="col-md-3">
                                <asp:Label ID="lbltodate" runat="server" Text="To Date"></asp:Label>
                            </div>
                            <div class=" col-md-7">
                                <%--<input id="txtToDate" runat="server" data-provide="datepicker" type="text" class="txtboxM" />--%>
                                <input id="txtToDate" data-provide="datepicker" style="width: 92%;" runat="server"
                                    type="text" class="txtboxM" readonly="readonly" />
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ValidationGroup="search"
                                    ForeColor="Red" ControlToValidate="txtToDate" Display="Dynamic" class="errMsg starRed"
                                    ErrorMessage="Enter Valid To date" ValidationExpression="^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$"></asp:RegularExpressionValidator>
                            </div>
                        </div>
                    </div>
                    <div class="clearfix margT10">
                        &nbsp;</div>
                    <div class="col-md-12">
                        <div class="col-md-2">
                            <asp:Button ID="btnSearch" runat="server" Text="Search" class="btnB" OnClick="btnSearch_click" OnClientClick="DisplayProgress();"
                                ValidationGroup="search" /></div>
                        <div class="col-md-3">
                            <asp:Button ID="btnclear" runat="server" Text="Clear" class="btnG" OnClick="btnClear_click" /></div>
                    </div>
                </div>
            </div>
        </div>
        <div class="clearfix margT10">
            &nbsp;</div>
        <div style="padding: 10px;" class="table-responsive overflowMob">
            <asp:GridView ID="gvTransList" runat="server" CssClass="table table-striped table-bordered tablefieldWidth bgrow"
                AutoGenerateColumns="False" DataKeyNames="LA_Tran_ID,Tran_ID,Agent_ID,Before_Bal,Current_Bal,Tran_Amt,Currency,Tran_Type,Tran_Date,Tran_Purpose,   
                   Comments,Tran_Status,Curr_Comm_Amt" OnRowCommand="gvTransList_RowCommand"
                AlternatingRowStyle-BackColor="#ffffff" OnPageIndexChanging="gvTransList_PageIndexChanging"
                OnRowDataBound="gvTransList_RowDataBound" AllowPaging="True" EmptyDataText="No Transactions Found"
                CellPadding="6" CellSpacing="2" GridLines="None">
                <RowStyle CssClass="faq_text_tb2" />
                <Columns>
                    <asp:BoundField DataField="Tran_Date" HeaderText="Date" HeaderStyle-CssClass="wp25" />
                    <asp:BoundField DataField="Tran_ID" HeaderText="Transaction ID" HeaderStyle-CssClass="wp25" />
                    <%-- <asp:BoundField DataField="Currency" HeaderText="Currency" HeaderStyle-CssClass="wp25" />--%>
                    <asp:BoundField DataField="Tran_Amt" HeaderText="Amount in £" HeaderStyle-CssClass="wp25" />
                    <asp:BoundField DataField="Curr_Comm_Amt" HeaderText="Commission in £" HeaderStyle-CssClass="wp25" />
                    <asp:BoundField DataField="Tran_Status" HeaderText="Status" HeaderStyle-CssClass="wp25" />
                    <asp:BoundField DataField="Tran_Status_desc" HeaderText="Settlement Status" HeaderStyle-CssClass="wp25" />
                    <%-- <asp:ButtonField ButtonType="Link" Text="Print" HeaderText="Print Details" CommandName="details" />--%>
                </Columns>
                <PagerStyle BackColor="White" ForeColor="White" Width="200px" HorizontalAlign="Center"
                    CssClass="pgg" />
            </asp:GridView>
        </div>
    </div>
</asp:Content>
