<%@ page title="" language="C#" masterpagefile="~/html/MasterPage.master" autoeventwireup="true" inherits="Admin_EventMater, App_Web_fz5gj3qy" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<script runat="server">

   
</script>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <%-- <link href="../CSS/style.css"type="text/css" rel="Stylesheet" />--%>
    <link href="../CSS/ForButton.css"type="text/css" rel="Stylesheet" />
   
  <script type="text/javascript" src="../js/JScript.js"></script>

  <link href="../css/buttoncss.css" type="text/css" rel="Stylesheet"/>
 <style type="text/css">
      
     .style2
     {
         width: 22px;
     }
     .style3
     {
     }
     .style4
     {
         height: 9px;
     }
     .style5
     {
         height: 9px;
         width: 282px;
     }
     .style6
     {
         width: 282px;
     }
     .style7
     {
         height: 9px;
         width: 22px;
     }
     .style8
     {
         width: 280px;
     }
     .style9
     {
         width: 20px;
     }
     .style10
     {
     }
     .style11
     {
         width: 24px;
     }
     .style12
     {
         height: 22px;
     }
     .style13
     {
         height: 22px;
     }
     .style14
     {
         width: 20px;
         height: 22px;
     }
      .contactpanelcss1
        {
         width: 98%;
         margin: 0px;
         background-color: White;
          border:5px solid Orange;
         padding: 0px;
         margin-top: 0px;
     }
      .contactpanelcss
        {
        	width:100%;
        	  margin: 0px;
         background-color: White;
         border: 5px solid #8AE2FF;
         padding: 0px;
         margin-top: 0px;
        	     	   	
        }
         .categorypanel
        {
        	background-color:#FFF0DB;
        	border:2px solid black;
        		} 

   .cssLoadingTimer
        {        	
        	/* filter:alpha(opacity=90);       	
        	opacity:0.7; */        	
        	text-align:center; 
        	position:fixed; 
        	margin:5% 0% 0px 30%; 
        	background-color:White;
          
        	width:300px;
        	height:150PX;
        	 background-color:#ffebcc;
        	
        
        }  

     </style>
  
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<%--<asp:UpdateProgress ID="UpdateProgress1" runat="server" DynamicLayout="true"  >
                          <ProgressTemplate>
                          <div style="width:100%;">
                              <div class="cssLoadingTimer"  >
                              <p> Please wait...</p>
                                  <img id="Img1" alt="Loading..." src="../images/Regloader.gif" runat="server" style="margin-top:15px;" align="middle"  />
                                  </div>
                                  
                                  </div>
                          </ProgressTemplate>
 </asp:UpdateProgress>--%>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
<asp:Panel ID="Panel1" runat="server" > 
   <table width="100%">
    <tr>
            <td align="justify" valign="middle">
                <asp:Label ID="Label5" runat="server" Text="Add Expense Heads & their limits" CssClass="p12" 
                    Height="23px" Width="25%" ForeColor="White" Font-Bold="True" 
                    Font-Size="18px"></asp:Label>
                  </td>
        </tr>
         <tr><td></td></tr>
        <tr>
        <td>
                     <asp:Button ID="btnAddHeads" runat="server" CssClass="myButton"
                     Text="1. Select Expense Heads"  onclick="btnAddHeads_Click" 
                     Width="180px"  />
                     &nbsp;<asp:Button ID="btnAssignGeade" runat="server" CssClass="myButton" 
                     onclick="btnAssignGeade_Click" Text="2. Assign Grades to Employee Designations" 
                     Width="300px" />
                     &nbsp;<asp:Button ID="btnAssignAreaType" runat="server" CssClass="myButton" 
                     onclick="btnAssignAreaType_Click" Text="3. Assign Area Type & thier Cities" 
                     Width="240px" />
                      
                &nbsp;<asp:Button ID="btnAssignLimit" runat="server" CssClass="myButton" 
                onclick="btnAssignLimit_Click" Text="4. Assign limit to Head" 
                Width="170px" />
                &nbsp;<asp:Button ID="btnAssignAdvance" runat="server" CssClass="myButton" 
                onclick="btnAssignAdvance_Click" Text="5. Assign Advance to Employee" 
                Width="220px" />
                      
            </td>
      
        </tr>
        
         <tr>
             <td>
                    &nbsp;&nbsp;
                     </td>
       </tr>
        
         <tr>
             <td>
                
             </td>
       </tr>
        
         <tr>
            <td>
             <asp:Panel ID="pnlAddHead" runat="server" CssClass="shadow_five2" Visible="false"> 
            
    <table width="100%">
    
       <tr>
            <td class="style4">
            </td>
            <td align="right" class="style5">
                &nbsp;</td>
            <td class="style7">
            </td>
            <td align="left" class="style4">
                <asp:Label ID="Label31" runat="server" Font-Bold="True" Font-Names="Calibri" 
                    Font-Size="20px" ForeColor="#6600FF" Text="Select Expense heads"></asp:Label>
            </td>
            <td class="style4">
            </td>
        </tr>
       
        <tr>
            <td class="style4">
                &nbsp;</td>
            <td align="right" class="style5">
                &nbsp;</td>
            <td class="style7">
                &nbsp;</td>
            <td align="left" class="style4">
                &nbsp;</td>
            <td class="style4">
                &nbsp;</td>
        </tr>
       
        <tr runat="server" visible="false">
            <td class="style26">
            </td>
            <td align="right" class="style6">
                <asp:Label ID="Label1" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Enter Expense Head"></asp:Label>
            </td>
            <td class="style2">
            </td>
            <td align="left" class="style26">
                <asp:TextBox ID="txtHead" runat="server" AutoPostBack="true" Height="20px" 
                    ontextchanged="txtHead_TextChanged" Width="300px"></asp:TextBox>
                    <cc1:FilteredTextBoxExtender ID="ft1" runat="server" TargetControlID="txtHead" FilterMode="ValidChars" ValidChars="0123456789."></cc1:FilteredTextBoxExtender>
                <br />
                <asp:Label ID="lblHead" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="#FF3300" Visible="false"></asp:Label>
            </td>
            <td class="style26">
            </td>
        </tr>
       
        <tr runat="server" visible="false">
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style6">
                &nbsp;</td>
            <td class="style2">
                &nbsp;</td>
            <td align="left" class="style26">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="txtHead" ErrorMessage="Please Enter Expense Head" 
                    ValidationGroup="Head1" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style6">
                &nbsp;</td>
            <td class="style2">
                &nbsp;</td>
            <td align="left" class="style26" colspan="2">
                <asp:Panel ID="Panel3" runat="server" CssClass="contactpanelcss" 
                    Visible="false" Width="65%">
                    <div style="overflow: scroll;height:400px; width: 631px;">
                   <div style="float:left;">
                        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
                            BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" 
                            CellPadding="5" CellSpacing="4" Font-Names="Verdana" Font-Size="12px" ForeColor="Black" 
                            GridLines="Both" Width="273px">
                            <Columns>
                                <asp:TemplateField Visible="false">
                                    <ItemTemplate>
                                        <center>
                                            <asp:Label ID="lblRowid12" runat="server" Text='<%# Eval("Rowid")%>' 
                                                Width="50px"></asp:Label>
                                        </center>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Expense Heads">
                                    <ItemTemplate>
                                       
                                            <asp:Label ID="lblexpence" runat="server" 
                                                Text='<%# Eval("ExpenseHead")%>' Width="200px"></asp:Label>
                                        
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkall" runat="server" AutoPostBack="true" 
                                        oncheckedchanged="chkall_CheckedChanged"  />
                                </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <FooterStyle BackColor="LightGoldenrodYellow" />
                            <PagerStyle BackColor="LightGoldenrodYellow" ForeColor="#FFC46A" 
                                HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="#FFCF88" ForeColor="GhostWhite" />
                         <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" Height="30px" />
                            <AlternatingRowStyle BackColor="#F8F4DA" />
                        </asp:GridView>
                        
                        </div>
                       <%-- <div style="float:right;" >
                            <asp:Label ID="Label18" runat="server" Text="&nbsp;&nbsp;&nbsp;&nbsp;Selected Expense Heads" ForeColor="White" Height="30px" Font-Bold="true" BackColor="#990000" Width="299px"></asp:Label>
                               <asp:GridView ID="GridView6" runat="server" AutoGenerateColumns="False" 
                        BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" 
                      CellPadding="5" CellSpacing="4" Font-Names="Verdana" Font-Size="12px" ForeColor="Black" 
                        GridLines="Both" Width="299px">
                        <Columns>
                            <asp:TemplateField Visible="false">
                                <ItemTemplate>
                                    <center>
                                        <asp:Label ID="lblRowid12" runat="server" Text='<%# Eval("Rowid")%>' 
                                            Width="50px"></asp:Label>
                                    </center>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Selected Expense Heads">
                                <ItemTemplate>
                                           
                                              <asp:Label ID="lblexpence12" runat="server" 
                                                Text='<%# Eval("ExpensesHead")%>' Width="200px"></asp:Label>
                                    
                                </ItemTemplate>
                            </asp:TemplateField>
                         
                        </Columns>
                        <FooterStyle BackColor="LightGoldenrodYellow" />
                        <PagerStyle BackColor="LightGoldenrodYellow" ForeColor="#FFC46A" 
                            HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#FFCF88" ForeColor="GhostWhite" />
                       <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" Height="30px" />
                        <AlternatingRowStyle BackColor="#F8F4DA" />
                    </asp:GridView>
                    </div>--%>
                        &nbsp;</div>                     
                </asp:Panel>
             
               
             
            </td>
        </tr>
        

        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style6">
                &nbsp;</td>
            <td class="style2">
                &nbsp;</td>
            <td align="left" class="style26">
                <asp:Label ID="Label35" runat="server" Font-Names="Verdana" Font-Size="13px" 
                    ForeColor="#007500" 
                    Text="Note:- Expense heads once selected, can not be edited/deleted. Hence please make sure for correct selection"></asp:Label>
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style6">
                &nbsp;</td>
            <td class="style2">
                &nbsp;</td>
            <td align="left" class="style26">
                <asp:Button ID="btnSubmitHead" runat="server" CssClass="myButton" 
           onclick="btnSubmitHead_Click" Text="Submit" ValidationGroup="Head" Width="100px" />
                    
                    &nbsp;
                   
                    <br />
                    
                    
                    
                <asp:Label ID="lblInsert" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="#FF3300"></asp:Label>
            </td>
            <tr><td></td></tr>
             <tr><td></td></tr>
              <tr><td></td></tr>
             <div style="float:none;"  >
                            <asp:Label ID="Label18" runat="server" Text="&nbsp;&nbsp;&nbsp;&nbsp;Selected Expense Heads" ForeColor="White" Height="30px" Font-Bold="true" BackColor="#990000" Width="299px"></asp:Label>
                               <asp:GridView ID="GridView6" runat="server" AutoGenerateColumns="False" 
                        BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" 
                      CellPadding="5" CellSpacing="4" Font-Names="Verdana" Font-Size="12px" ForeColor="Black" 
                        GridLines="Both" Width="299px">
                        <Columns>
                            <asp:TemplateField Visible="false">
                                <ItemTemplate>
                                    <center>
                                        <asp:Label ID="lblRowid12" runat="server" Text='<%# Eval("Rowid")%>' 
                                            Width="50px"></asp:Label>
                                    </center>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Selected Expense Heads">
                                <ItemTemplate>
                                           
                                              <asp:Label ID="lblexpence12" runat="server" 
                                                Text='<%# Eval("ExpensesHead")%>' Width="200px"></asp:Label>
                                    
                                </ItemTemplate>
                            </asp:TemplateField>
                         
                        </Columns>
                        <FooterStyle BackColor="LightGoldenrodYellow" />
                        <PagerStyle BackColor="LightGoldenrodYellow" ForeColor="#FFC46A" 
                            HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#FFCF88" ForeColor="GhostWhite" />
                       <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" Height="30px" />
                        <AlternatingRowStyle BackColor="#F8F4DA" />
                    </asp:GridView>
                    </div>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style6">
                &nbsp;</td>
            <td class="style2">
                &nbsp;</td>
            <td align="left" class="style26">
                &nbsp;</td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style6">
                &nbsp;</td>
            <td class="style2">
                &nbsp;</td>
            <td align="left" class="style26">
                &nbsp;</td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
     </table>
     
     </asp:Panel>
     </td></tr>
     
       <tr>
            <td>
             <asp:Panel ID="pnlAddLimit" runat="server" CssClass="shadow_five2" Visible="false"> 
            
    <table width="100%">
    
       <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style3">
                &nbsp;</td>
            <td class="style2">
                &nbsp;</td>
            <td align="left" class="style26">
                <asp:Label ID="Label32" runat="server" Font-Bold="True" Font-Names="Calibri" 
                    Font-Size="20px" ForeColor="#6600FF" Text="Assign limit to Head"></asp:Label>
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style3">
                &nbsp;</td>
            <td class="style2">
                &nbsp;</td>
            <td align="left" class="style26">
                &nbsp;</td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26">
            </td>
            <td align="right" class="style3">
                <asp:Label ID="Label2" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Select Expense Head"></asp:Label>
            </td>
            <td class="style2"><a style="color:Red;">*</a>
            </td>
            <td align="left" class="style26">
                <asp:DropDownList ID="ddlExpense" runat="server" AppendDataBoundItems="True" 
                    DataSourceID="SqlDataSource1" DataTextField="ExpensesHead" 
                    DataValueField="Rowid" Height="20px" Width="140px">
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" InitialValue="-Select-"
                    ControlToValidate="ddlExpense" ErrorMessage="Select ExpenseHead" 
                    ValidationGroup="2" ForeColor="Red"></asp:RequiredFieldValidator>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:Project_monitorConnectionString %>" 
                    SelectCommand="SELECT [Rowid], [ExpensesHead] FROM [SelectedHeads] where ([user_id] = @user_id) order by [ExpensesHead] asc">
                    <SelectParameters>
                        <asp:SessionParameter DefaultValue="User_id" Name="user_id" 
                            SessionField="User_id" Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
            <td class="style26">
            </td>
        </tr>
       
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style3">
                <asp:Label ID="Label11" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Select Grade"></asp:Label>
            </td>
            <td class="style2"><a style="color:Red;">*</a>
                &nbsp;</td>
            <td align="left" class="style26">
                <asp:DropDownList ID="ddlGrade" runat="server" DataSourceID="SqlDataSource2" 
                    DataTextField="Grade" DataValueField="Rowid" AppendDataBoundItems="True" 
                    Height="23px" Width="143px">
                 
                </asp:DropDownList><asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" InitialValue="-Select-"
                    ControlToValidate="ddlGrade" ErrorMessage="Select Grade" 
                    ValidationGroup="2" ForeColor="Red"></asp:RequiredFieldValidator>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:Project_monitorConnectionString %>" 
                    SelectCommand="SELECT [Rowid], [Grade] FROM [Grade_Designation] where ([user_id] = @user_id) order by [Grade] asc">
                   <SelectParameters>
                    <asp:SessionParameter DefaultValue="User_id" Name="user_id" 
                        SessionField="User_id" Type="Int32" />
                </SelectParameters>
                </asp:SqlDataSource>
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style3">
                <asp:Label ID="Label12" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Select Area Type"></asp:Label>
            </td>
            <td class="style2"><a style="color:Red;">*</a>
                &nbsp;</td>
            <td align="left" class="style26">
                <asp:DropDownList ID="ddlAreaType" runat="server" DataSourceID="SqlDataSource3" 
                    DataTextField="AreaType" DataValueField="Rowid" 
                    AppendDataBoundItems="true" Height="19px" Width="145px">
                    
                </asp:DropDownList>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" InitialValue="-Select-"
                    ControlToValidate="ddlAreaType" ErrorMessage="Select Area Type" 
                    ValidationGroup="2" ForeColor="Red"></asp:RequiredFieldValidator>
                   
                <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:Project_monitorConnectionString %>" 
                    SelectCommand="SELECT [Rowid], [AreaType] FROM [AreaType_Cities] where ([user_id] = @user_id)">
                    <SelectParameters>
                    <asp:SessionParameter DefaultValue="User_id" Name="user_id" 
                        SessionField="User_id" Type="Int32" />
                </SelectParameters>
                </asp:SqlDataSource>
                   
                   
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style3">
                <asp:Label ID="Label6" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Enter limit value"></asp:Label>
                <asp:Label ID="Label17" runat="server"
                        Text="[Per Day]" ForeColor="#009900"></asp:Label>
            </td>
            <td class="style2"><a style="color:Red;">*</a>
                &nbsp;</td>
            <td align="left" class="style26">
                <asp:TextBox ID="txtHeadLimit" runat="server" Height="16px" Width="202px" 
                    AutoPostBack="True" ontextchanged="txtHeadLimit_TextChanged"></asp:TextBox>
                <asp:CheckBox ID="chkhead" runat="server" Text="At Actual" AutoPostBack="True" 
                    ForeColor="#990033" oncheckedchanged="chkhead_CheckedChanged"/>
                <br />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="txtHeadLimit" ErrorMessage="Please Enter Expense Head Limit" 
                    ValidationGroup="2" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style3">
                &nbsp;</td>
            <td class="style2">
                &nbsp;</td>
            <td align="left" class="style26">
                <asp:Button ID="btnSubmitLimit" runat="server" CssClass="myButton" 
                  OnClientClick="if (!Page_ClientValidate(1)){ return false; } this.disabled = true; this.value = 'Saving...';" 
                  UseSubmitBehavior="false" onclick="btnSubmitLimit_Click" Text="Submit" ValidationGroup="2" Width="100px" />
                    &nbsp;
                <asp:Button ID="btnshow2" runat="server" CssClass="myButton" 
                    Text="Show" Width="100px" OnClientClick="if (!Page_ClientValidate(1)){ return false; } this.disabled = true; this.value = 'Saving...';" 
                     UseSubmitBehavior="false"  onclick="btnshow2_Click" />
                    <br />

                    
                <asp:Label ID="lblInsertLimit" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="#FF3300"></asp:Label>
                    <b> <a style="color:Red;  padding-right:20px; float:right;">* Indicates Compulsory Fields</a></b>
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style3">
                &nbsp;</td>
            <td class="style2">
                &nbsp;</td>
            <td align="left" class="style26">
                &nbsp;</td>
            <td class="style26">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="center" class="style3" colspan="3">
                <asp:Panel ID="Panel5" runat="server" CssClass="contactpanelcss" Width="70%" 
                     Visible="false">
                    <div style="overflow: scroll;height:auto;">
                    <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" 
                            GridLines="None" AllowPaging="true" PagerStyle-CssClass="paging" PageSize="10" 
                            BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" 
                            CellPadding="2" Font-Names="Verdana" Font-Size="12px"  DataKeyNames="Rowid"
                            ForeColor="Black" onrowcancelingedit="GridView3_RowCancelingEdit" 
                            onrowediting="GridView3_RowEditing" onrowupdating="GridView3_RowUpdating" 
                            onpageindexchanging="GridView3_PageIndexChanging" 
                            onrowdatabound="GridView3_RowDataBound">  
                            <%--onrowcancelingedit="CancelEdit" onrowediting="EditCustomer" 
                            onrowupdating="UpdateCustomer" --%>
                            
                            <Columns>
                            <asp:TemplateField Visible="false">
                                    <ItemTemplate>
                                        <center>
                                            <asp:Label ID="lblRowid3" runat="server" Text='<%# Eval("Rowid")%>' Width="50px"></asp:Label>
                                        </center>
                                    </ItemTemplate>
                                 
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Head">
                                    <ItemTemplate>
                                     
                                          <asp:TextBox ID="lblHead" runat="server" Text='<%# Eval("Head")%>' 
                                                Width="120px" ReadOnly="true" CssClass="font"></asp:TextBox>  
                                       
                                    </ItemTemplate>
                                 <EditItemTemplate>
                                  <asp:DropDownList ID="ddlhead" runat="server" AppendDataBoundItems="True" 
                    DataSourceID="SqlDataSource90" DataTextField="ExpensesHead" 
                    DataValueField="Rowid" Height="20px" Width="140px">
                </asp:DropDownList>
           <%--     <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" InitialValue="-Select-"
                    ControlToValidate="ddlhead" ErrorMessage="Select ExpenseHead" 
                    ValidationGroup="2"></asp:RequiredFieldValidator>--%>
                <asp:SqlDataSource ID="SqlDataSource90" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:Project_monitorConnectionString %>" 
                    SelectCommand="SELECT [Rowid], [ExpensesHead] FROM [SelectedHeads] where ([user_id] = @user_id) order by [ExpensesHead] asc">
                    <SelectParameters>
                        <asp:SessionParameter DefaultValue="User_id" Name="user_id" 
                            SessionField="User_id" Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>
                                 </EditItemTemplate>
                                </asp:TemplateField>
                               
                                <asp:TemplateField HeaderText="Grade">
                                    <ItemTemplate>
                                     
                                        <asp:TextBox ID="lblGrade" runat="server" Text='<%# Eval("Grade")%>'
                                                Width="60px" ReadOnly="true" CssClass="font"></asp:TextBox>  
                                          
                                       
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                     <asp:DropDownList ID="ddlGrade1" runat="server" DataSourceID="SqlDataSource91" 
                    DataTextField="Grade" DataValueField="Rowid" AppendDataBoundItems="True" 
                    Height="23px" Width="143px">
                 
                </asp:DropDownList>
                <asp:SqlDataSource ID="SqlDataSource91" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:Project_monitorConnectionString %>" 
                    SelectCommand="SELECT [Rowid], [Grade] FROM [Grade_Designation] where ([user_id] = @user_id) order by [Grade] asc">
                   <SelectParameters>
                    <asp:SessionParameter DefaultValue="User_id" Name="user_id" 
                        SessionField="User_id" Type="Int32" />
                </SelectParameters>
                </asp:SqlDataSource>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                               
                                  <asp:TemplateField HeaderText="AreaType">
                                    <ItemTemplate>
                                       
                                         <asp:TextBox ID="lblAreaType" runat="server" Text='<%# Eval("AreaType")%>'
                                                Width="150px" ReadOnly="true" CssClass="font"></asp:TextBox> 
                                         
                                    
                                    </ItemTemplate>
                                          <EditItemTemplate>
                                           <asp:DropDownList ID="ddlAreaType1" runat="server" DataSourceID="SqlDataSource92" 
                    DataTextField="AreaType" DataValueField="Rowid" 
                    AppendDataBoundItems="true" Height="19px" Width="145px">
                    
                </asp:DropDownList>
                   
                   
                <asp:SqlDataSource ID="SqlDataSource92" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:Project_monitorConnectionString %>" 
                    SelectCommand="SELECT [Rowid], [AreaType] FROM [AreaType_Cities] where ([user_id] = @user_id)">
                    <SelectParameters>
                    <asp:SessionParameter DefaultValue="User_id" Name="user_id" 
                        SessionField="User_id" Type="Int32" />
                </SelectParameters>
                </asp:SqlDataSource>
                                          </EditItemTemplate>                           
                                </asp:TemplateField>
                                 <asp:TemplateField HeaderText="Limit">
                                    <ItemTemplate>
                                       
                                        <asp:TextBox ID="lblLimit" runat="server" Text='<%# Eval("Limit")%>'
                                                Width="80px" ReadOnly="true" CssClass="font"></asp:TextBox> 
                                           
                                       
                                    </ItemTemplate>
                                  <EditItemTemplate>
                                   <asp:TextBox ID="txtlimitedit" runat="server" Text='<%# Eval("Limit")%>'
                                                Width="80px" CssClass="font"></asp:TextBox> 
                                                <cc1:FilteredTextBoxExtender ID="ft2" runat="server" TargetControlID="txtlimitedit" FilterMode="ValidChars" ValidChars="0123456789."></cc1:FilteredTextBoxExtender>
                                           <asp:CheckBox ID="chkatual" runat="server" Text="At Actual" AutoPostBack="True" 
                    ForeColor="#990033" oncheckedchanged="chkatual_CheckedChanged"/>
                                  </EditItemTemplate>
                                </asp:TemplateField>
                                                 <asp:CommandField ShowEditButton="true"/>                                   
                                                         </Columns>
                            
                          <FooterStyle BackColor="LightGoldenrodYellow" />
                    <PagerStyle BackColor="LightGoldenrodYellow" ForeColor="#FFC46A" 
                        HorizontalAlign="Left" />
                    <SelectedRowStyle BackColor="#FFCF88" ForeColor="GhostWhite" />
                    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" Height="30px" />
                    <AlternatingRowStyle BackColor="#F8F4DA" />
                        </asp:GridView>
              
                 
                    </div>
                    
                                        </asp:Panel></td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
     </table>
     
     </asp:Panel>
     </td></tr>
     
      <tr>
            <td>
             <asp:Panel ID="pnlGrades" runat="server" CssClass="shadow_five2" Visible="false"> 
            
    <table width="100%">
    
       <tr>
            <td class="style26" colspan="3">
                &nbsp;</td>
            <td align="left" class="style26">
                            <asp:Label ID="Label33" runat="server" Font-Bold="True" Font-Names="Calibri" 
                                Font-Size="20px" ForeColor="#6600FF" 
                                Text="Assign Grades to Employee Designations"></asp:Label>
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26" colspan="3">
                &nbsp;</td>
            <td align="left" class="style26">
                &nbsp;</td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26">
            </td>
            <td align="right" class="style8">
                <asp:Label ID="Label3" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Enter Grade"></asp:Label>
            </td>
            <td class="style9"><a style="color:Red;">*</a>

            </td>
            <td align="left" >
                <asp:TextBox ID="txtGrade" runat="server" Height="25px" 
                    ontextchanged="txtGrade_TextChanged" Width="160px"></asp:TextBox>
                <br />
                <asp:Label ID="Label4" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="#FF3300" Visible="false"></asp:Label>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="txtGrade" ErrorMessage="Please Enter Grade" 
                    ValidationGroup="Grade" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td class="style26">
            </td>
        </tr>
       
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style8">
                <asp:Label ID="Label8" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Select Designation"></asp:Label>
            </td>
            <td class="style9"><a style="color:Red;">*</a>

                &nbsp;</td>
            <td align="left" class="style26">
                 <div style="width:250px;height:100px;overflow:auto;background-color:White;">
                <asp:CheckBoxList ID="cbDesignations" runat="server" CssClass="regular-checkbox">
                </asp:CheckBoxList>
                </div>
               
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style8">
                &nbsp;</td>
            <td class="style9">
                &nbsp;</td>
            <td align="left" class="style26">
                <asp:Button ID="btnSubmitGrade" runat="server" CssClass="myButton" OnClientClick="if (!Page_ClientValidate(1)){ return false; } this.disabled = true; this.value = 'Saving...';" 
                 UseSubmitBehavior="false" onclick="btnSubmitGrade_Click" Text="Submit" ValidationGroup="Grade" Width="100px" />
                    
                    &nbsp;
                <asp:Button ID="btnshow3" runat="server" CssClass="myButton" 
                    Text="Show" Width="100px" OnClientClick="if (!Page_ClientValidate(1)){ return false; } this.disabled = true; this.value = 'Saving...';" 
                  UseSubmitBehavior="false" onclick="btnshow3_Click" />
                    
                    <br />
                  
                    
                <asp:Label ID="lblInsertGrade" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="#FF3300"></asp:Label>&nbsp;&nbsp;
                    <asp:Label ID="lblInsertGrade1" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="#FF3300"></asp:Label>
                    <b> <a style="color:Red;  padding-right:20px; float:right; ">* Indicates Compulsory Fields</a></b>
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style12">
            </td>
            <td align="right" class="style13">
            </td>
            <td class="style14">
            </td>
            <td align="left" class="style12">
            </td>
            <td class="style12">
            </td>
        </tr>
        <tr>
            <td class="style12">
                &nbsp;</td>
            <td align="center" class="style13" colspan="3">
                <asp:Panel ID="Panel6" runat="server" CssClass="contactpanelcss"
                    Visible="false" Width="620px">
                    <div style="overflow: scroll;height:400px;">
                        <asp:GridView ID="GridView4" runat="server" AutoGenerateColumns="False" 
                            BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" 
                            CellPadding="2" Font-Names="Verdana" Font-Size="12px" ForeColor="Black" 
                            GridLines="None" 
                            onpageindexchanging="GridView4_PageIndexChanging" DataKeyNames="Rowid"
                            onrowcancelingedit="GridView4_RowCancelingEdit" 
                            onrowediting="GridView4_RowEditing" onrowupdating="GridView4_RowUpdating" 
                            onrowdatabound="GridView4_RowDataBound">
                            <%--onrowcancelingedit="CancelEdit" onrowediting="EditCustomer" 
                            onrowupdating="UpdateCustomer" --%>
                            <Columns>
                                <asp:TemplateField Visible="false">
                                    <ItemTemplate>
                                        <center>
                                            <asp:Label ID="lblRowid14" runat="server" Text='<%# Eval("Rowid")%>' 
                                                Width="50px"></asp:Label>
                                        </center>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Grade">
                                    <ItemTemplate>
                                        <center>
                                            <asp:TextBox ID="lblGrade1" runat="server" CssClass="font" ReadOnly="true" 
                                                Text='<%# Eval("Grade")%>' Width="100px"></asp:TextBox>
                                        </center>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                     <asp:TextBox ID="txtgrade1" runat="server" CssClass="font"
                                                Text='<%# Eval("Grade")%>' Width="100px"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Designations">
                                    <ItemTemplate>
                                        <center>
                                            <asp:TextBox ID="lblDesignations" runat="server" CssClass="font" ReadOnly="true" 
                                                Text='<%# Eval("Designations")%>' Width="130px"></asp:TextBox>
                                        </center>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                    <div style="height:100px;overflow:auto; background-color:White;">
                                    
                                   
                                    <asp:CheckBoxList ID="chkeditdes" runat="server" >
                                           </asp:CheckBoxList>
                                            </div>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:CommandField  ShowEditButton="true"/>
                               </Columns>
                            <FooterStyle BackColor="LightGoldenrodYellow" />
                            <PagerStyle BackColor="LightGoldenrodYellow" ForeColor="#FFC46A" 
                                HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="#FFCF88" ForeColor="GhostWhite" />
                          <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" Height="30px" />
                            <AlternatingRowStyle BackColor="#F8F4DA" />
                        </asp:GridView>
                    </div>
                </asp:Panel>
            </td>
            <td class="style12">
                &nbsp;</td>
        </tr>
       
     </table>
     
     </asp:Panel>
     
     
       <asp:Panel ID="pnlArraType" runat="server" CssClass="shadow_five2" Visible="false"> 
            
    <table width="100%">
    
       <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style10">
                &nbsp;</td>
            <td class="style11">
                &nbsp;</td>
            <td align="left" class="style26">
                            <asp:Label ID="Label34" runat="server" Font-Bold="True" Font-Names="Calibri" 
                                Font-Size="20px" ForeColor="#6600FF" Text="Assign Area Type &amp; thier Cities"></asp:Label>
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style10">
                &nbsp;</td>
            <td class="style11">
                &nbsp;</td>
            <td align="left" class="style26">
                &nbsp;</td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26">
            </td>
            <td align="right" class="style10">
                <asp:Label ID="Label7" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Enter Area Type"></asp:Label>
            </td>
            <td class="style11"><a style="color:Red;">*</a>
            </td>
            <td align="left" class="style26">
                <asp:TextBox ID="txtAreaType" runat="server" AutoPostBack="true" Height="15px" 
                    ontextchanged="txtAreaType_TextChanged" Width="200px"></asp:TextBox>
                <br />
                <asp:Label ID="Label9" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="#FF3300" Visible="false"></asp:Label>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                    ControlToValidate="txtGrade" ErrorMessage="Please Enter Grade" 
                    ValidationGroup="AreaType" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td class="style26">
            </td>
        </tr>
       
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style10">
                <asp:Label ID="Label10" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Enter Cities"></asp:Label>
            </td>
            <td class="style11">
                &nbsp;</td>
            <td align="left" class="style26">
               
                <asp:TextBox ID="txtCities" runat="server" AutoPostBack="true" Height="15px" 
                    ontextchanged="txtAreaType_TextChanged" Width="200px"></asp:TextBox>
               
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style10">
                &nbsp;</td>
            <td class="style11">
                &nbsp;</td>
            <td align="left" class="style26">
                <asp:Button ID="btnSubmitAreaType" runat="server" CssClass="myButton" 
                 OnClientClick="if (!Page_ClientValidate(1)){ return false; } this.disabled = true; this.value = 'Saving...';" 
                 UseSubmitBehavior="false" onclick="btnSubmitAreaType_Click" Text="Submit" ValidationGroup="AreaType" Width="100px" />
                    
                    &nbsp;
                <asp:Button ID="btnshow4" runat="server" CssClass="myButton" 
                     Text="Show" Width="100px" OnClientClick="if (!Page_ClientValidate(1)){ return false; } this.disabled = true; this.value = 'Saving...';" 
                  UseSubmitBehavior="false" onclick="btnshow4_Click" />
                    
                    <br />
              
                    
                <asp:Label ID="lblInsertArraType" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="#FF3300"></asp:Label>
                    <b> <a style="color:Red;  padding-right:20px; float:right; ">* Indicates Compulsory Fields</a></b>
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style10">
                &nbsp;</td>
            <td class="style11">
                &nbsp;</td>
            <td align="left" class="style26">
                &nbsp;</td>
            <td class="style26">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="center" class="style10" colspan="3">
                <asp:Panel ID="Panel7" runat="server" CssClass="contactpanelcss" Height="400px" 
                    Visible="false" Width="500px">
                    <div style="overflow: scroll;height:400px;">
                        <asp:GridView ID="GridView5" runat="server" AutoGenerateColumns="False" 
                            BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" 
                            CellPadding="2" Font-Names="Verdana" Font-Size="12px" ForeColor="Black" 
                            GridLines="None" onrowcancelingedit="GridView5_RowCancelingEdit" 
                            onrowediting="GridView5_RowEditing" onrowupdating="GridView5_RowUpdating">
                            <%--onrowcancelingedit="CancelEdit" onrowediting="EditCustomer" 
                            onrowupdating="UpdateCustomer" --%>
                            <Columns>
                                <asp:TemplateField Visible="false">
                                    <ItemTemplate>
                                        <center>
                                            <asp:Label ID="lblRowid16" runat="server" Text='<%# Eval("Rowid")%>' 
                                                Width="50px"></asp:Label>
                                        </center>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Area Type">
                                    <ItemTemplate>
                                        <center>
                                            <asp:TextBox ID="lblAreaType" runat="server" CssClass="font" ReadOnly="true" 
                                                Text='<%# Eval("AreaType")%>' Width="100px"></asp:TextBox>
                                        </center>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                     <asp:TextBox ID="txtarea1" runat="server" CssClass="font"
                                                Text='<%# Eval("AreaType")%>' Width="100px"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Cities">
                                    <ItemTemplate>
                                        <center>
                                            <asp:TextBox ID="lblCities" runat="server" CssClass="font" 
                                                ReadOnly="true" Text='<%# Eval("Cities")%>' Width="130px"></asp:TextBox>
                                        </center>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                     <asp:TextBox ID="txtcity1" runat="server" CssClass="font" 
                                                Text='<%# Eval("Cities")%>' Width="130px"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:CommandField ShowEditButton="true"/>
                            </Columns>
                            <FooterStyle BackColor="LightGoldenrodYellow" />
                            <PagerStyle BackColor="LightGoldenrodYellow" ForeColor="#FFC46A" 
                                HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="#FFCF88" ForeColor="GhostWhite" />
                          <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" Height="30px" />
                            <AlternatingRowStyle BackColor="#F8F4DA" />
                        </asp:GridView>
                    </div>
                </asp:Panel>
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
     </table>
     
     </asp:Panel>
     </td></tr>
     <tr>
     <td>
     <asp:Panel ID="Panel2" runat="server" CssClass="shadow_five2" Visible="false"> 
            
    <table width="100%">
    
       <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style27">
                &nbsp;</td>
            <td class="style28">
                &nbsp;</td>
            <td align="left" class="style26">
                             <asp:Label ID="Label30" runat="server" Font-Bold="True" Font-Names="Calibri" 
                                 Font-Size="20px" ForeColor="#6600FF" Text="Assign Advance to Employee"></asp:Label>
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
        <tr>
        <td colspan="5">
        &nbsp;
        </td>
        </tr>
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style27">
                <asp:Label ID="Label20" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Select Client Name"></asp:Label>
            </td>
            <td class="style28"><a style="color:Red;">*</a>
                &nbsp;</td>
            <td align="left" class="style26">
                <asp:DropDownList ID="ddl_client" runat="server" AppendDataBoundItems="True" AutoPostBack="True"
                   DataTextField="CName" DataValueField="CID"   onselectedindexchanged="ddl_client_SelectedIndexChanged">
                </asp:DropDownList>
                <br />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" 
                    ControlToValidate="ddl_client" ErrorMessage="Please Select Client" 
                    InitialValue="-Select-" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
              
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style27">
                <asp:Label ID="Label19" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Select Project Name"></asp:Label>
            </td>
            <td class="style28"><a style="color:Red;">*</a>
                &nbsp;</td>
            <td align="left" class="style26">
            <asp:DropDownList ID="ddl_projectclientwise" runat="server"  CssClass="form-control1" DataTextField="PName" DataValueField="PrID" AppendDataBoundItems="True" > </asp:DropDownList>
                <br />
                 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator10" InitialValue="-Select-" 
                   ControlToValidate="ddl_projectclientwise" ErrorMessage="Select Project Name" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
                 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator12" InitialValue="-Select-"
                    ControlToValidate="ddl_projectclientwise" ErrorMessage="Select Project Name" ValidationGroup="all" ForeColor="Red"></asp:RequiredFieldValidator>

            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style27">
                <asp:Label ID="Label13" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Select Employee"></asp:Label>
            </td>
            <td class="style28"><a style="color:Red;">*</a>
                &nbsp;</td>
            <td align="left" class="style26">
                <asp:DropDownList ID="ddlEName" runat="server" AppendDataBoundItems="True" 
                    DataSourceID="SqlDataSource4" DataTextField="EName" DataValueField="EID">  </asp:DropDownList>
                <br />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                    ControlToValidate="ddlEName" ErrorMessage="Please Select Employee" 
                    InitialValue="-Select-" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
                <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:Project_monitorConnectionString %>" 
                    SelectCommand="SELECT distinct [EID], [EName] FROM [EmployeeMaster] where ([user_id] = @user_id and working_status=1 ) order by EName">
                    <SelectParameters>
                        <asp:SessionParameter DefaultValue="User_id" Name="user_id" 
                            SessionField="User_id" Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26">
            </td>
            <td align="right" class="style27">
                <asp:Label ID="Label14" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Traveling Amount"></asp:Label>
            </td>
            <td class="style28"><%--<a style="color:Red;">*</a>--%>
            </td>
            <td align="left" class="style26">
                <asp:TextBox ID="txtAdvanceAmount" runat="server" Height="15px" Width="100px" onkeypress="return numericOnly(this);"></asp:TextBox>
                <cc1:FilteredTextBoxExtender runat="server" TargetControlID="txtAdvanceAmount" FilterMode="ValidChars" ValidChars="0123456789."></cc1:FilteredTextBoxExtender>
                <script type="text/JavaScript">
<!--
                    function numericOnly(elementRef) {
                        var keyCodeEntered = (event.which) ? event.which : (window.event.keyCode) ? window.event.keyCode : -1;

                        // Un-comment to discover a key that I have forgotten to take into account...
                        //alert(keyCodeEntered);

                        if ((keyCodeEntered >= 48) && (keyCodeEntered <= 57)) {
                            return true;
                        }
                        // '+' sign...
                        else if (keyCodeEntered == 43) {
                            // Allow only 1 plus sign ('+')...
                            if ((elementRef.value) && (elementRef.value.indexOf('+') >= 0))
                                return false;
                            else
                                return true;
                        }
                        // '-' sign...
                        else if (keyCodeEntered == 45) {
                            // Allow only 1 minus sign ('-')...
                            if ((elementRef.value) && (elementRef.value.indexOf('-') >= 0))
                                return false;
                            else
                                return true;
                        }
                        // '.' decimal point...
                        else if (keyCodeEntered == 46) {
                            // Allow only 1 decimal point ('.')...
                            if ((elementRef.value) && (elementRef.value.indexOf('.') >= 0))
                                return false;
                            else
                                return true;
                        }

                        return false;
                    }
// -->
</script>
               <br />
           <%-- <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                    ControlToValidate="txtAdvanceAmount" ErrorMessage="Please Enter Advance Amount" 
                    ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>--%>
           
            </td>
            <td class="style26">
            </td>
        </tr>


                <tr>
            <td class="style26">
            </td>
            <td align="right" class="style27">
                <asp:Label ID="Label21" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Material Purchase Amount"></asp:Label>
            </td>
            <td <%--class="style28"><a style="color:Red;">*</a>--%>
            </td>
            <td align="left" class="style26">
                <asp:TextBox ID="TextBox1" runat="server" Height="15px" Width="100px" onkeypress="return numericOnly(this);"></asp:TextBox>
                </td>
                    </tr>



       
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style27">
                &nbsp;</td>
            <td class="style28">
                &nbsp;</td>
            <td align="left" class="style26">
              
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style27">
                &nbsp;</td>
            <td class="style28">
                &nbsp;</td>
            <td align="left" class="style26">
                <asp:Button ID="btnSubmitAdvance" runat="server" CssClass="myButton" 
                  OnClientClick="if (!Page_ClientValidate(1)){ return false; } this.disabled = true; this.value = 'Saving...';" 
                  UseSubmitBehavior="false" onclick="btnSubmitAdvance_Click" Text="Submit" ValidationGroup="1" 
                    Width="100px" Height="37px" />
                    
                    <br />
                    
                  
                <asp:Label ID="Label15" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="#FF3300"></asp:Label>
                    <br />
                    
                   
                      <asp:Label ID="lblPrevBal" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="#FF3300"></asp:Label>
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="left" class="style27" colspan="3">
                <asp:Label ID="lblLHMsg" runat="server" Font-Names="Verdana" Font-Size="13px" 
                    ForeColor="#007500" 
                    Text="[NOTE - To view selected Employee's previous Expense & Advance details, click below button.]"></asp:Label>
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
        
         <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style27">
                &nbsp;</td>
            <td class="style28">
                &nbsp;</td>
            <td align="left" class="style26">
                <asp:Button ID="btnShow" runat="server" CssClass="myButton" 
               
                  UseSubmitBehavior="false"  onclick="btnShow_Click" Text="View Details" Width="120px" />
        
                  
                <br />
               
                <asp:Label ID="lblView" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="#FF3300"></asp:Label>
        
                  
            </td>
            <td class="style26"><b> <a style="color:Red;  padding-right:20px; ">* Indicates Compulsory Fields</a></b>
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26" colspan="5">
      
            </td>
           
        </tr>
       
        <tr>
            <td class="style26" colspan="5" align="center">
                            <asp:Panel ID="Panel4" runat="server" CssClass="contactpanelcss" Width="100%">
                    <div style="overflow: scroll;height:400px;">
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                            GridLines="None" 
                            BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" 
                            CellPadding="2" Font-Names="Verdana" Font-Size="12px" 
                            ForeColor="Black" onrowcancelingedit="GridView1_RowCancelingEdit" 
                            onrowediting="GridView1_RowEditing" onrowupdating="GridView1_RowUpdating">  
                            <%--onrowcancelingedit="CancelEdit" onrowediting="EditCustomer" 
                            onrowupdating="UpdateCustomer" --%>
                            
                            <Columns>
                            <asp:TemplateField Visible="false">
                                    <ItemTemplate>
                                        <center>
                                            <asp:Label ID="lblRowid" runat="server" Text='<%# Eval("AdvanceID")%>' Width="50px"></asp:Label>
                                            <asp:Label ID="lbleid" runat="server" Text='<%# Eval("EmpID")%>' Width="50px"></asp:Label>
                                        </center>
                                    </ItemTemplate>
                                 
                                </asp:TemplateField>
                                 <asp:TemplateField HeaderText="Employee Name">
                                    <ItemTemplate>
                                        <center>
                                          <asp:TextBox ID="lblename" runat="server" Text='<%# Eval("EName")%>' 
                                                Width="120px" ReadOnly="true" CssClass="font"></asp:TextBox>  
                                        </center>
                                    </ItemTemplate>
                                 <EditItemTemplate>
                                  <asp:DropDownList ID="ddlenam" runat="server" AppendDataBoundItems="True" 
                    DataSourceID="SqlDataSource11" DataTextField="EName" DataValueField="EID">
                              </asp:DropDownList>
                <asp:SqlDataSource ID="SqlDataSource11" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:Project_monitorConnectionString %>" 
                    SelectCommand="SELECT [EID], [EName] FROM [EmployeeMaster] where ([user_id] = @user_id) order by EName">
                    <SelectParameters>
                        <asp:SessionParameter DefaultValue="User_id" Name="user_id" 
                            SessionField="User_id" Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>
                                 </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Assigned Date">
                                    <ItemTemplate>
                                        <center>
                                          <asp:TextBox ID="lblSubmittedDate" runat="server" Text='<%# Eval("AssignedDate")%>' 
                                                Width="120px" ReadOnly="true" CssClass="font"></asp:TextBox>  
                                        </center>
                                    </ItemTemplate>
                                 <EditItemTemplate>
                                   <asp:TextBox ID="txtsdate" runat="server" Text='<%# Eval("AssignedDate")%>' 
                                             ReadOnly="true"    Width="120px" CssClass="font"></asp:TextBox>
                                 </EditItemTemplate>
                                </asp:TemplateField>
                               
                                <asp:TemplateField HeaderText="Assigned Advance">
                                    <ItemTemplate>
                                       <center>
                                        <asp:TextBox ID="lblTA" runat="server" Text='<%# Eval("AssignAdvance")%>' 
                                                Width="150px" ReadOnly="true" CssClass="font"></asp:TextBox>  
                                         
                                       </center>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                    <asp:TextBox ID="txtassign" runat="server" Text='<%# Eval("assign")%>' 
                                                Width="150px" CssClass="font"></asp:TextBox>  
                                    </EditItemTemplate>
                                </asp:TemplateField>
                               
                                  <asp:TemplateField HeaderText="TotalExpenses">
                                    <ItemTemplate>
                                      <center>
                                         <asp:TextBox ID="lblTotalExpenses" runat="server" Text='<%# Eval("TotalExpenses")%>' 
                                                Width="150px" ReadOnly="true" CssClass="font"></asp:TextBox> 
                                         
                                        </center>
                                    </ItemTemplate>
                                                                     
                                </asp:TemplateField>
                                 <asp:TemplateField HeaderText="TillDate">
                                    <ItemTemplate>
                                        <center>
                                        <asp:TextBox ID="lblTillDate" runat="server" Text='<%# Eval("TillDate")%>' 
                                                Width="150px" ReadOnly="true" CssClass="font"></asp:TextBox> 
                                           
                                        </center>
                                    </ItemTemplate>
                                  <%--  <EditItemTemplate>
                                        <center>
                                            <asp:TextBox ID="txttilldate" runat="server" 
                                                Text='<%# Eval("TillDate")%>' Width="100px"></asp:TextBox>
                                        </center>
                                    </EditItemTemplate>--%>
                                     
                                </asp:TemplateField>
                                 <asp:TemplateField HeaderText="Sanctioned">
                                    <ItemTemplate>
                                        <center>
                                        <asp:TextBox ID="lblSanctioned" runat="server" Text='<%# Eval("Sanctioned")%>' 
                                                Width="150px" ReadOnly="true" CssClass="font"></asp:TextBox> 
                                        </center>
                                    </ItemTemplate>
                                   <%-- <EditItemTemplate>
                                        <center>
                                            <asp:TextBox ID="txtsactioned" runat="server" 
                                                Text='<%# Eval("Sanctioned")%>' Width="100px"></asp:TextBox>
                                        </center>
                                    </EditItemTemplate>--%>
                     
                                </asp:TemplateField>
                                 <asp:TemplateField HeaderText="Balance">
                                    <ItemTemplate>
                                      <center>
                                         <asp:TextBox ID="lblBalance" runat="server" Text='<%# Eval("Balance")%>' 
                                                Width="150px" ReadOnly="true" CssClass="font"></asp:TextBox> 
                                         
                                       </center>
                                    </ItemTemplate>
                                   </asp:TemplateField>
                                               <asp:CommandField ShowEditButton="true"/>           
                                                         </Columns>
                            
                          <FooterStyle BackColor="LightGoldenrodYellow" />
                    <PagerStyle BackColor="LightGoldenrodYellow" ForeColor="#FFC46A" 
                        HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#FFCF88" ForeColor="GhostWhite" />
                  <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" Height="30px" />
                    <AlternatingRowStyle BackColor="#F8F4DA" />
                        </asp:GridView>
                 
                    </div>
                    
                                        </asp:Panel>
                &nbsp;</td>
        </tr>
       
     </table>
     
     </asp:Panel>
     </td>
     </tr>
        
</table>
 <asp:Button ID="btn_popup" runat="server" style="display:none;" Text="Popup" />
                <cc1:ModalPopupExtender ID="mp1" runat="server" 
                    CancelControlID="btnclose3" PopupControlID="Panel8" 
                    TargetControlID="btn_popup" BackgroundCssClass="modelbackground">
                </cc1:ModalPopupExtender>
                        <asp:Panel ID="Panel8" runat="server" Width="408px" 
                    CssClass="categorypanel">
                         <table cellspacing="0" class="style1" style="width: 101%">
                       <tr>
                           <td>
                               &nbsp;</td>
                           <td>
                               &nbsp;</td>
                           <td>
                               &nbsp;</td>
                       </tr>
                       <tr>
                           <td colspan="3" align="center">
                               <asp:Label ID="Label16" runat="server" 
                                   Text="Expense heads once selected, can not be edited/deleted.Are you sure want to submit these Expense Heads?" 
                                   Font-Bold="True" Font-Size="15px" ForeColor="Purple" Font-Names="Calibri"></asp:Label>
                                &nbsp;</td>
                       </tr>
                       <tr>
                           <td>
                               &nbsp;</td>
                           <td>
                               &nbsp;</td>
                           <td>
                               &nbsp;</td>
                       </tr>
                       <tr>
                           <td colspan="3" align="center">
                               <asp:Button ID="btnok" runat="server" BorderStyle="None" 
                                   CssClass="myButton" Height="37px" Text="Ok" Width="81px" 
                                   onclick="btnok_Click" />
                               &nbsp;&nbsp;
                               <asp:Button ID="btnclose3" runat="server" BorderStyle="None" 
                                   CssClass="myButton" Height="37px" Text="Cancel" Width="100px" 
                                   />
                           </td>
                       </tr>
                       <tr>
                           <td>
                               &nbsp;</td>
                           <td>
                               &nbsp;</td>
                           <td>
                               &nbsp;</td>
                       </tr>
        </table>
</asp:Panel>
</asp:Panel>
       
</ContentTemplate>
</asp:UpdatePanel>

 
</asp:Content>

