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

<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" />
    <link href="../CSS/ForTextBox.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">
      
      	 .shadow_five {
        background-color: #B3EBF4;
        -moz-border-radius: 10px;
        -webkit-border-radius: 10px;
        -o-border-radius: 10px;
        -ms-border-radius: 10px;
        border-radius: 10px;
        -moz-box-shadow: 3px 3px 5px #B1A59A;
        -webkit-box-shadow: 3px 3px 5px #B1A59A;
        -o-box-shadow: 3px 3px 5px #B1A59A;
        -ms-box-shadow: 3px 3px 5px #B1A59A;
        box-shadow: 3px 3px 5px #B1A59A;
        padding: 10px;
        margin-bottom: 10px;
    }
        .shadow_five1 {
            background-color: #F2FFC6;
            -moz-border-radius: 10px;
            -webkit-border-radius: 10px;
            -o-border-radius: 10px;
            -ms-border-radius: 10px;
            border-radius: 10px;
            -moz-box-shadow: 3px 3px 5px #B1A59A;
            -webkit-box-shadow: 3px 3px 5px #B1A59A;
            -o-box-shadow: 3px 3px 5px #B1A59A;
            -ms-box-shadow: 3px 3px 5px #B1A59A;
            box-shadow: 3px 3px 5px #B1A59A;
            padding: 10px;
            margin-bottom: 10px;
        }
                       .shadow_five2 {
            background-color:#ffddaa;      
            -moz-border-radius: 10px;
            -webkit-border-radius: 10px;
            -o-border-radius: 10px;
            -ms-border-radius: 10px;
            border-radius: 10px;
            -moz-box-shadow: 0px 0px 0px #B1A59A;
            -webkit-box-shadow: 0px 0px 0px #B1A59A;
            -o-box-shadow: 0px 0px 0px #B1A59A;
            -ms-box-shadow: 0px 0px 0px #B1A59A;
            box-shadow: 0px 0px 0px #B1A59A;
            padding: 5px;
            width: 710px;
        }
    .Label
    {
 /* IE10 Consumer Preview */ 
background-image: -ms-linear-gradient(bottom, #FFCE47 0%, #F2813F 100%);

/* Mozilla Firefox */ 
background-image: -moz-linear-gradient(bottom, #FFCE47 0%, #F2813F 100%);

/* Opera */ 
background-image: -o-linear-gradient(bottom, #FFCE47 0%, #F2813F 100%);

/* Webkit (Safari/Chrome 10) */ 
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #FFCE47), color-stop(1, #F2813F));

/* Webkit (Chrome 11+) */ 
background-image: -webkit-linear-gradient(bottom, #FFCE47 0%, #F2813F 100%);

/* W3C Markup, IE10 Release Preview */ 
background-image: linear-gradient(to top, #FFCE47 0%, #F2813F 100%);
}
           
    .lb
    {
            clear: left;
            margin: 5px 2px 0 0;
            text-align: right;
            font-size: 12px;
            
            text-transform: capitalize;
            text-shadow: 0px 0.5px 0px #444;
            font-weight:normal;
            font-family:Verdana;
        }


      
  .contactpanelcss
        {
        	width:50%;
        	margin:0px;
        	background-color:White;
        	border:10px solid ActiveBorder;
        	padding:0px;
        	margin-top:0px;
        	     	   	
        }   
 
        .myButton1 {
        
        -moz-box-shadow: 0px 1px 0px 0px #fff6af;
        -webkit-box-shadow: 0px 1px 0px 0px #fff6af;
        box-shadow: 0px 1px 0px 0px #fff6af;
        
        background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ffec64), color-stop(1, #ffab23));
        background:-moz-linear-gradient(top, #ffec64 5%, #ffab23 100%);
        background:-webkit-linear-gradient(top, #ffec64 5%, #ffab23 100%);
        background:-o-linear-gradient(top, #ffec64 5%, #ffab23 100%);
        background:-ms-linear-gradient(top, #ffec64 5%, #ffab23 100%);
        background:linear-gradient(to bottom, #ffec64 5%, #ffab23 100%);
        filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffec64', endColorstr='#ffab23',GradientType=0);
        
        background-color:#ffec64;
        
        -moz-border-radius:6px;
        -webkit-border-radius:6px;
        border-radius:6px;
        
        border:1px solid #ffaa22;
        
        display:inline-block;
        color:#333333;
        font-family:arial;
        font-size:15px;
        font-weight:bold;
        padding:6px 14px;
        text-decoration:none;
        
        text-shadow:0px 1px 0px #ffee66;
        
    }
    .myButton1:hover {
        
        background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ffab23), color-stop(1, #ffec64));
        background:-moz-linear-gradient(top, #ffab23 5%, #ffec64 100%);
        background:-webkit-linear-gradient(top, #ffab23 5%, #ffec64 100%);
        background:-o-linear-gradient(top, #ffab23 5%, #ffec64 100%);
        background:-ms-linear-gradient(top, #ffab23 5%, #ffec64 100%);
        background:linear-gradient(to bottom, #ffab23 5%, #ffec64 100%);
        filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffab23', endColorstr='#ffec64',GradientType=0);
        
        background-color:#ffab23;
    }
    .myButton1:active {
        position:relative;
        top:1px;
    }
     .style2
     {
         width: 22px;
     }
     .style3
     {
         width: 277px;
     }
     
.p1
        {
       background-image: linear-gradient(to bottom, #fcfcfc, #f7f7f7 3%, #ff9966 12%,#ff9966 90%, #bfbfbf);
-webkit-box-shadow: 0 4px 25px rgba(0,0,0,0.32), inset 0 1px 0 white;
-moz-box-shadow: 0 4px 25px rgba(0,0,0,0.32), inset 0 1px 0 white;
box-shadow: 0 4px 25px rgba(0,0,0,0.32), inset 0 1px 0 white;
            height:35px;
            width:343px;
        }
     </style>
  
</asp:Content>

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

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
<asp:Panel ID="Panel1" runat="server" Width="1330px" >  <%--BorderStyle="Groove"--%>
   <table width="100%">
    <tr>
            <td align="justify" valign="middle">
               <div class="p12" style="width:290px;"  >
      <p style="font-family:Verdana; font-size:14px; margin-top:5px;color:Blue;font-weight:bold;padding-top:5px;">
     <b style="color:White;">&nbsp;&nbsp;Add Expense Heads & their limits</b> 
      </p>
           </div>
               <%-- <asp:Label ID="Label5" runat="server" Text="Add Expense Heads & their limits" CssClass="Label" 
                    Height="50px" Width="100%" ForeColor="White" Font-Bold="True" 
                    Font-Size="X-Large"></asp:Label>--%>
                  </td>
        </tr>
         <tr><td></td></tr>
        <tr>
        <td>
          <asp:Button ID="btnAddHeads" runat="server" CssClass="myButton"
                    Text="Add Expense Heads"  onclick="btnAddHeads_Click" Width="147px" 
                    />
                   &nbsp;&nbsp;
                <asp:Button ID="btnAssignGeade" runat="server" CssClass="myButton"
                     onclick="btnAssignGeade_Click" 
                Text="Assign Grades to Employee Designations" Width="270px" 
                     />
                     &nbsp;&nbsp;
                      <asp:Button ID="btnAssignAreaType" runat="server" CssClass="myButton"
                     onclick="btnAssignAreaType_Click" Text="Assign Area Type & thier Cities" 
                     Width="" />
                      
            </td>
      
        </tr>
        
         <tr>
             <td>
        <asp:Button ID="btnAssignLimit" runat="server" CssClass="myButton"
                    Text="Assign limit to Head"  onclick="btnAssignLimit_Click" 
                    Width=""  />
                    &nbsp;&nbsp;
                     <asp:Button ID="btnAssignAdvance" runat="server" CssClass="myButton" 
                     onclick="btnAssignAdvance_Click" Text="Assign Advance to Employee" 
                     Width="15%" />
             </td>
       </tr>
        
         <tr>
             <td>
                
             </td>
       </tr>
        
         <tr>
            <td>
             <asp:Panel ID="pnlAddHead" runat="server"  CssClass="shadow_five2" Width="97%" Visible="false"> 
            
    <table width="100%">
    
       <tr>
            <td class="style26">
            </td>
            <td align="right" class="style27">
                <asp:Label ID="Label1" runat="server" Font-Names="Verdana" Font-Size="12px" CssClass="lb"
                    Text="Enter Expense Head"></asp:Label>
            </td>
            <td class="style28">
            </td>
            <td align="left" class="style26">
                            <asp:TextBox ID="txtHead" runat="server" Height="22px" Width="161px" AutoPostBack="true"
                                ontextchanged="txtHead_TextChanged"></asp:TextBox>
    
             <br />
                <asp:Label ID="lblHead" runat="server" Font-Names="Verdana" Font-Size="14px" Visible="false"
                    ForeColor="#FF3300"></asp:Label>
            </td>
            <td class="style26">
            </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:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="txtHead" ErrorMessage="Please Enter Expense Head" 
                    ValidationGroup="Head"></asp:RequiredFieldValidator>
            </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="btnSubmitHead" runat="server" CssClass="myButton" 
                    onclick="btnSubmitHead_Click" Text="Submit" ValidationGroup="Head" Width="100px" />
                    
                    <br />
                   <%--  <script type="text/javascript" language="javascript" >
                         var prm = Sys.WebForms.PageRequestManager.getInstance();
                         prm.add_endRequest(function() {
                             $(document).ready(function() {
                             $("span[id$='lblInsert']").delay(3000).fadeOut(3000, function() {
                                     //                         $(this).innerHTML("");
                                 });
                             });
                         });

</script>--%>
                    
                <asp:Label ID="lblInsert" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="#FF3300"></asp:Label>
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
     </table>
     
     </asp:Panel>
     </td></tr>
     
       <tr>
            <td>
             <asp:Panel ID="pnlAddLimit" runat="server" Width="97%" Visible="false"> 
            
    <table width="100%">
    
       <tr>
            <td class="style26">
            </td>
            <td align="right" class="style3">
                <asp:Label ID="Label2" runat="server" Font-Names="Verdana" Font-Size="12px" CssClass="lb"
                    Text="Select Expense Head"></asp:Label>
            </td>
            <td class="style2">
            </td>
            <td align="left" class="style26">
                <asp:DropDownList ID="ddlExpense" runat="server" DataSourceID="SqlDataSource1" 
                    DataTextField="ExpenseHead" DataValueField="Rowid" 
                    AppendDataBoundItems="True">
                </asp:DropDownList>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:Project_monitorConnectionString %>" 
                    SelectCommand="SELECT [Rowid], [ExpenseHead] FROM [ExpenseHead] 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">
            </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="12px" Text="Select Grade"></asp:Label>
            </td>
            <td class="style2">
                &nbsp;</td>
            <td align="left" class="style26">
                <asp:DropDownList ID="ddlGrade" runat="server" DataSourceID="SqlDataSource2" 
                    DataTextField="Grade" DataValueField="Rowid">
                </asp:DropDownList>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:Project_monitorConnectionString %>" 
                    SelectCommand="SELECT [Rowid], [Grade] FROM [Grade_Designation] 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="Label12" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="12px" Text="Select Area Type"></asp:Label>
            </td>
            <td class="style2">
                &nbsp;</td>
            <td align="left" class="style26">
                <asp:DropDownList ID="ddlAreaType" runat="server" DataSourceID="SqlDataSource3" 
                    DataTextField="AreaType" DataValueField="Rowid">
                </asp:DropDownList>
                   
                   
                <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="12px" Text="Enter limit value"></asp:Label>
            </td>
            <td class="style2">
                &nbsp;</td>
            <td align="left" class="style26">
                <asp:TextBox ID="txtHeadLimit" runat="server" Height="22px" Width="150px"></asp:TextBox>
                <br />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="txtHeadLimit" ErrorMessage="Please Enter Expense Head Limit" 
                    ValidationGroup="2"></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" 
                    onclick="btnSubmitLimit_Click" Text="Submit" ValidationGroup="2" Width="100px" />
                    <br />
                     <%-- <script type="text/javascript" language="javascript" >
                          var prm = Sys.WebForms.PageRequestManager.getInstance();
                          prm.add_endRequest(function() {
                              $(document).ready(function() {
                                  $("span[id$='lblInsertLimit']").delay(3000).fadeOut(3000, function() {
                                      //                         $(this).innerHTML("");
                                  });
                              });
                          });

</script>--%>
                <asp:Label ID="lblInsertLimit" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="#FF3300"></asp:Label>
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
     </table>
     
     </asp:Panel>
     </td></tr>
     
      <tr>
            <td>
             <asp:Panel ID="pnlGrades" runat="server"  Width="97%" Visible="false"> 
            
    <table width="100%">
    
       <tr>
            <td class="style26">
            </td>
            <td align="right" class="style27">
                <asp:Label ID="Label3" runat="server" Font-Names="Verdana" Font-Size="12px" CssClass="lb"
                    Text="Enter Grade"></asp:Label>
            </td>
            <td class="style28">
            </td>
            <td align="left" class="style26">
                            <asp:TextBox ID="txtGrade" runat="server" Height="22px" Width="150px" AutoPostBack="true"
                                ontextchanged="txtGrade_TextChanged"></asp:TextBox>
    
             <br />
                <asp:Label ID="Label4" runat="server" Font-Names="Verdana" Font-Size="12px" Visible="false"
                    ForeColor="#FF3300"></asp:Label>
                    
                     <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="txtGrade" ErrorMessage="Please Enter Grade" 
                    ValidationGroup="Grade"></asp:RequiredFieldValidator>
            </td>
            <td class="style26">
            </td>
        </tr>
       
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style27">
                <asp:Label ID="Label8" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="12px" Text="Select Designation"></asp:Label>
            </td>
            <td class="style28">
                &nbsp;</td>
            <td align="left" class="style26">
               <div style="width:250px;height:100px;overflow:auto;background-color:White;">
                <asp:CheckBoxList ID="cbDesignations" runat="server">
                </asp:CheckBoxList>
               </div>
            </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="btnSubmitGrade" runat="server" CssClass="myButton" 
                    onclick="btnSubmitGrade_Click" Text="Submit" ValidationGroup="Grade" Width="100px" />
                    
                    <br />
                   <%--  <script type="text/javascript" language="javascript" >
                         var prm = Sys.WebForms.PageRequestManager.getInstance();
                         prm.add_endRequest(function() {
                             $(document).ready(function() {
                                 $("span[id$='lblInsert']").delay(3000).fadeOut(3000, function() {
                                     //                         $(this).innerHTML("");
                                 });
                             });
                         });

</script>--%>
                    
                <asp:Label ID="lblInsertGrade" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="#FF3300"></asp:Label>
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
     </table>
     
     </asp:Panel>
     
     
       <asp:Panel ID="pnlArraType" runat="server"  Width="97%" Visible="false"> 
            
    <table width="100%">
    
       <tr>
            <td class="style26">
            </td>
            <td align="right" class="style27">
                <asp:Label ID="Label7" runat="server" Font-Names="Verdana" Font-Size="12px" CssClass="lb"
                    Text="Enter Area Type"></asp:Label>
            </td>
            <td class="style28">
            </td>
            <td align="left" class="style26">
                            <asp:TextBox ID="txtAreaType" runat="server" Height="22px" Width="150px" AutoPostBack="true"
                                ontextchanged="txtAreaType_TextChanged"></asp:TextBox>
    
             <br />
                <asp:Label ID="Label9" runat="server" Font-Names="Verdana" Font-Size="14px" Visible="false"
                    ForeColor="#FF3300"></asp:Label>
                    
                     <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                    ControlToValidate="txtAreaType" ErrorMessage="Enter Area type" 
                    ValidationGroup="AreaType"></asp:RequiredFieldValidator>
            </td>
            <td class="style26">
            </td>
        </tr>
       
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style27">
                <asp:Label ID="Label10" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="12px" Text="Enter Cities"></asp:Label>
            </td>
            <td class="style28">
                &nbsp;</td>
            <td align="left" class="style26">
               
                <asp:TextBox ID="txtCities" runat="server" AutoPostBack="true" Height="22px" 
                    ontextchanged="txtAreaType_TextChanged" Width="150px"></asp:TextBox>
               
            </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="btnSubmitAreaType" runat="server" CssClass="myButton" 
                    onclick="btnSubmitAreaType_Click" Text="Submit" ValidationGroup="AreaType" Width="100px" />
                    
                    <br />
                    <%-- <script type="text/javascript" language="javascript" >
                         var prm = Sys.WebForms.PageRequestManager.getInstance();
                         prm.add_endRequest(function() {
                             $(document).ready(function() {
                                 $("span[id$='lblInsert']").delay(3000).fadeOut(3000, function() {
                                     //                         $(this).innerHTML("");
                                 });
                             });
                         });

</script>--%>
                    
                <asp:Label ID="lblInsertArraType" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="#FF3300"></asp:Label>
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
     </table>
     
     </asp:Panel>
     </td></tr>
        
</table>
</asp:Panel>        
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>

