<%@ page language="C#" masterpagefile="~/MasterFile/TimeCheck.master" autoeventwireup="true" maintainscrollpositiononpostback="true" inherits="Transactions_TA_UI_Transactions_MultipleLeaveApplicationModify, App_Web_vgsl1u0r" %>

<asp:Content ID="Content1" ContentPlaceHolderID="BodyContentPH" runat="Server">

    <script src="../plugins/datepicker/jquery-1.11.1.min.js"></script>

    <script language="javascript" src="../js/jquery.autocomplete.js" type="text/javascript"></script>

    <script src="../plugins/datepicker/bootstrap-datepicker.js"></script>

    <script type="text/javascript" src="../js/EmpLeaveApplication.js"></script>

    <script type="text/javascript">
        function DynamicDatePicker(txtBoxId) {
            try {
                $("#" + txtBoxId).datetimepicker({ format: document.getElementById('Hidden1').value });
            }
            catch (err) {

            }
        }
        function openPopupMailCc() {
            var MailType = "CC";
            window.open('GetEmailIdsPopup.aspx?MailType=' + MailType + '', 'Test', 'height=610,top=200,left=250,width=600');
            return false;
        }
        function hidedivBorrow() {
            document.getElementById('ctl00_BodyContentPH_divBorrowLeave').style.display = "none";
        }
        function hidedivLeaveProcess() {
            document.getElementById('ctl00_BodyContentPH_divLeaveProcess').style.display = "none";
        }

        function ClientSideClick(myButton) {

            // Client side validation
            if (typeof (Page_ClientValidate) == 'function') {
                if (Page_ClientValidate() == false)
                { return false; }
            }

            //make sure the button is not of type "submit" but "button"
            if (myButton.getAttribute('type') == 'button') {
                // disable the button
                myButton.disabled = true;
                myButton.value = "Processing...";
            }
            return true;
        }

        function CheckDatesAndNumberOfDays() {
            if (document.aspnetForm.ctl00_BodyContentPH_txtFromDate.value != "") {
                var weekDay = document.aspnetForm.ctl00_BodyContentPH_txtFromDate;
                var DateFormat = document.getElementById('Hidden1').value;
                var varLeaveApplicationId = "0";
                if (checkDate(weekDay, DateFormat)) {
                    if (document.aspnetForm.ctl00_BodyContentPH_txtToDate.value != "") {
                        var weekDay = document.aspnetForm.ctl00_BodyContentPH_txtToDate;
                        var DateFormat = document.getElementById('Hidden1').value;

                        if (checkDate(weekDay, DateFormat)) {
                            NumberOfdays(varLeaveApplicationId);
                        }
                        else {
                            return false;
                        }
                    }
                }
                else {
                    return false;
                }
            }
        }
        function LeaveApplicationAddClear(Dateval) {
            //            document.aspnetForm.ctl00_BodyContentPH_ddl_SessionFrom.selectedIndex=0;
            //            document.aspnetForm.ctl00_BodyContentPH_ddl_SessionTo.selectedIndex=0;
            document.aspnetForm.ctl00_BodyContentPH_txt_Numberofdays.value = "";
            document.getElementById('ctl00_BodyContentPH_hdnNumberofDaysApplied').value = "";

        }
        function FormValidation() {
            if (trim(document.aspnetForm.ctl00_BodyContentPH_txtReason.value) == "") {
                alert("Fill Reason");
                return false;

            }
            else {
                return confirm('Are you sure to Save?');
            }

        }

        function Validation() {

            var LTypeIndex = document.aspnetForm.ctl00_BodyContentPH_ddl_LeaveType.selectedIndex;

            if (LTypeIndex == -1) {
                alert("Select Leave Type");
                return false;
            }
            var LeaveType = document.aspnetForm.ctl00_BodyContentPH_ddl_LeaveType.options[LTypeIndex].value;
            var TypeIndex = document.aspnetForm.ctl00_BodyContentPH_ddl_Type.selectedIndex;
            if (TypeIndex == -1) {
                alert("Select Leave Type");
                return false;
            }

            var Type = document.aspnetForm.ctl00_BodyContentPH_ddl_Type.options[TypeIndex].value;
            if (LeaveType == "-Select-") {
                alert("Select Leave Type");
                return false;
            }
            else if (Type == "-Select-") {
                alert("Select Leave/Restricted Holiday");
                return false;
            }
            else if (document.aspnetForm.ctl00_BodyContentPH_txtFromDate.value == "") {
                alert("Fill From Date");
                return false;
            }
            else if (document.aspnetForm.ctl00_BodyContentPH_txtToDate.value == "") {
                alert("Fill To Date");
                return false;
            }

            else if (document.aspnetForm.ctl00_BodyContentPH_ddl_SessionFrom.selectedIndex == 0) {
                alert("Select From Session");
                return false;

            }
            else if (document.aspnetForm.ctl00_BodyContentPH_ddl_SessionTo.selectedIndex == 0) {
                alert("Select To Session");
                return false;

            }
            else if (trim(document.aspnetForm.ctl00_BodyContentPH_txtReason.value) == "") {
                alert("Fill Reason");
                return false;

            }
            else if (document.aspnetForm.ctl00_BodyContentPH_txt_Numberofdays.value == "") {
                alert("Number of Days Applied Should Not Be Empty");
                return false;

            }
            else if (document.aspnetForm.ctl00_BodyContentPH_txt_Numberofdays.value == "0") {
                alert("Number of Days Applied Should Not Be Zero");
                return false;

            }

            else if (document.aspnetForm.ctl00_BodyContentPH_txtRemainingNoOfLeave.value == "0") {
                alert("Remaining number of days should not be Zero");
                return false;

            }
            else if (parseInt(document.aspnetForm.ctl00_BodyContentPH_txt_Numberofdays.value) > 365) {
                alert('Number of days applied should not exceed 365 days');
                return false;

            }

                //        else if(document.aspnetForm.ctl00_BodyContentPH_txtFromDate.value!="" && document.aspnetForm.ctl00_BodyContentPH_txtToDate.value!="")
                //        {   
                //           
                //               var Curdate=new Date();
                //               var CurYear=Curdate.getFullYear();
                //               var CurMonth=Curdate.getMonth();
                //               CurMonth=CurMonth+1;
                //               if(CurMonth < 10)
                //               {
                //                var CurMonth="0" + CurMonth;
                //               }
                //               
                //               var cdate=Curdate.getDate();
                //                              
                //               var TDate=document.aspnetForm.ctl00_BodyContentPH_txtToDate.value;
                //               var FDate=document.aspnetForm.ctl00_BodyContentPH_txtFromDate.value;
                //               
                //               var Tmon=TDate.substring(0,2);
                //               var Tdate=TDate.substring(3,5);
                //               var Tyear=TDate.substring(5,TDate.length);
                //               
                //               var Fmon=FDate.substring(0,2);
                //               var Fdate=FDate.substring(3,5);
                //               var Fyear=FDate.substring(5,FDate.length);
                //               
                //               if ((Fyear<CurYear) || (Tyear<CurYear))
                //               {
                //                   alert(CurYear);
                //                   alert(Fyear);
                //                   if (Fyear<CurYear)
                //                   {
                //                        alert("From Year is Past")
                //                        return false;
                //                   }
                //                   if (Tyear<CurYear)
                //                   {
                //                        alert("To Year is Past")
                //                        return false;
                //                   }
                //                }   
                //                   if((Fyear==CurYear) && (Tyear==CurYear))
                //                   {
                //                        
                //                        if((Fmon < CurMonth) || (Tmon < CurMonth))
                //                        {
                //                           if(Fmon < CurMonth)
                //                            {
                //                                alert("From Month Is past");
                //                                return false;   
                //                            }
                //                            if(Tmon < CurMonth)
                //                            {
                //                                alert("To Month Is past");
                //                                return false;   
                //                            }
                //                        }    
                //                        
                //                   }
                //               if(Fmon == Tmon)
                //              {
                //                  
                //                 if((Fdate < cdate) || (Tdate < cdate) )
                //                  {  
                //                    if(Fdate < cdate)
                //                    {
                //                        alert("From Date is past");
                //                        return false;
                //                    }
                //                    if(Tdate < cdate)
                //                    {
                //                        alert("To Date is past");
                //                        return false;
                //                    
                //                    }
                //                  }
                //                  else
                //                  {
                //                        
                //                      if(Fdate > Tdate)
                //                      {
                //                           alert("ToDate Should be Greater than FromDate");
                //                           return false;
                //                      }
                //                 }  
                //             }
                //               
                //       }
            else {


                return confirm('Are you sure to Save?');
            }

            //return true;   
        }
        function assignEmployeeId(empid) {
            document.getElementById('ctl00_BodyContentPH_hdnEmployeeId').value = empid;

            //        document.getElementById('ctl00_BodyContentPH_ddl_Type').selectedIndex=0;
            //	   
            //	    document.aspnetForm.ctl00_BodyContentPH_ddl_SessionFrom.selectedIndex=0;
            //	    document.aspnetForm.ctl00_BodyContentPH_ddl_SessionTo.selectedIndex=0;

            //        document.getElementById('ctl00_BodyContentPH_txtRemainingNoOfLeave').value="";
            //        document.getElementById('ctl00_BodyContentPH_hdnNumberofDaysApplied').value="";
            //        document.getElementById('ctl00_BodyContentPH_txt_Numberofdays').value="";
            //	    document.getElementById('ctl00_BodyContentPH_divLeaveProcess').style.display="none";
            //	    
            //	    if (document.getElementById('ctl00_BodyContentPH_ddl_LeaveType').options.length != null)
            //	    {				
            //	        for (var count = document.getElementById('ctl00_BodyContentPH_ddl_LeaveType').options.length-1;count >-1; count--)
            //		    {
            //			    document.getElementById('ctl00_BodyContentPH_ddl_LeaveType').options[count] = null;
            //			}	
            //        }
            //      
            //       var newOptSelect = new Option('-Select-','-Select-',  false, false);
            //       document.getElementById('ctl00_BodyContentPH_ddl_LeaveType').options[0]=newOptSelect;
            //       document.getElementById('ctl00_BodyContentPH_ddl_LeaveType').selectedIndex=0;
            //      
            //       if(empid.value!="-Select-" && empid.value!="") 
            //       {
            //            document.getElementById('ctl00_BodyContentPH_ddl_Type').focus();
            //       }
        }

        //old code
        //   function assignEmployeeId(empid)
        //   {
        //       document.getElementById('ctl00_BodyContentPH_hdnEmployeeId').value=empid;
        //       //document.getElementById('ctl00_BodyContentPH_ddl_Type').selectedIndex=0;
        //       //document.getElementById('ctl00_BodyContentPH_ddl_LeaveType').selectedIndex=0;
        //       document.aspnetForm.ctl00_BodyContentPH_txtRemainingNoOfLeave.value='';
        //       document.aspnetForm.ctl00_BodyContentPH_ddl_SessionFrom.selectedIndex=0;
        //       document.aspnetForm.ctl00_BodyContentPH_ddl_SessionTo.selectedIndex=0;
        //       document.aspnetForm.ctl00_BodyContentPH_txt_Numberofdays.value='';
        //        
        //        //document.getElementById('ctl00_BodyContentPH_ddl_Type').focus();
        //        //alert(document.getElementById('ctl00_BodyContentPH_ddl_Type').value);
        //       
        //   }


        function validateNumberOfDays(NumberOfDays) {
            if (parseInt(NumberOfDays.value) > 365) {
                alert('Number of days applied should not exceed 365 days');
            }
        }
        function DisabledInformTo(val) {
            document.getElementById('ctl00_BodyContentPH_lstInformTo').disabled = val;
        }
    </script>

    <input id="Hidden1" type="hidden" value='<% Response.Write(Session["IDateFormat"].ToString()); %>' />
    <div class="content-header">
        <h1 style="background-image: url('../dist/img/lve-app.png'); background-repeat: no-repeat; padding-left: 35px">
            <asp:Label ID="lbl_HeaderLeaveApplication" runat="server">
            </asp:Label>
        </h1>
        <asp:SiteMapPath ID="site" runat="server" CssClass="breadcrumb">
            <NodeStyle CssClass="active" />
        </asp:SiteMapPath>
    </div>
    <div class="content">
        <div class="inr-ftr">
            <div class="row">
                <div class="col-sm-12">
                    <div class="pull-right">
                        <h6>
                            <span style="color: Red">|</span><span style="padding-left: 10px; padding-right: 10px"><asp:Label
                                ID="lblIndicatesMandatoryFields" runat="server">
                            </asp:Label>
                                (1 No.)</span>
                        </h6>
                    </div>
                </div>
                <div class="clearfix">
                </div>
            </div>
        </div>
        <div class="emp-filter">
            <div class="form-horizontal">
                <div class="row">
                    <div class="col-md-12">
                        <asp:Label ID="lblError" runat="server" Style="color: #ff0000">
                        </asp:Label>
                        <div class="form-group">
                            <div class="col-md-5">
                                <div id="divEmployees" runat="server">
                                    <div class="row form-group">
                                        <div class="col-md-5">
                                            <asp:Label ID="lblEmployeeId" runat="server"></asp:Label>
                                        </div>
                                        <div class="col-md-7 src-padleft8px">
                                            <asp:Label ID="lblEmployeeIdData" runat="server" CssClass="form-control"></asp:Label>
                                        </div>
                                    </div>
                                    <div class="row form-group">
                                        <div class="col-md-5">
                                            <asp:Label ID="lblEmployeeName" runat="server"></asp:Label>
                                        </div>
                                        <div class="col-md-7 src-padleft8px">
                                            <asp:Label ID="lblEmployeeNameData" runat="server" CssClass="form-control"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div id="divIntimationType" runat="server">
                                    <div class="row form-group">
                                        <div class="col-md-5">
                                            <asp:Label ID="Label11" runat="server" Text="Intimation Type"></asp:Label>
                                        </div>
                                        <div class="col-md-7" style="padding-left: 0px">
                                            <div class="col-md-3 src-padleft8px">
                                                <asp:RadioButton ID="rbtnP" runat="server" GroupName="IntimationType" Checked="true"
                                                    CssClass="radio radio-primary" Text="P" onclick="document.getElementById('ctl00_BodyContentPH_lstInformTo').disabled = true;" />
                                            </div>
                                            <div class="col-md-4">
                                                <asp:RadioButton ID="rbtnUPWI" runat="server" GroupName="IntimationType" Text="UP-WI"
                                                    CssClass="radio radio-primary" onclick="document.getElementById('ctl00_BodyContentPH_lstInformTo').disabled = false;" />
                                            </div>
                                            <div class="col-md-5">
                                                <asp:RadioButton ID="rbtnUPWOI" runat="server" GroupName="IntimationType" Text="UP-WOI"
                                                    CssClass="radio radio-primary" onclick="document.getElementById('ctl00_BodyContentPH_lstInformTo').disabled = true;" />
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row form-group">
                                        <div class="col-md-5">
                                            Inform To
                                        </div>
                                        <div class="col-md-7 src-padleft8px">
                                            <asp:ListBox ID="lstInformTo" runat="server" SelectionMode="Multiple" CssClass="form-control"></asp:ListBox>
                                        </div>
                                    </div>
                                </div>
                                <div id="divPreviousReason" runat="server">
                                    <div class="row form-group">
                                        <div class="col-md-5">
                                            <asp:Label ID="lbl_Reason" Text="Reason" runat="server"></asp:Label>
                                        </div>
                                        <div class="col-md-7 src-padleft8px">
                                            <asp:Label ID="lblPreviousReason" runat="server" CssClass="form-control"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-1">
                            </div>
                            <div class="col-md-5">
                                <div class="row form-group">
                                    <div class="col-md-12">
                                        <div class="col-md-12 form-group">
                                            Leave Status - Current Year
                                        </div>
                                        <asp:GridView ID="grdFYLeave" runat="server" CssClass="table das-table1" AutoGenerateColumns="False"
                                            AllowSorting="True" PageSize="5" CellPadding="4">
                                            <Columns>
                                                <asp:TemplateField HeaderText="Leave Status">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblLeaveStatus" Text='<%# Eval("LeaveStatus") %>' runat="server"></asp:Label>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="CL">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblCL" runat="server" Text='<%# Bind("CL") %>'></asp:Label>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="LOP">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblLOP" runat="server" Text='<%# Bind("LOP") %>'></asp:Label>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="SL">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblSL" Text='<%# Eval("SL") %>' runat="server"></asp:Label>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Comp Off">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblSL" Text='<%# Eval("Comp Off") %>' runat="server"></asp:Label>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                            <EmptyDataTemplate>
                                                No Records Found
                                            </EmptyDataTemplate>
                                            <HeaderStyle CssClass="empheader" />
                                            <RowStyle Height="30px" CssClass="table-bg" BorderColor="#C5DFFC" />
                                            <PagerStyle Font-Overline="False" HorizontalAlign="Right" CssClass="GridPager" />
                                            <PagerSettings FirstPageText="<<" LastPageText=">>" Mode="NumericFirstLast" NextPageText=">"
                                                PreviousPageText="<" />
                                            <AlternatingRowStyle BackColor="white" />
                                        </asp:GridView>
                                    </div>
                                </div>
                                <div class="row form-group">
                                    <div class="col-md-12">
                                        <div class="col-md-12 form-group">
                                            Leave Status - Current Month
                                        </div>
                                        <asp:GridView ID="grdCMLeave" runat="server" CssClass="table das-table1" AutoGenerateColumns="False"
                                            AllowSorting="True" PageSize="5" CellPadding="4">
                                            <Columns>
                                                <asp:TemplateField HeaderText="Leave Status">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblLeaveStatus" Text='<%# Eval("LeaveStatus") %>' runat="server"></asp:Label>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="CL">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblCL" runat="server" Text='<%# Bind("CL") %>'></asp:Label>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="LOP">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblLOP" runat="server" Text='<%# Bind("LOP") %>'></asp:Label>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="SL">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblSL" Text='<%# Eval("SL") %>' runat="server"></asp:Label>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Comp Off">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblSL" Text='<%# Eval("Comp Off") %>' runat="server"></asp:Label>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                            <EmptyDataTemplate>
                                                No Records Found
                                            </EmptyDataTemplate>
                                            <HeaderStyle CssClass="empheader" />
                                            <RowStyle Height="30px" CssClass="table-bg" BorderColor="#C5DFFC" />
                                            <PagerStyle Font-Overline="False" HorizontalAlign="Right" CssClass="GridPager" />
                                            <PagerSettings FirstPageText="<<" LastPageText=">>" Mode="NumericFirstLast" NextPageText=">"
                                                PreviousPageText="<" />
                                            <AlternatingRowStyle BackColor="white" />
                                        </asp:GridView>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                        <div class="row">
                            <div class="row">
                                <div class="line16">
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-11 src-LeavePaddingRight">
                                <div id="divGrid" runat="server" style="overflow: auto; padding-bottom: 10px">
                                    <asp:GridView ID="gvTestGrid" DataKeyNames="SLNo" runat="server" AutoGenerateColumns="False"
                                        OnRowCreated="gvTestGrid_RowCreated" OnRowDataBound="gvTestGrid_RowDataBound"
                                        Height="1px" AllowSorting="true" OnSorting="gvTestGrid_Sorting" OnRowCommand="gvTestGrid_RowCommand"
                                        OnRowDeleting="gvTestGrid_RowDeleting" CssClass="table das-table1">
                                        <Columns>
                                            <asp:BoundField DataField="SLNo" HeaderText="SL No."></asp:BoundField>
                                            <asp:TemplateField HeaderText="Leave Category">
                                                <ControlStyle CssClass="form-control select2" />
                                                <ItemTemplate>
                                                    <asp:DropDownList CssClass="form-control select2" OnSelectedIndexChanged="ddlLeaveCategory_SelectedIndexChanged"
                                                        ID="ddlLeaveCategory" runat="server" AutoPostBack="true">
                                                        <asp:ListItem Value="1" Text="Leave"></asp:ListItem>
                                                        <asp:ListItem Value="2" Text="LOP"></asp:ListItem>
                                                        <asp:ListItem Value="3" Text="Comp Off"></asp:ListItem>
                                                    </asp:DropDownList>
                                                    <asp:HiddenField ID="hdnLeaveCategory" EnableViewState="true" runat="server" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Leave Types">
                                                <ControlStyle CssClass="form-control select2" />
                                                <ItemTemplate>
                                                    <asp:DropDownList CssClass="form-control select2" ID="ddlLeaveTypes" runat="server"
                                                        AutoPostBack="false" onfocusin="this.className='GridControlText1'" onfocusout="this.className='GridControlText'">
                                                    </asp:DropDownList>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Leave From">
                                                <ControlStyle CssClass="form-control" />
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtFromDate" runat="server" Text='<%# Bind("LeaveFrom") %>' onmouseover="javascript:return DynamicDatePicker(this.id);"></asp:TextBox>
                                                    <div runat="server" id="LeaveFromDivText" style="display: none">
                                                    </div>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Leave To">
                                                <ControlStyle CssClass="form-control" />
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtToDate" runat="server" Text='<%# Bind("LeaveTo") %>' onmouseover="javascript:return DynamicDatePicker(this.id);"></asp:TextBox>
                                                    <div runat="server" id="LeaveToDivText" style="display: none">
                                                    </div>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Session From">
                                                <ControlStyle CssClass="form-control select2" />
                                                <ItemTemplate>
                                                    <asp:DropDownList CssClass="form-control select2" EnableViewState="true" ID="ddlSessionsFrom"
                                                        runat="server" AutoPostBack="false">
                                                        <asp:ListItem Value="1" Text="First Half"></asp:ListItem>
                                                        <asp:ListItem Value="2" Text="Second Half"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Session To">
                                                <ControlStyle CssClass="form-control select2" />
                                                <ItemTemplate>
                                                    <asp:DropDownList CssClass="form-control select2" EnableViewState="true" ID="ddlSessionsTo"
                                                        runat="server" AutoPostBack="false">
                                                        <asp:ListItem Value="1" Text="First Half"></asp:ListItem>
                                                        <asp:ListItem Value="2" Text="Second Half"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="No Of Leaves" Visible="true">
                                                <ControlStyle CssClass="form-control" />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblNoOfLeaves" runat="server" EnableViewState="true" CssClass="form-control"></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="LinkButton1" CommandArgument='<%# Eval("SLNo") %>' data-placement="top"
                                                        ToolTip='<%# Session["Delete"] %>' data-toggle="tooltip" CssClass="btn btn-defalut del-icons" runat="server">
                                                    </asp:LinkButton>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                        <HeaderStyle CssClass="empheader" />
                                        <RowStyle Height="30px" CssClass="table-bg" BorderColor="#C5DFFC" />
                                        <PagerStyle Font-Overline="False" HorizontalAlign="Right" CssClass="GridPager" />
                                        <PagerSettings FirstPageText="<<" LastPageText=">>" Mode="NumericFirstLast" NextPageText=">"
                                            PreviousPageText="<" />
                                        <AlternatingRowStyle BackColor="white" />
                                    </asp:GridView>
                                </div>
                            </div>
                        </div>
                        <div id="divNewRow" runat="server">
                            <div class="form-group">
                                <div class="col-md-11 src-LeavePaddingRight">
                                    <div class="pull-right-button">
                                        <asp:LinkButton ID="btnNewRow" CssClass="btn add-btn fa-plus" runat="server" Text="&nbsp;&nbsp;Append"
                                            OnClick="btnNewRow_Click" />
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div id="divComments" runat="server">
                            <div class="form-group">
                                <div class="col-md-11 src-LeavePaddingRight">
                                    <div id="divLeaveConversation" runat="server">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div id="divReason" runat="server">
                            <div class="form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lblReason" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-11 src-LeavePaddingRight">
                                    <asp:TextBox ID="txtReason" runat="server" MaxLength="1000" onkeypress="return chkMaxLen(event,this,1000);"
                                        TabIndex="9" TextMode="MultiLine" CssClass="form-control man-dat" Style="resize: none">
                                    </asp:TextBox>
                                </div>
                            </div>
                            <div class="row" style="display: none;">
                                <div class="col-md-2">
                                    <asp:Label ID="lblApprovalCC" runat="server" Text="Cc Mail Ids"></asp:Label>
                                </div>
                                <div class="col-md-9">
                                    <asp:TextBox ID="txtApprovalCC" runat="server" CssClass="textbox_4" OnKeyPress="return false"
                                        Width="365px" Height="40px" TextMode="MultiLine"></asp:TextBox>
                                    <asp:Button ID="btnApprovalCC" runat="server" CssClass="but" Text="Cc..." Width="28px"
                                        OnClientClick="javascript:return openPopupMailCc();" />
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-6"></div>
                            <div class="col-md-5">
                                <div class="pull-right-button">
                                    <asp:LinkButton ID="btnAdd" Text="&nbsp;&nbsp;Save" CssClass="btn save-btn fa-floppy-o"
                                        runat="server" OnClientClick="if(FormValidation()) ClientSideClick(this);else return false;"
                                        TabIndex="10" OnClick="btnAdd_Click" UseSubmitBehavior="false" />
                                    <asp:LinkButton ID="btnCancel" Text="&nbsp;&nbsp;Back" CssClass="btn save-btn fa-angle-left"
                                        runat="server" CausesValidation="False" TabIndex="11" OnClick="btnCancel_Click" />
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <input id="hdnEmployeeId" type="hidden" runat="server" />
</asp:Content>
