<%@ page title="" language="C#" masterpagefile="~/html/MasterPage.master" autoeventwireup="true" inherits="Admin_AssignAdvance, App_Web_fz5gj3qy" %>
<%@ 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: #FFF0DB;      
            -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:98%;
        	  margin: 0px;
         background-color: White;
         border: 5px solid #8AE2FF;
         padding: 0px;
         margin-top: 0px;
        	     	   	
        }


.font
{
	font-size:12px;
	font-family:Verdana;
	}
 
        .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 24px;
        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:243px;
        }
     </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:240px;"   >
      <p style="font-family:Verdana; font-size:14px; margin-top:0px;color:Blue;font-weight:bold;padding-top:5px; width: 248px;">
     <b style="color:White;">&nbsp;&nbsp;Assign Advance to Employee</b> 
      </p>
           </div>
             <%--   <asp:Label ID="Label5" runat="server" Text="Assign Advance to Employee" CssClass="Label" 
                    Height="50px" Width="100%" ForeColor="White" Font-Bold="True" 
                    Font-Size="X-Large"></asp:Label>--%>
                  </td>
        </tr>
        
         <tr>
            <td>
             <asp:Panel ID="pnlAddHead" runat="server" Width="97%"> 
            
    <table width="100%">
    
       <tr>
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style27">
                <asp:Label ID="Label6" runat="server" Font-Names="Verdana" Font-Size="12px" CssClass="lb"
                    Text="Select Employee"></asp:Label>
            </td>
            <td class="style28">
                &nbsp;</td>
            <td align="left" class="style26">
                             <asp:DropDownList ID="ddlEName" runat="server" AppendDataBoundItems="True" 
                                 DataSourceID="SqlDataSource1" DataTextField="EName" DataValueField="EID"> 
                             </asp:DropDownList>
                             <br />
                   <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" InitialValue="-Select-"
                    ControlToValidate="ddlEName" ErrorMessage="Please Select Employee" 
                    ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>            
                           <%--  and Type='E'--%>
                <asp:SqlDataSource ID="SqlDataSource1" 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>
                            
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26">
            </td>
            <td align="right" class="style27">
                <asp:Label ID="Label1" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="12px" Text="Enter Advance Amount"></asp:Label>
            </td>
            <td class="style28">
            </td>
            <td align="left" class="style26">
                <asp:TextBox ID="txtAdvanceAmount" runat="server" Height="24px" Width="150px" 
                    onkeypress="return numericOnly(this);"></asp:TextBox>
                
                <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="RequiredFieldValidator1" 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">
                &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" 
                    onclick="btnSubmitAdvance_Click" Text="Submit" ValidationGroup="1" 
                    Width="100px" Height="37px" />
                    
                    <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>
                    <br />
                    
                  <%--  <script type="text/javascript" language="javascript" >
                        var prm = Sys.WebForms.PageRequestManager.getInstance();
                        prm.add_endRequest(function() {
                            $(document).ready(function() {
                            $("span[id$='lblPrevBal']").delay(3000).fadeOut(3000, function() {
                                    //                         $(this).innerHTML("");
                                });
                            });
                        });

</script>--%>
                      <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" 
                    onclick="btnShow_Click" Text="View Details" Width="120px" />
        
                  
                <br />
               <%--  <script type="text/javascript" language="javascript" >
                     var prm = Sys.WebForms.PageRequestManager.getInstance();
                     prm.add_endRequest(function() {
                         $(document).ready(function() {
                         $("span[id$='lblView']").delay(3000).fadeOut(3000, function() {
                                 //                         $(this).innerHTML("");
                             });
                         });
                     });

</script>--%>
                <asp:Label ID="lblView" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="#FF3300"></asp:Label>
        
                  
            </td>
            <td class="style26">
                &nbsp;</td>
        </tr>
       
        <tr>
            <td class="style26" colspan="5">
      
            </td>
           
        </tr>
       
     </table>
     
     </asp:Panel>
     </td></tr>
     
  <%--   Panel to view Advance, total expenses, sactioned, Balance expenses    --%>
  
     <tr><td>
    <%-- <asp:Button ID="btn_popup" runat="server" style="display:none;" Text="Popup" />--%>
               <%-- <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" 
                    CancelControlID="btn_Close1" PopupControlID="Panel4" 
                    TargetControlID="btn_popup">
                </cc1:ModalPopupExtender>--%>
                <asp:Panel ID="Panel4" runat="server" >
                    <div style="overflow: scroll;height:400px;">
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                            GridLines="None" 
                            BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" 
                            CellPadding="5" Font-Names="Book Antiqua" Font-Size="11pt" ForeColor="Black">  
                            <%--onrowcancelingedit="CancelEdit" onrowediting="EditCustomer" 
                            onrowupdating="UpdateCustomer" --%>
                                   <RowStyle BackColor="#ffc9bb" ForeColor="#333333" />
                            <Columns>
                            <asp:TemplateField Visible="false">
                                    <ItemTemplate>
                                        <center>
                                            <asp:Label ID="lblRowid" runat="server" Text='<%# Eval("AdvanceID")%>' Width="50px"></asp:Label>
                                        </center>
                                    </ItemTemplate>
                                 
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Assigned Date">
                                    <ItemTemplate>
                                        
                                          <asp:TextBox ID="lblSubmittedDate" runat="server" Text='<%# Eval("AssignedDate")%>' 
                                                Width="120px" ReadOnly="true" CssClass="font" ></asp:TextBox>  
                                        
                                    </ItemTemplate>
                                 
                                </asp:TemplateField>
                               
                                <asp:TemplateField HeaderText="Assigned Advance">
                                    <ItemTemplate>
                                      
                                        <asp:TextBox ID="lblTA" runat="server" Text='<%# Eval("AssignAdvance")%>' 
                                                Width="150px" ReadOnly="true" CssClass="font"></asp:TextBox>  
                                          
                                      
                                    </ItemTemplate>
                                </asp:TemplateField>
                               
                                  <asp:TemplateField HeaderText="TotalExpenses">
                                    <ItemTemplate>
                                      
                                         <asp:TextBox ID="lblTotalExpenses" runat="server" Text='<%# Eval("TotalExpenses")%>' 
                                                Width="150px" ReadOnly="true" CssClass="font"></asp:TextBox> 
                                         
                                      
                                    </ItemTemplate>
                                   <%-- <EditItemTemplate>
                                        <center>
                                            <asp:TextBox ID="txtDA" runat="server" 
                                                Text='<%# Eval("DA")%>' Width="100px"></asp:TextBox>
                                        </center>
                                    </EditItemTemplate>--%>
                                    
                                    
                                </asp:TemplateField>
                                 <asp:TemplateField HeaderText="TillDate">
                                    <ItemTemplate>
                                      
                                        <asp:TextBox ID="lblTillDate" runat="server" Text='<%# Eval("TillDate")%>' 
                                                Width="150px" ReadOnly="true" CssClass="font"></asp:TextBox> 
                                           
                                      
                                    </ItemTemplate>
                                   <%-- <EditItemTemplate>
                                        <center>
                                            <asp:TextBox ID="txtLodging" runat="server" 
                                                Text='<%# Eval("Lodging")%>' Width="100px"></asp:TextBox>
                                        </center>
                                    </EditItemTemplate>--%>
                                     
                                </asp:TemplateField>
                                 <asp:TemplateField HeaderText="Sanctioned">
                                    <ItemTemplate>
                                      
                                        <asp:TextBox ID="lblSanctioned" runat="server" Text='<%# Eval("Sanctioned")%>'
                                                Width="150px" ReadOnly="true" CssClass="font"></asp:TextBox> 
                                      
                                    </ItemTemplate>
                                  <%--  <EditItemTemplate>
                                        <center>
                                            <asp:TextBox ID="txtOthers" runat="server" 
                                                Text='<%# Eval("Others")%>' Width="100px"></asp:TextBox>
                                        </center>
                                    </EditItemTemplate>--%>
                     
                                </asp:TemplateField>
                                 <asp:TemplateField HeaderText="Balance">
                                    <ItemTemplate>
                                      
                                         <asp:TextBox ID="lblBalance" runat="server" Text='<%# Eval("Balance")%>' 
                                                Width="150px" ReadOnly="true" CssClass="font"></asp:TextBox> 
                                         
                                      
                                    </ItemTemplate>
                                   </asp:TemplateField>
                                                          
                               <%-- <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lnkRemove" runat="server" 
                                            CommandArgument='<%# Eval("Rowid")%>' OnClick="DeleteCustomer" 
                                            OnClientClick="return confirm('Do you want to delete?')" Text="Delete">
                                        </asp:LinkButton>
                                    </ItemTemplate>
                                    </asp:TemplateField>--%>
                              <%--  <asp:CommandField ShowEditButton="True" />--%>
                                 
                            </Columns>
                            
                         
                     <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />

                        </asp:GridView>
                    
                    </div>
                     <%-- <asp:Button ID="btn_Close1" runat="server" CssClass="myButton" 
                      Text="Close" Width="80px" />--%></asp:Panel>
     
     </td></tr>
     
     
</table>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>

