<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage/AdminMasterPage.master" AutoEventWireup="true" CodeFile="ManageTrainID.aspx.cs" Inherits="Admin_ManageTrainID" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
     
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div id="request">
        <br />
    <center>
        <div style="width:80%; text-align:center;">
        <table width="100%">
            <tr>
                <td align="right" style="width:50%; text-align:right;">Enter Agent ID like(AG10001)</td>
                <td align="right" style="width:2%">:</td>
                <td align="left" style="width:40%"><asp:TextBox ID="txtAgentID" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td align="right" style="width:50%; text-align:right;">Select Service</td>
                <td align="right" style="width:2%">:</td>
                <td align="left" style="width:40%">
                    <asp:DropDownList ID="ddlService" runat="server">
                        <asp:ListItem Value="0">Select</asp:ListItem>
                        <asp:ListItem Value="Train">Train</asp:ListItem>
                        <asp:ListItem Value="PayworldAEPS">AEPS</asp:ListItem>
                        <asp:ListItem Value="Ezytap">EzyTap ID</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td colspan="3" style="text-align:center;"><asp:Button ID="btnFind" runat="server" Text="Find Details" CssClass="button active" OnClick="btnFind_Click" /></td>
            </tr>
            <tr>
                <td colspan="3">&nbsp;</td>
            </tr>
        </table>
        
            </div>
       

        <br />
        <asp:UpdatePanel ID="up1" runat="server"><ContentTemplate>
            <p><asp:Label ID="lblMsg" runat="server" Visible="false"></asp:Label></p>
            <asp:GridView ID="gvDetails" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#336666" BorderStyle="Double" BorderWidth="3px" CellPadding="4" GridLines="Horizontal" Width="80%" OnRowCommand="gvDetails_RowCommand">
                <Columns>
                    <asp:BoundField HeaderText="Agent Name" DataField="Name"></asp:BoundField>
                    <asp:BoundField HeaderText="Agent ID" DataField="USERNAME"></asp:BoundField>
                    <asp:BoundField HeaderText="Distributor ID" DataField="DSID"></asp:BoundField>
                    <asp:TemplateField HeaderText="Train User ID" >
                        <ItemTemplate>
                            <asp:TextBox ID="txtTrainUserId" runat="server" Text='<%#Eval("TrainID") %>'></asp:TextBox>
                            <asp:HiddenField ID="hf1" runat="server" Value='<%#Eval("USERNAME") %>' />
                           <%-- <asp:HiddenField ID="hfagentid" runat="server" Value="<%#Eval("ert") %>" />--%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="AEPS UserID" >
                        <ItemTemplate>
                            <asp:TextBox ID="txtPayworldAEPS" runat="server" Text='<%#Eval("PayworldAEPSID") %>'></asp:TextBox>
                            <asp:HiddenField ID="hf2" runat="server" Value='<%#Eval("USERNAME") %>' />
                           <%-- <asp:HiddenField ID="hfagentid" runat="server" Value="<%#Eval("ert") %>" />--%>
                        </ItemTemplate>
                    </asp:TemplateField>
                     <asp:TemplateField HeaderText="EzyTap ID" >
                        <ItemTemplate>
                            <asp:TextBox ID="txtEzyTap" runat="server" Text='<%#Eval("EzyTapId") %>'></asp:TextBox>
                            <asp:HiddenField ID="hf3" runat="server" Value='<%#Eval("USERNAME") %>' />
                           <%-- <asp:HiddenField ID="hfagentid" runat="server" Value="<%#Eval("ert") %>" />--%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="">
                        <ItemTemplate>
                            <asp:Button ID="btnUpdate" runat="server" Text="Set ID" CssClass="button active" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" CommandName="Upd"/>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>

                <FooterStyle BackColor="White" ForeColor="#333333"></FooterStyle>
                <HeaderStyle BackColor="#336666" Font-Bold="True" ForeColor="White"></HeaderStyle>
                <PagerStyle HorizontalAlign="Center" BackColor="#336666" ForeColor="White"></PagerStyle>
                <RowStyle BackColor="White" ForeColor="#333333"></RowStyle>
                <SelectedRowStyle BackColor="#339966" Font-Bold="True" ForeColor="White"></SelectedRowStyle>
                <SortedAscendingCellStyle BackColor="#F7F7F7"></SortedAscendingCellStyle>
                <SortedAscendingHeaderStyle BackColor="#487575"></SortedAscendingHeaderStyle>
                <SortedDescendingCellStyle BackColor="#E5E5E5"></SortedDescendingCellStyle>
                <SortedDescendingHeaderStyle BackColor="#275353"></SortedDescendingHeaderStyle>
                
            </asp:GridView>
                                                 </ContentTemplate></asp:UpdatePanel>
    </center>
    </div>
</asp:Content>

