<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/Main.master" AutoEventWireup="true" CodeFile="ManageRelationshipOfficers.aspx.cs" Inherits="Business_ManageRelationshipOfficers" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <script language ="javascript" type ="text/javascript" >
        function KeyPressFuncIsWholeNumber() {

            if (event.keyCode < 48 || event.keyCode > 57)
            { event.returnValue = false; }
        }
    </script>
    <script language="javascript" type="text/javascript">
        function validate() {
            var message = "";



            if (message.length > 0) {
                message = "please notice the following requirments:\n\n" + message;
                alert(message);
                return false;
            }
            return true;
        }

        function validateAccountNo() {
            var message = "";

            if (document.getElementById("<%=txtROID1.ClientID%>").value == "") {
                message += "You have to enter the RO ID...\n";
            }

            if (document.getElementById("<%=txtROName1.ClientID%>").value == "") {
                message += "You have to enter the RO Name...\n";
            }

            if (message.length > 0) {
                message = "please notice the following requirments:\n\n" + message;
                alert(message);
                return false;
            }
            return true;
        }
        
    </script>
    <style type="text/css">
        .style1
        {
            height: 20px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table class="body_MainTB" border="0" cellpadding="0" cellspacing="0">
                    <tr align="center">
                        <td valign="top">
                            <!------------------------------------body St  ---------------------------------------------->
                            <table border="0" cellpadding="0" cellspacing="0" class="body_formTitle">
                                <tr>
                                    <td>
                                        Manage Relationship Officers
                                    </td>
                                </tr>
                            </table>
                            <br/>
                            <!------------------------------------body End1 ----------------------------------------------->
                            <asp:Label ID="Label1" runat="server" Text="" class="fieldError"></asp:Label>
                            <table border="0" cellpadding="0" cellspacing="0" class="contTB">
                                <tr>
                                    <td align="center">
                                        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="Frow">
                                            <tr>
                                                <td>
                                                </td>
                                            </tr>
                                        </table>
                            <asp:Panel ID="pnlSearch" runat ="server" >
                            <table border="0" width="100%" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                <tr>
                                    <td class="tdNormal" style="width: 15%">
                                        RO Name</td>
                                    <td colspan="4">
                                        <asp:TextBox ID="txtROName" runat="server" class="fieldNormal" Width="250"   MaxLength="100"
                                            ></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tdNormal" style="width: 15%">
                                        RO ID</td>
                                    <td colspan="4">
                                        <asp:TextBox ID="txtROID" runat="server" class="fieldNormal" Width="250"  MaxLength="100"
                                            ></asp:TextBox>
                                    </td>
                                </tr>
                                
                                
                                <tr>
                                    <td colspan="5" style="text-align: center">
                                        <asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="Btn_L_Normal" OnClick="Button1_Click"
                                            OnClientClick="return validate()" />
                                    </td>
                                </tr>
                            </table>
                            </asp:Panel>
                                        <br />
                                        <table border="0" cellpadding="0" cellspacing="0" class="grid_TitleBG_B">
                                            <tr>
                                                <td>
                                                    Relationship Officers</td>
                                            </tr>
                                        </table>
                                        <asp:Panel ID="pnlGrid" runat="server" Width="100%">
                                            <asp:Label ID="lblError" runat="server" Text="" class="fieldError"></asp:Label>
                                            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="rso_code"
                                                CssClass="gridMaster" OnRowCommand="GridView1_RowCommand"
                                                AllowPaging="True" AllowSorting="True" CellPadding="4" ForeColor="#333333" GridLines="None"
                                                OnRowCreated="GridView1_RowCreated" EmptyDataText="There are no Relationship Officers" 
                                                onpageindexchanging="GridView1_PageIndexChanging">
                                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                                <Columns>
                                                    <asp:BoundField DataField="rso_emp_id" HeaderText="RO ID"/>
                                                    <asp:BoundField DataField="rso_name" HeaderText="RO Name" />
                                                   
                                                    <asp:ButtonField ButtonType="Image" CommandName="u" Text="Update" ItemStyle-Width="30px"
                                                        ImageUrl="~/Images/edit.jpg" >
                                                        <ItemStyle Width="30px" />
                                                    </asp:ButtonField>
                                                    <asp:ButtonField ButtonType="Image" CommandName="d" Text="Delete" ItemStyle-Width="30px"
                                                        ImageUrl="~/Images/delete.jpg" >
                                                        <ItemStyle Width="30px" />
                                                    </asp:ButtonField>
                                                </Columns>
                                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                <EditRowStyle BackColor="#999999" />
                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                            </asp:GridView><br />
                                            <asp:DropDownList ID="ddlPages" runat="server" class="fieldNormal" AutoPostBack="True"
                                            Width="50px" OnSelectedIndexChanged="ddlPages_SelectedIndexChanged">

                                        </asp:DropDownList>
                                         Go To Page
                                        </asp:Panel>

                                     
                                      
                                        <table border="0" cellpadding="0" cellspacing="0" class="action_TB_BgForm">
                                        <tr>
                                            <td  style="width: 20%">
                                       
                                        
                                    </td>
                                                </tr>                                        
                                            <tr>
                                            
                                                <td>
                                                    <asp:Button ID="btnAdd" runat="server" Text="     Add     " class="Btn_M_Normal"
                                                        OnClick="btnAdd_Click" />
                                                        </td> 
                                            </tr>
                                            
                                        </table>
                                        <br>
                                        <!------------------------------------body End1 ----------------------------------------------->
                                        <asp:Panel ID="pnlControls" runat="server" Width="100%">
                                            <fieldset id="addItem">
                                                <legend id="addItem">Adding new RO</legend>
                                            </fieldset>
                                            <table border="0" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                                 <tr>
                                                    <td class="tdNormal" style="width:15%" colspan="2">
                                                        RO ID</td>
                                                    <td class="tdNormal" style="width:30%" colspan="2">
                                                        <asp:TextBox ID="txtROID1" runat="server" Width="100%" MaxLength="100"
                                                            class="fieldNormal" ></asp:TextBox>
                                                    </td>
                                                    <td></td>
                                                  
                                                </tr>
                                                <tr>
                                                    <td class="tdNormal" style="width:15%" colspan="2">
                                                        RO Name
                                                    </td>
                                                    <td class="tdNormal" style="width:30%" colspan="2">
                                                        <asp:TextBox ID="txtROName1" runat="server" Width="100%" class="fieldNormal" MaxLength="100"></asp:TextBox>
                                                    </td>
                                                      <td></td>
                                                  
                                                </tr>
                                                
                                               
                                            </table>
                                            <table border="0" cellpadding="0" cellspacing="0" class="action_TB_BgaddItem">
                                                <tr>
                                                    <td>
                                                        <asp:Button ID="Button2" runat="server" Text="   Cancel   " 
                                                            OnClick="btnCancel_Click" class="Btn_M_Normal" CausesValidation="False" />
                                                        <asp:Button ID="Button1" runat="server" Text="   Save   " OnClick="btnSave_Click"  class="Btn_M_Normal" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </asp:Panel>
                                        <!------------------------------------body End2 ----------------------------------------------->
                                        <br>
                                    </td>
                                </tr>
                            </table>
                            <!------------------------------------body End2 ----------------------------------------------->
                        </td>
                    </tr>
                </table>
</asp:Content>

