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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cpHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpLyremit" runat="server">
    <asp:ScriptManager ID="smgr" runat="server">
    </asp:ScriptManager>
    <div id="Div1" runat="server" class="col-md-12">
        <div class="clearfix">
            &nbsp;</div>
        <h3>
            View/Edit Users</h3>
        <div class="clearfix">
            &nbsp;</div>
        <div class="span6 mrg10-T ">
            <div id="dvendet" visible="false" runat="server" class="col-md-6">
                <div class="row mrgBot10">
                    <div class=" col-md-3">
                        <asp:Label ID="lblAgtid" runat="server" Text="Agent ID"></asp:Label>
                    </div>
                    <div class=" col-md-7">
                        <asp:TextBox ID="txtagentid" class="Txtbox_demo2" runat="server" MaxLength="50"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="regremID" runat="server" ValidationGroup="View"
                            ControlToValidate="txtagentid" Display="Dynamic" class="errMsg" ErrorMessage="Please enter a valid AgentID"
                            ValidationExpression="^([a-zA-Z0-9]{5,50})$"></asp:RegularExpressionValidator>
                    </div>
                </div>
                <div class="row mrgBot10">
                    <asp:Button ID="btnView" runat="server" Text="Search" class="btnB" OnClick="btnSearch_click"
                        ValidationGroup="View" />
                    <asp:Button ID="btnclear" runat="server" Text="Clear" class="btnG" OnClick="btnClear_click" />
                </div>
            </div>
            <div class="clrfx">
                &nbsp;</div>
            <div visible="false" id="dvAgents" runat="server" class="table-responsive m-t-20">
                <asp:GridView ID="gvAgents" runat="server" CssClass="table table-striped table-bordered tablefieldWidth bgrow"
                    AutoGenerateColumns="False" DataKeyNames="Agent_ID,UserName,First_Name,Last_Name,EmailID,MobileNo,Agent_Status"
                    OnRowCommand="gvAgents_RowCommand" OnPageIndexChanging="gvAgents_PageIndexChanging"
                    OnRowDataBound="gvAgents_RowDataBound" AllowPaging="True" EmptyDataText="No Remitters Found"
                    CellPadding="6" CellSpacing="2" GridLines="None">
                    <RowStyle CssClass="faq_text_tb2" />
                    <Columns>
                        <asp:BoundField DataField="Agent_ID" HeaderText="Agent ID" />
                        <asp:BoundField DataField="UserName" HeaderText="User Name" />
                        <asp:BoundField DataField="First_Name" HeaderText="First Name" />
                        <asp:BoundField DataField="Last_Name" HeaderText="Last Name" />
                        <asp:BoundField DataField="EmailID" HeaderText="Email ID" ItemStyle-Wrap="true" ItemStyle-CssClass="WordWrap" />
                        <asp:BoundField DataField="MobileNo" HeaderText="Mobile No" />
                        <asp:BoundField DataField="Agent_Status" HeaderText="Agent Status" />
                        <asp:TemplateField ShowHeader="False">
                            <ItemTemplate>
                                <%-- <asp:LinkButton ID="btnView" runat="server" Text="View " CommandName="view" CausesValidation="false" />|--%>
                                <asp:LinkButton ID="btnEdit" runat="server" Text="Edit" CommandName="edtng"
                                    CausesValidation="false" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </div>
        </div>
    </div>
    <div id="dvEdit" runat="server" visible="false">
        <div class="row">
            <div class="form-group col-sm-6">
                <asp:Label ID="lblAgentid1" runat="server" Text="Agent ID" CssClass="col-md-4 control-label text-left"></asp:Label>
                <div class="col-md-8">
                    <asp:TextBox ID="txtagentid1" Enabled="false" runat="server" CssClass="form-control"></asp:TextBox>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="form-group col-sm-6">
                <asp:Label ID="lblusername1" runat="server" Text="User Name" CssClass="col-md-4 control-label text-left"></asp:Label>
                <div class="col-md-8">
                    <asp:TextBox ID="txtusername1" Enabled="false" runat="server" CssClass="form-control"></asp:TextBox>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="form-group col-sm-6">
                <asp:Label ID="lblFirstName" CssClass="col-md-4 control-label text-left" runat="server" Text="FirstName"> </asp:Label>
                <div class="col-md-8">
                    <asp:TextBox ID="txtFirstName" Enabled="false" MaxLength="40" runat="server" CssClass="form-control"></asp:TextBox>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="form-group col-sm-6">
                <asp:Label ID="lblLastName" runat="server" CssClass="col-md-4 control-label text-left" Text="LastName"></asp:Label>
                <div class="col-md-8">
                    <asp:TextBox ID="txtLastName" Enabled="false" MaxLength="40" runat="server" CssClass="form-control"></asp:TextBox>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="form-group col-sm-6">
                <asp:Label ID="lblMobile" runat="server" Text="Mobile" CssClass="col-md-4 control-label text-left"></asp:Label>
                <div class="col-md-8">
                    <asp:TextBox ID="txtMobile" runat="server" CssClass="form-control"
                        MaxLength="12"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="reqMobile" runat="server" ControlToValidate="txtMobile"
                        InitialValue="0" CssClass="errMsg" ValidationGroup="submit" Font-Size="X-Small"
                        Display="Dynamic" ErrorMessage="Enter MobileNo"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="regMobile" CssClass="errMsg" runat="server" ControlToValidate="txtMobile"
                        ValidationGroup="submit" ErrorMessage="Please enter valid MobileNo" Display="Dynamic"
                        Font-Size="X-Small" ValidationExpression="^([0-9]{1,12})$"></asp:RegularExpressionValidator>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="form-group col-sm-6">
                <asp:Label ID="Label3" CssClass="col-md-4 control-label text-left" runat="server" Text="Email"> </asp:Label>
                <div class="col-md-8">
                    <asp:TextBox ID="txtEmail" runat="server" CssClass="form-control"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="reqEmail" runat="server" ControlToValidate="txtEmail"
                        Display="Dynamic" CssClass="errMsg" ErrorMessage="Enter Email" ValidationGroup="submit"
                        Font-Size="X-Small"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="regEmailID" runat="server" ControlToValidate="txtEmail"
                        ValidationGroup="submit" Display="Dynamic" CssClass="errMsg" ErrorMessage="Enter valid Email Address"
                        Font-Size="X-Small" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">
                    </asp:RegularExpressionValidator>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="form-group col-sm-2" style="margin-left: 10%;">
                <asp:Button ID="btnSubmit" runat="server" Text="Update" ValidationGroup="Submit"
                    OnClick="btnUpdate_Click" CssClass="btnB"/>
            </div>
            <div class="form-group col-sm-6">
                <asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClick="btnCancel_click"
                    CssClass="btnG" />
            </div>
        </div>
    </div>
</asp:Content>
