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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cpHead" runat="server">
    <style type="text/css">
        .WordWrap
        {
            width: 100%;
            word-break: break-all;
        }
        .WordBreak
        {
            width: 100px;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .Hide
        {
            display: none;
        }
        .tbl-typ2
        {
            width: auto !important;
        }
        th
        {
            padding: 5px;
            text-align: center;
        }
    </style>
    <script type="text/javascript">

        window.document.title = "Wallet Transactions";


        function DisplayWaiting(validationgroup) {
            
            if (Validate(validationgroup) == 'success') {
                $find('<%=ModalPopupExtender2.ClientID %>').show();
                setTimeout('document.images["imgLoad"].src = "../Styles/images/loading.gif"', 10);
            }
        }
        function Validate(validationgroupname) {

            if (Page_ClientValidate(validationgroupname)) {
                return 'success';
            }
        }
    </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="clearfix">
            &nbsp;</div>
        <div class="bluHD col-md-12">
            <i class="fa fa-gbp iconsize" aria-hidden="true"></i>
            <asp:Label ID="lblSendTo" runat="server" Text="CasheeRemit WALLET"></asp:Label>
        </div>
        <div class="col-md-12 vinobox">
            <div class="blueHeadTxt">
                CasheeRemit WALLET TRANSACTIONS
            </div>
            <div class="row mrgBot10">
                <div class=" col-md-2">
                    <asp:Label ID="lblTranType" runat="server" Text="Transaction Type"></asp:Label>
                    <span class="starRed">*</span>
                </div>
                <div class=" col-md-5">
                    <asp:DropDownList ID="ddlTranType" CssClass="txtboxM" runat="server">
                        <asp:ListItem Selected="True" Value="0" Text="<-- Select -->"></asp:ListItem>
                        <asp:ListItem Value="EW_TOPUP" Text="CasheeRemit Wallet Topup"></asp:ListItem>
                        <asp:ListItem Value="EW_TO_SENDMONEY" Text="CasheeRemit Wallet To SendMoney"></asp:ListItem>
                        <asp:ListItem Value="MGMT_TRAN" Text="Management Credit or Debit"></asp:ListItem>
                        <asp:ListItem Value="COMM_TRAN" Text="Commission Transferred to Wallet"></asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="reqTranType" runat="server" ErrorMessage="Please select Transaction Type"
                        ControlToValidate="ddlTranType" InitialValue="0" CssClass="errMsg" ValidationGroup="Srch"
                        Display="Dynamic"></asp:RequiredFieldValidator>
                </div>
            </div>
            <div class="col-md-5 mrg10-T">
                <div class=" align-R mrg10-T col-md-12">
                    <asp:Button ID="btnSearch" runat="server" class="btnB fltR" ValidationGroup="Srch" OnClientClick="DisplayWaiting('Srch');"
                        Text="Search" OnClick="btnSearch_click" />
                </div>
            </div>
            <div style="overflow: auto; width: 96%;">
                <div style="padding: 10px; width: 100%;" class=" table-responsive overflowMob">
                    <asp:GridView ID="gvWallet" runat="server" class="tbl-typ2 " AutoGenerateColumns="False"
                        OnRowCommand="gvWallet_RowCommand" PageSize="10" DataKeyNames="LA_Tran_ID,Tran_Date,Before_Bal,Current_Bal,Tran_Amt,Tran_Purpose,Tran_Type,Currency,Tran_Status"
                        OnPageIndexChanging="gvWallet_PageIndexChanging" OnRowDataBound="gvWallet_RowDataBound"
                        AllowPaging="True" EmptyDataText="No Transactions done so far" CellPadding="6"
                        CellSpacing="2" GridLines="None" HeaderStyle-CssClass="tbl-head" RowStyle-CssClass="tbl-data"
                        AlternatingRowStyle-BackColor="#ffffff">
                        <RowStyle HorizontalAlign="Left" />
                        <Columns>
                            <asp:BoundField DataField="LA_Tran_ID" HeaderText="Wallet Transaction ID" HeaderStyle-CssClass="wp25" />
                            <asp:BoundField DataField="Tran_ID" HeaderText="Transaction ID" HeaderStyle-CssClass="wp25" />
                            <asp:BoundField DataField="Tran_Date" HeaderText="Transaction Date" HeaderStyle-CssClass="wp25" />
                            <asp:BoundField DataField="Before_Bal" HeaderText="Before Balance in(£)" HeaderStyle-CssClass="wp25" />
                            <asp:BoundField DataField="Current_Bal" HeaderText="After Balance in(£)" HeaderStyle-CssClass="wp25" />
                            <asp:BoundField DataField="Tran_Amt" HeaderText="Transaction Amount in(£)" DataFormatString="{0:n2}"
                                HeaderStyle-CssClass="wp25" />
                            <asp:BoundField DataField="Tran_Purpose" HeaderText="Purpose" HeaderStyle-CssClass="wp25" />
                            <asp:BoundField DataField="Tran_Type" HeaderText="Transaction Type" HeaderStyle-CssClass="wp25" />
                            <asp:BoundField DataField="Currency" HeaderText="Currency" ItemStyle-CssClass="hide"
                                HeaderStyle-CssClass="hide" />
                            <asp:BoundField DataField="Tran_Status" HeaderText="Status" HeaderStyle-CssClass="wp25" />
                            <%-- <asp:TemplateField ShowHeader="False" ItemStyle-CssClass = "hide" HeaderText="Print Details">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="btnPrint" runat="server" Text="Print" CommandName="details" CausesValidation="false" />
                                    </ItemTemplate>
                                </asp:TemplateField>--%>
                        </Columns>
                        <PagerStyle BackColor="White" ForeColor="White" Width="200px" HorizontalAlign="Center"
                            CssClass="pgg" />
                    </asp:GridView>
                </div>
            </div>
        </div>
         <div id="dvProgressbar">
            <asp:Button runat="server" ID="Button1" Style="display: none" />
            <asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" Style="display: none">
                <div class="modal1">
                    <div class="center1">
                        <!-- Start -->
                        <img id="imgLoad" alt="Please wait....." src="../Styles/images/loading.gif" />
                        <!-- End -->
                        <asp:ModalPopupExtender ID="ModalPopupExtender2" runat="server" TargetControlID="Button1"
                            PopupControlID="Panel1" BackgroundCssClass="modalBackground" DropShadow="false" />
                    </div>
                </div>
            </asp:Panel>
        </div>
    </div>
</asp:Content>
