<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage/AdminMasterPage.master"
    AutoEventWireup="true" CodeFile="RefundTxns.aspx.cs" Inherits="Admin_RefundTxns" %>

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

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

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

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

    <script type="text/javascript" language="javascript">
        function showDiv() {
            document.getElementById("view").style.display = 'block';
            document.getElementById("fill").style.display = 'block';
        }
    </script>

    <script type="text/javascript">
        // code for risk dropdown 
        function toggleSubmit(obj) {

            count = 0
            while (document.getElementById("d" + count)) {
                document.getElementById("d" + count).style.display = "none"
                count++
            }
            document.getElementById("d" + obj.selectedIndex).style.display = "block"

        }
        function toggleSubmit1(obj) {

            count = 0
            while (document.getElementById("c" + count)) {
                document.getElementById("c" + count).style.display = "none"
                count++
            }
            document.getElementById("c" + obj.selectedIndex).style.display = "block"

        }
        function toggleSubmit2(obj) {

            count = 0
            while (document.getElementById("b" + count)) {
                document.getElementById("b" + count).style.display = "none"
                count++
            }
            document.getElementById("b" + obj.selectedIndex).style.display = "block"

        }
    </script>

    <style type="text/css">
        .HeaderFreeze
        {
            height: 40px;
            top: 80px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="contentmain">
        <div id="content">
            <div id="detailform">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                    <tr>
                        <td>
                            <div id="view" style="display: block;">
                                <table cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td width="27%">
                                        </td>
                                        <td width="13%">
                                            Transaction ID
                                        </td>
                                        <td width="1%">
                                            <strong>:</strong>
                                        </td>
                                        <td width="39%">
                                            <asp:TextBox ID="txtTxnId" runat="server" onkeypress="return digitonly(this,event)"
                                                MaxLength="20"></asp:TextBox>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="lblabc" runat="server" Text="Pls fill either transaction id or mobile no"></asp:Label></td>
                                        <td width="20%">
                                            &nbsp;
                                        </td>
                                    </tr>
                                    <tr >
                                        <td width="27%">
                                        </td>
                                        <td width="13%">
                                            Mobile No.
                                        </td>
                                        <td width="1%">
                                            <strong>:</strong>
                                        </td>
                                        <td width="39%">
                                            <asp:TextBox ID="txtMobNo" runat="server" onkeypress="return digitonly(this,event)"
                                                MaxLength="10"></asp:TextBox>
                                        </td>
                                        <td>
                                            &nbsp;
                                        </td>
                                    </tr>
                                    <tr >
                                        <td width="27%">
                                        </td>
                                        <td width="13%">
                                        </td>
                                        <td width="1%">
                                            <strong></strong>
                                        </td>
                                        <td width="39%" style="padding: 10px 0 0px 20px;">
                                            <asp:Button ID="btnGetTxn" runat="server" Text="Submit" CssClass="button active"
                                                OnClick="btnGetTxn_Click" />
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="7">
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td colspan="10">
                            <div id="fill" style="display: ">
                                <table cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td style="text-align: right; padding: 5px 15px;">
                                            <asp:Button ID="btnSuccess" runat="server" Text="Sucess" 
                                                CssClass="button active" onclick="btnSuccess_Click" Visible="false"/>
                                            &nbsp;&nbsp;&nbsp;<asp:Button ID="btnRefund" runat="server" Text="Refund" 
                                                CssClass="button active" onclick="btnRefund_Click" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BorderColor="#CCCCCC"
                                                BackColor="White" Font-Bold="False" Font-Italic="False" Font-Overline="False" DataKeyNames="SERVICE_NAME,TRANSACTIONID,Amount,LOWERLEVEL,WLID"
                                                Font-Strikeout="False" Font-Underline="False" Width="1330px" BorderStyle="None"
                                                BorderWidth="1px" CellPadding="3" ShowHeader="true" CssClass="HeaderFreeze" ShowFooter="true">
                                                <PagerSettings Mode="NextPreviousFirstLast" NextPageText="Next" PreviousPageText="Previous" />
                                                <RowStyle HorizontalAlign="Center" ForeColor="#000066" />
                                                <Columns>
                                                    <asp:TemplateField HeaderText="S.NO">
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="chk1" runat="server" />
                                                            <%#Container.DisplayIndex+1%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField HeaderText="Request Date &amp; Time" DataField="TRANSACTION_DATETIME" />
                                                    <asp:BoundField HeaderText="User ID" DataField="USERNAME" />
                                                    <asp:BoundField HeaderText="Service" DataField="SERVICE_NAME" />
                                                    <asp:BoundField HeaderText="Operator" DataField="OperatorName" />
                                                    <asp:BoundField HeaderText="Mob/Conn. No." DataField="ConnectionNo" />
                                                    <asp:TemplateField HeaderText="Txn. Id">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lbltxnid" runat="server" Text='<%# Eval("TRANSACTIONID") %>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField HeaderText="Amount" DataField="Amount" />
                                                    <asp:BoundField HeaderText="Status" DataField="status" />
                                                    <%--<asp:BoundField HeaderText="Vendor" DataField="ServiceVendor" />--%>
                                                    <asp:BoundField HeaderText="Portal" DataField="PortalName" />
                                                    <asp:TemplateField Visible="false">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblloginid" runat="server" Text='<%# Eval("LOWERLEVEL") %>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField Visible="false">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblRequestamt" runat="server" Text='<%# Eval("REQUEST_AMOUNT") %>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <EmptyDataTemplate>
                                                      <div style="color:red;">No records found.</div>
                                                 </EmptyDataTemplate>
                                                <FooterStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" VerticalAlign="Middle" />
                                                <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                                <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
                                                <HeaderStyle BackColor="#DBE4E8" Font-Bold="True" ForeColor="Black" HorizontalAlign="Left" />
                                                <EditRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                                <AlternatingRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:GridView>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</asp:Content>
