<%@ page autoeventwireup="true" enableeventvalidation="false" inherits="Transactions_TA_UI_Transactions_LeavePermissionAdd, App_Web_l1qhmtk3" language="C#" masterpagefile="~/MasterFile/TimeCheck.master" validaterequest="true" %>

<%@ Register Src="../UserControls/TA_uc_OrgLevelFilter_Updated.ascx" TagName="TA_uc_OrgLevel_Filter"
    TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="ConLeavePermissionAdd" ContentPlaceHolderID="BodyContentPH" runat="Server">
    <link href="../css/ProgressBar.css" rel="stylesheet" type="text/css" />
    <script src="../plugins/datepicker/jquery-1.11.1.min.js"></script>
    <script language="javascript" src="../js/ShiftExchange.js" type="text/javascript"></script>
    <script language="javascript" src="../js/EmployeeNameAjax.js" type="text/javascript"></script>
    <script language="javascript" src="../js/DateTimeValidation.js" type="text/javascript"></script>
    <script language="javascript" src="../js/CountNoOfHours.js" type="text/javascript"></script>
    <script language="javascript" src="../js/jquery.autocomplete.js" type="text/javascript"></script>
    <script language="javascript" src="../js/maxLength.js" type="text/javascript"></script>
    <script src="../plugins/datepicker/bootstrap-datepicker.js"></script>
    <script type="text/javascript">
        //values for check date
        var Monthfourdigit = 'Please enter valid date as month, day, and four digit year : Format MM/dd/yyyy.';
        //Adding this line var Datefourdigit='Please enter valid date with correct format dd/MM/yyyy'; as newly
        var Datefourdigit = 'Please enter valid date with correct format dd/MM/yyyy';
        var Invalidyearentry = 'Invalid year entry';
        var Invalidmonthentry = 'Invalid month entry';
        var Invaliddateentry = 'Invalid date entry';
        var DateformatDDMONYYYY = 'Incorrect date format. Enter as DD-MON-YYYY';
        var Entertime = 'Enter time';
        var Valueforhours = 'Invalid value for hours:';
        var Invalidvalueforminutes = 'Invalid value for minutes:';
        var Invalidtimeformat = 'Invalid time format:';
        var EntervalidDateandTime = 'Please enter valid Date and Time';
        var ValiddatemonthMMDDYYHHMM = 'Please enter valid Date and Time MM/dd/yyyy HH:mm';
        var ValiddatemonthMMDDYYHHMMTT = 'Please enter valid Date and Time MM/dd/yyyy hh:mm tt';
        //Added by Manjula.P on 15-Feb-2014 for getting dd/MM/yyyy format datetime
        var ValiddateDateDDMMYYHHMM = 'Please enter valid Date and Time MM/dd/yyyy HH:mm';
        var ValiddateDateDDMMYYHHMMTT = 'Please enter valid Date and Time MM/dd/yyyy hh:mm tt';
        //*****************************************************************************
        var EntervalidDateandTime = 'Please enter valid Date and Time';
        var Invalidvalueforhours = 'Invalid value for hours:';
        var Invalidvalueforminites = 'Invalid value for minutes:';
        var NoRecord = "No Records";
        var ErrorinRetriv = "Error in retriving details";
        var Select = "-Select-";
        var MaxLength = "Maximum length is ";
        function Emp(noRecords, errorinRetrive, select) {
            NoRecord = noRecords;
            ErrorinRetrive = errorinRetrive;
            Select = select;
        }
        function MaxLengthh(maxLength) {
            MaxLength = maxLength;
        }
        function SetAlertCheckDate(monthfourdigit, datefourdigit, invalidyearentry, invalidmonthentry, invaliddateentry, dateformatDDMONYYYY, entertime, valueforhours, invalidvalueforminutes, invalidtimeformat, entervalidDateandTime, validdatemonthMMDDYYHHMM, validdatemonthMMDDYYHHMMTT, validdateDateDDMMYYHHMM, validdateDateDDMMYYHHMMTT, entervalidDateandTime, invalidvalueforhours, invalidvalueforminites) {
            Monthfourdigit = monthfourdigit;
            Datefourdigit = datefourdigit;
            Invalidyearentry = invalidyearentry;
            Invalidmonthentry = invalidmonthentry;
            Invaliddateentry = invaliddateentry;
            DateformatDDMONYYYY = dateformatDDMONYYYY;
            Entertime = Entertime;
            Valueforhours = valueforhours;
            Invalidvalueforminutes = invalidvalueforminutes;
            Invalidtimeformat = invalidtimeformat;
            EntervalidDateandTime = entervalidDateandTime;
            ValiddatemonthMMDDYYHHMM = validdatemonthMMDDYYHHMM;
            ValiddatemonthMMDDYYHHMMTT = validdatemonthMMDDYYHHMMTT;
            //Added by Manjula.P on 15-Feb-2014
            ValiddateDateDDMMYYHHMM = validdateDateDDMMYYHHMM;
            ValiddateDateDDMMYYHHMMTT = validdateDateDDMMYYHHMMTT;
            //**********************************
            EntervalidDateandTime = entervalidDateandTime;
            Invalidvalueforhours = invalidvalueforhours;
            Invalidvalueforminites = invalidvalueforminites;
        }
        var FillPermissinDate = "Select Shift Date";
        var FillStarDate = "Select Start Time";
        var FillEndDate = "Select End Time";
        var FillReason = " Enter the Reason";
        var permissionEmpty = "Number of Hours Applied Should Not Be Empty / Zero.Click Calculate Hours";
        var SelEmployee = "Select an Employee";
        var ConfirmSave = "Are you sure to, Save?";
        var FillStarEndDate = "Select Start and End Time";
        var SelectEmployee = "Select Employee";
        var SelectvalidPermissionDate = "Select valid Permission Date";
        var SelectvalidPermissionFromDateandTime = "Select valid Permission From Date and Time";
        var SelectvalidPermissionToDateandTime = "Select valid Permission To Date and Time";
        var Selectvalidyear = "Select valid year";
        var Permissionshouldnotbeappliedbeforedateofjoining = "Permission should not be applied before date of joining";
        var PermissionHoursfallsonWeeklyOffGlobalHoliday = "Permission Hours falls on Weekly Off / Global Holiday";
        var SelectValidPermissionHours = "Select Valid Permission Hours";
        var ShiftNotAllocated = "Shift Not Allocated";
        var PermissionHoursdoesnotfallinsidetheshift = "Permission Hours does not fall inside the shift";
        var PermissionHoursfallwiththeshiftbreaktimes = "Permission Hours fall with the shift break times"
        var PermissionHoursShouldNotInNegativeHours = "Permission Hours Should Not In Negative Hours";
        var PermissionHoursNotdefinedforthisemployee = "Permission Hours Not defined for this employee";
        var MaxNumberofInstancespermonthExceeds = "Max Number of Instances per month Exceeds";
        function SetAlertMessages(permissiondtae, StarDtae, EndDate, Reason, permissionEmpty, selEmployee, ConfirmSavedeatils, FillStarEnddate) {
            FillPermissinDate = permissiondtae;
            FillStarDate = StarDtae;
            FillEndDate = EndDate;
            FillReason = Reason;
            PermissionEmpty = permissionEmpty;
            SelEmployee = selEmployee;
            ConfirmSave = ConfirmSavedeatils;
            FillStarEndDate = FillStarEnddate;
        }
        function SetAlertMessagesAjax_Permission
      (
       selectEmployee,
       selectvalidPermissionDate,
       selectvalidPermissionFromDateandTime,
       selectvalidPermissionToDateandTime,
       selectvalidyear,
       permissionshouldnotbeappliedbeforedateofjoining,
       permissionHoursfallsonWeeklyOffGlobalHoliday,
       selectValidPermissionHours,
       shiftNotAllocated,
       permissionHoursdoesnotfallinsidetheshift,
       permissionHoursfallwiththeshiftbreaktimes,
       permissionHoursShouldNotInNegativeHours,
       permissionHoursNotdefinedforthisemployee,
       maxNumberofInstancespermonthExceeds
      ) {
            SelectEmployee = selectEmployee;
            SelectvalidPermissionDate = selectvalidPermissionDate;
            SelectvalidPermissionFromDateandTime = selectvalidPermissionFromDateandTime;
            SelectvalidPermissionToDateandTime = selectvalidPermissionToDateandTime;
            Selectvalidyear = selectvalidyear;
            Permissionshouldnotbeappliedbeforedateofjoining = permissionshouldnotbeappliedbeforedateofjoining;
            PermissionHoursfallsonWeeklyOffGlobalHoliday = permissionHoursfallsonWeeklyOffGlobalHoliday;
            SelectValidPermissionHours = selectValidPermissionHours;
            ShiftNotAllocated = shiftNotAllocated;
            PermissionHoursdoesnotfallinsidetheshift = permissionHoursdoesnotfallinsidetheshift;
            PermissionHoursfallwiththeshiftbreaktimes = permissionHoursfallwiththeshiftbreaktimes;
            PermissionHoursShouldNotInNegativeHours = permissionHoursShouldNotInNegativeHours;
            PermissionHoursNotdefinedforthisemployee = permissionHoursNotdefinedforthisemployee;
            MaxNumberofInstancespermonthExceeds = maxNumberofInstancespermonthExceeds;
        }
        function ClearPermissionHrs() {
            document.aspnetForm.ctl00_BodyContentPH_txt_NumberOfHours.value = "";
        }
        function CheckDateShiftDate(current, SelectEmployee, SelectvalidPermissionDate, SelectvalidPermissionFromDateandTime, SelectvalidPermissionToDateandTime, Selectvalidyear, Permissionshouldnotbeappliedbeforedateofjoining, PermissionHoursfallsonWeeklyOffGlobalHoliday, SelectValidPermissionHours, ShiftNotAllocated, PermissionHoursdoesnotfallinsidetheshift, PermissionHoursfallwiththeshiftbreaktimes, PermissionHoursShouldNotInNegativeHours, PermissionHoursNotdefinedforthisemployee, MaxNumberofInstancespermonthExceeds) {
            var DateFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
            var PermissionDate = document.aspnetForm.ctl00_BodyContentPH_TxtPermissionDate;
            if (document.aspnetForm.ctl00_BodyContentPH_TxtPermissionDate.value != "") {
                if (checkDate(PermissionDate, DateFormat, Monthfourdigit, Datefourdigit, Invalidyearentry, Invalidmonthentry, Invaliddateentry, DateformatDDMONYYYY, Entertime, Valueforhours, Invalidvalueforminutes, Invalidtimeformat, EntervalidDateandTime, ValiddatemonthMMDDYYHHMM, ValiddatemonthMMDDYYHHMMTT, EntervalidDateandTime, Invalidvalueforhours, Invalidvalueforminites)) {
                    assignEmployeeIdPermission(current, SelectEmployee, SelectvalidPermissionDate, SelectvalidPermissionFromDateandTime, SelectvalidPermissionToDateandTime, Selectvalidyear, Permissionshouldnotbeappliedbeforedateofjoining, PermissionHoursfallsonWeeklyOffGlobalHoliday, SelectValidPermissionHours, ShiftNotAllocated, PermissionHoursdoesnotfallinsidetheshift, PermissionHoursfallwiththeshiftbreaktimes, PermissionHoursShouldNotInNegativeHours, PermissionHoursNotdefinedforthisemployee, MaxNumberofInstancespermonthExceeds);
                }
                else {
                    return false;
                }
            }
            else {
                return false;
            }
        }
        function CheckDatesAndNumberOfDays() {
            var rangeDemoFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
            var rangeDemoFormats = document.getElementById('ctl00_BodyContentPH_Hidden1').value + " " + document.getElementById('ctl00_BodyContentPH_Hidden2').value;
            var DateFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
            var TimeFormat = document.getElementById('ctl00_BodyContentPH_Hidden2').value;
            var PermissionDate = document.aspnetForm.ctl00_BodyContentPH_TxtPermissionDate;
            if (document.aspnetForm.ctl00_BodyContentPH_TxtPermissionDate.value != "") {
                if (checkDate(PermissionDate, DateFormat, Monthfourdigit, Datefourdigit, Invalidyearentry, Invalidmonthentry, Invaliddateentry, DateformatDDMONYYYY, Entertime, Valueforhours, Invalidvalueforminutes, Invalidtimeformat, EntervalidDateandTime, ValiddatemonthMMDDYYHHMM, ValiddatemonthMMDDYYHHMMTT, EntervalidDateandTime, Invalidvalueforhours, Invalidvalueforminites)) {
                    if (document.aspnetForm.ctl00_BodyContentPH_txt_StartTime.value != "") {
                        var FromDateTime = document.aspnetForm.ctl00_BodyContentPH_txt_StartTime;
                        if (checkDateAndTime(FromDateTime, DateFormat, TimeFormat, Monthfourdigit, Datefourdigit, Invalidyearentry, Invalidmonthentry, Invaliddateentry, DateformatDDMONYYYY, Entertime, Valueforhours, Invalidvalueforminutes, Invalidtimeformat, EntervalidDateandTime, ValiddatemonthMMDDYYHHMM, ValiddatemonthMMDDYYHHMMTT, ValiddateDateDDMMYYHHMM, ValiddateDateDDMMYYHHMMTT, EntervalidDateandTime, Invalidvalueforhours, Invalidvalueforminites)) {
                            if (document.aspnetForm.ctl00_BodyContentPH_txt_EndTime.value != "") {
                                var ToDateTime = document.aspnetForm.ctl00_BodyContentPH_txt_EndTime;
                                if (checkDateAndTime(ToDateTime, DateFormat, TimeFormat, Monthfourdigit, Datefourdigit, Invalidyearentry, Invalidmonthentry, Invaliddateentry, DateformatDDMONYYYY, Entertime, Valueforhours, Invalidvalueforminutes, Invalidtimeformat, EntervalidDateandTime, ValiddatemonthMMDDYYHHMM, ValiddatemonthMMDDYYHHMMTT, ValiddateDateDDMMYYHHMM, ValiddateDateDDMMYYHHMMTT, EntervalidDateandTime, Invalidvalueforhours, Invalidvalueforminites)) {
                                    NumberOfHours(SelectEmployee, SelectvalidPermissionDate, SelectvalidPermissionFromDateandTime, SelectvalidPermissionToDateandTime, Selectvalidyear, Permissionshouldnotbeappliedbeforedateofjoining, PermissionHoursfallsonWeeklyOffGlobalHoliday, SelectValidPermissionHours, ShiftNotAllocated, PermissionHoursdoesnotfallinsidetheshift, PermissionHoursfallwiththeshiftbreaktimes, PermissionHoursShouldNotInNegativeHours, PermissionHoursNotdefinedforthisemployee, MaxNumberofInstancespermonthExceeds);
                                }
                                else {
                                    return false;
                                }
                            }
                            else {
                                return false;
                            }
                        }
                        else {
                            return false;
                        }
                    }
                    else {
                        return false;
                    }
                }
                else {
                    return false;
                }
            }
            else {
                return false;
            }
            return false;
        }
        function Validation() {
            var rangeDemoFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
            var rangeDemoFormats = document.getElementById('ctl00_BodyContentPH_Hidden1').value + " " + document.getElementById('ctl00_BodyContentPH_Hidden2').value;
            document.getElementById('ctl00_BodyContentPH_hdnNoOfHours').value = document.aspnetForm.ctl00_BodyContentPH_txt_NumberOfHours.value;
            if (document.getElementById('ctl00_BodyContentPH_hdnEmployeeId').value == "") {
                alert(SelEmployee);
                document.getElementById('ctl00_BodyContentPH_txt_EmployeeId').focus();
                return false;
            }
            if (document.aspnetForm.ctl00_BodyContentPH_TxtPermissionDate.value == "") {
                alert(FillPermissinDate);
                document.aspnetForm.ctl00_BodyContentPH_TxtPermissionDate.focus();
                return false;
            }
            else if (document.aspnetForm.ctl00_BodyContentPH_txt_StartTime.value == "" && document.aspnetForm.ctl00_BodyContentPH_txt_EndTime.value == "") {
                alert(FillStarEndDate);
                document.aspnetForm.ctl00_BodyContentPH_txt_StartTime.focus();
                return false;
            }
            else if (document.aspnetForm.ctl00_BodyContentPH_txt_StartTime.value == "") {
                alert(FillStarDate);
                document.aspnetForm.ctl00_BodyContentPH_txt_StartTime.focus();
                return false;
            }
            else if (document.aspnetForm.ctl00_BodyContentPH_txt_EndTime.value == "") {
                alert(FillEndDate);
                document.aspnetForm.ctl00_BodyContentPH_txt_EndTime.focus();
                return false;
            }
            else if (trim(document.aspnetForm.ctl00_BodyContentPH_txtReason.value) == "") {
                alert(FillReason);
                document.aspnetForm.ctl00_BodyContentPH_txtReason.focus();
                return false;
            }
            else if (document.aspnetForm.ctl00_BodyContentPH_txt_NumberOfHours.value == "") {
                alert(PermissionEmpty);
                return false;
            }
            else if (document.aspnetForm.ctl00_BodyContentPH_txt_NumberOfHours.value == "00:00") {
                alert(PermissionEmpty);
                return false;
            }
            else {
                if (confirm(ConfirmSave) == true) {
                    return true;
                }
                else {
                    return false;
                }
            }
        }
        function assignEmployeeId(empid, SelectEmployee, SelectvalidPermissionDate, SelectvalidPermissionFromDateandTime, SelectvalidPermissionToDateandTime, Selectvalidyear, Permissionshouldnotbeappliedbeforedateofjoining, PermissionHoursfallsonWeeklyOffGlobalHoliday, SelectValidPermissionHours, ShiftNotAllocated, PermissionHoursdoesnotfallinsidetheshift, PermissionHoursfallwiththeshiftbreaktimes, PermissionHoursShouldNotInNegativeHours, PermissionHoursNotdefinedforthisemployee, MaxNumberofInstancespermonthExceeds) {
            document.getElementById('ctl00_BodyContentPH_hdnEmployeeId').value = empid.value;
            var permissionDate = document.getElementById('ctl00_BodyContentPH_TxtPermissionDate').value;
            if (permissionDate != "" && empid.value != "-Select-") {
                assignEmployeeIdPermission(permissionDate, SelectEmployee, SelectvalidPermissionDate, SelectvalidPermissionFromDateandTime, SelectvalidPermissionToDateandTime, Selectvalidyear, Permissionshouldnotbeappliedbeforedateofjoining, PermissionHoursfallsonWeeklyOffGlobalHoliday, SelectValidPermissionHours, ShiftNotAllocated, PermissionHoursdoesnotfallinsidetheshift, PermissionHoursfallwiththeshiftbreaktimes, PermissionHoursShouldNotInNegativeHours, PermissionHoursNotdefinedforthisemployee, MaxNumberofInstancespermonthExceeds);
            }
            if (empid.value == "-Select-" || empid.value == "") {
                document.getElementById('ctl00_BodyContentPH_hdnEmployeeId').value = "";
                document.getElementById('ctl00_BodyContentPH_hdnRemainNoOfHours').value = "00:00";
                document.getElementById('tdRemainNoOfHours').innerHTML = "00:00";
                document.getElementById('ctl00_BodyContentPH_txt_NumberOfHours').value = "";
            }            
        }
        var sessionDateValue = '<%= Session["IDateFormat"] %>';
        var sessionTimeValue = '<%= Session["ITimeFormat"] %>';
        var sessionDateAndTimeValue = sessionDateValue + ' ' + sessionTimeValue;
        $(function () {
            $('#ctl00_BodyContentPH_TxtPermissionDate').datetimepicker({ format: document.getElementById('ctl00_BodyContentPH_Hidden1').value });
            $('#ctl00_BodyContentPH_txt_StartTime').datetimepicker({ format: sessionDateAndTimeValue });
            $('#ctl00_BodyContentPH_txt_EndTime').datetimepicker({ format: sessionDateAndTimeValue });
        });
    </script>
    <div class="content-header">
        <h1 style="background-image: url('../dist/img/permission.png'); background-repeat: no-repeat; padding-left: 35px">
            <asp:Label ID="lbl_HeaderPermission" 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-md-12">
                    <div class="pull-right">
                        <h6>
                            <span style="color: Red">|</span><span style="padding-left: 10px; padding-right: 10px">
                                <asp:Label ID="lbl_IndicatesMandatoryFields" runat="server"></asp:Label>(7 No.)</span>
                        </h6>
                    </div>
                </div>
                <div class="clearfix">
                </div>
            </div>
        </div>
        <asp:UpdatePanel ID="upLeave" runat="server">
            <ContentTemplate>
                <asp:Panel ID="pnlProgress" runat="server" Style="display: none;">
                    <asp:Panel ID="pnlLoading" runat="server" HorizontalAlign="center">
                        <div class="InsideProgressBar">
                            <div class="row" style="margin-top: 10px">
                                <img src="../dist/img/logo-Progress.png" />
                            </div>
                            <div class="row" style="min-width: 280px">
                                <img src="../dist/img/default.gif" style="width: 100px" />
                            </div>
                            <div class="row" style="margin-bottom: 10px">
                                <asp:Label ID="lblLoading" runat="server" ForeColor="black" Style="text-align: center"
                                    Font-Bold="true" Font-Size="12px" Font-Italic="true" Font-Family="Arial" Text="Please Wait..."></asp:Label>
                            </div>
                            <div class="clear clearfix">
                            </div>
                        </div>
                    </asp:Panel>
                </asp:Panel>
                <asp:HiddenField ID="hdnProgress" runat="server" />
                <cc1:ModalPopupExtender ID="popupProgress" runat="server" TargetControlID="hdnProgress"
                    BackgroundCssClass="ModalPopup" PopupControlID="pnlProgress" BehaviorID="popupProgress">
                </cc1:ModalPopupExtender>
            </ContentTemplate>
            <Triggers>
                <asp:PostBackTrigger ControlID="btn_add" />
            </Triggers>
        </asp:UpdatePanel>
        <div id="myModal" class="modal modal-default fade" role="dialog">
            <div class="modal-dialog" style="min-width: 85%;">
                <!-- Modal content-->
                <div class="modal-content" style="margin-top: 100px">
                    <div class="modal-header">
                        <button type="button" id="closemodal" class="close" data-dismiss="modal" style="border-radius: 50px;">
                            &times;</button>
                        <h4 class="modal-title" style="padding-bottom: 10px">
                            <asp:Label ID="lblSelectEmployee" runat="server" Text="Select Employee"></asp:Label>
                        </h4>
                    </div>
                    <div class="modal-body">
                        <iframe id="iframePopup" runat="server" scrolling="auto" width="100%" height="500px"
                            style="border-style: none"></iframe>
                    </div>
                    <div class="modal-footer" style="display: none">
                        <button type="button" class="btn btn-primary pull-right" data-dismiss="modal">
                            Close</button>
                    </div>
                </div>
            </div>
        </div>
        <div class="emp-filter">
            <div class="form-horizontal">
                <div class="row">
                    <div class="col-md-12">
                        <div id="divAdmin" runat="server" class="pull-left-button">
                            <div class="row form-group">
                                <div class="col-md-2  col-sm-2">
                                    <asp:Label ID="lblEmpId" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3  col-sm-3">
                                    <div class="input-group input-group-sm">
                                        <asp:TextBox ID="txt_EmployeeId" runat="server" CssClass="form-control man-dat" MaxLength="15"
                                            onblur="EmpName('Permission');" onkeypress="return chkMaxLen(event,this,15);"></asp:TextBox>
                                        <span class="input-group-btn">
                                            <asp:LinkButton ID="btn_Search" Text="Search" data-toggle="modal" data-target="#myModal"
                                                CssClass="btn save-btn fa-search" runat="server" OnClientClick="return OpenWindowShiftExchange('txt_EmployeeId','PermissionApplication');" />
                                        </span>
                                    </div>
                                </div>
                                <div class="col-md-1 col-sm-0">
                                </div>
                                <div class="col-md-2  col-sm-2">
                                    <asp:Label ID="lblEmployeeName" Text="Employee Name" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3  col-sm-3">
                                    <asp:TextBox ID="txt_Name" runat="server" CssClass="form-control" ReadOnly="True"></asp:TextBox>
                                </div>
                            </div>
                        </div>
                        <div id="divEmployees" runat="server">
                            <div class="row form-group">
                                <div class="col-md-2 col-sm-2">
                                    <asp:Label ID="lbl_EmployeeID1" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3 col-sm-3">
                                    <asp:Label ID="lbl_EmployeeID" runat="server" CssClass="form-control"></asp:Label>
                                </div>
                                <div class="col-md-1 col-sm-0">
                                </div>
                                <div class="col-md-2 col-sm-2">
                                    <asp:Label ID="lbl_EmployeeName1" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3 col-sm-3">
                                    <asp:Label ID="lbl_EmployeeName" runat="server" CssClass="form-control"></asp:Label>
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-2 col-sm-2">
                                <asp:Label ID="lbl_PermissionApplicationDate1" runat="server"></asp:Label>
                                <asp:HiddenField ID="Hidden1" runat="server" />
                                <asp:HiddenField ID="Hidden2" runat="server" />
                                <asp:HiddenField ID="hdnNoOfHours" runat="server" />
                            </div>
                            <div class="col-md-3 col-sm-3">
                                <asp:Label ID="lbl_PermissionApplicationDate" runat="server" CssClass="form-control"></asp:Label>
                            </div>
                            <div class="col-md-1  col-sm-0">
                            </div>
                            <div class="col-md-2  col-sm-2">
                                <asp:Label ID="lbl_PermissionDate" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3  col-sm-3">
                                <asp:TextBox onpaste="return true" ID="TxtPermissionDate" runat="server" CssClass="form-control man-dat"
                                    EnableViewState="False" onblur="return CheckDateShiftDate(this,SelectEmployee,SelectvalidPermissionDate,SelectvalidPermissionFromDateandTime, SelectvalidPermissionToDateandTime,Selectvalidyear,Permissionshouldnotbeappliedbeforedateofjoining,PermissionHoursfallsonWeeklyOffGlobalHoliday,SelectValidPermissionHours,ShiftNotAllocated,PermissionHoursdoesnotfallinsidetheshift,PermissionHoursfallwiththeshiftbreaktimes,PermissionHoursShouldNotInNegativeHours,PermissionHoursNotdefinedforthisemployee,MaxNumberofInstancespermonthExceeds)"
                                    onCut="return false" onDrop="return false"></asp:TextBox>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-2 col-sm-2">
                                <asp:Label ID="lbl_PermisssionTime" runat="server" Visible="false"></asp:Label>
                                <asp:Label ID="lbl_StartTime" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3 col-sm-3">
                                <asp:TextBox onpaste="return true" onfocus="return CheckDateShiftDate(this,SelectEmployee,SelectvalidPermissionDate,SelectvalidPermissionFromDateandTime, SelectvalidPermissionToDateandTime,Selectvalidyear,Permissionshouldnotbeappliedbeforedateofjoining,PermissionHoursfallsonWeeklyOffGlobalHoliday,SelectValidPermissionHours,ShiftNotAllocated,PermissionHoursdoesnotfallinsidetheshift,PermissionHoursfallwiththeshiftbreaktimes,PermissionHoursShouldNotInNegativeHours,PermissionHoursNotdefinedforthisemployee,MaxNumberofInstancespermonthExceeds)"
                                    ID="txt_StartTime" runat="server" CssClass="form-control man-dat" onCut="return false"
                                    onDrop="return false" onchange="return ClearPermissionHrs();"></asp:TextBox>
                            </div>
                            <div class="col-md-1 col-sm-0">
                            </div>
                            <div class="col-md-2 col-sm-2">
                                <asp:Label ID="lbl_EndTime" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3 col-sm-3">
                                <asp:TextBox onpaste="return true" onfocus="return CheckDateShiftDate(this,SelectEmployee,SelectvalidPermissionDate,SelectvalidPermissionFromDateandTime, SelectvalidPermissionToDateandTime,Selectvalidyear,Permissionshouldnotbeappliedbeforedateofjoining,PermissionHoursfallsonWeeklyOffGlobalHoliday,SelectValidPermissionHours,ShiftNotAllocated,PermissionHoursdoesnotfallinsidetheshift,PermissionHoursfallwiththeshiftbreaktimes,PermissionHoursShouldNotInNegativeHours,PermissionHoursNotdefinedforthisemployee,MaxNumberofInstancespermonthExceeds)"
                                    ID="txt_EndTime" runat="server" CssClass="form-control man-dat" onCut="return false"
                                    onDrop="return false" onchange="return ClearPermissionHrs();"></asp:TextBox>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-2  col-sm-2">
                                <asp:Label ID="lbl_RemainingNumberofHours" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3  col-sm-3">
                                <div class="form-control man-dat" id="tdRemainNoOfHours" style="height: 28px">
                                    <asp:Label ID="lblRemainNoOfHours" runat="server" Enabled="false">
                                    </asp:Label>
                                </div>
                            </div>
                            <div class="col-md-1  col-sm-0">
                            </div>
                            <div class="col-md-2  col-sm-2">
                                <asp:Label ID="lbl_NumberofHoursapplied" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3  col-sm-3">
                                <div class="input-group input-group-sm">
                                    <asp:TextBox onpaste="return true" ID="txt_NumberOfHours" runat="server" CssClass="form-control man-dat"
                                        MaxLength="8" onCut="return false" onDrop="return false" onkeydown="return key_press_nokey(event)"
                                        onkeypress="return key_press_nokey(event)" Enabled="false" placeholder="Click Here To Calculate Hours.."></asp:TextBox>
                                    <span class="input-group-btn">
                                        <asp:LinkButton ID="btn_CalculateHrs" runat="server" CssClass="btn save-btn fa-calculator"
                                            OnClientClick="return CheckDatesAndNumberOfDays();" Text="Calculate Hours" UseSubmitBehavior="False" />
                                    </span>
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-2 col-sm-2">
                                <asp:Label ID="lbl_Reason" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3  col-sm-3">
                                <asp:TextBox ID="txtReason" runat="server" CssClass="form-control man-dat"
                                    MaxLength="250" onkeypress="return chkMaxLen(event,this,250,MaxLength);" TextMode="MultiLine"
                                    onCut="return false" onDrop="return false" Style="resize: none;"></asp:TextBox>
                            </div>
                        </div>
                        <div class="row form-group" 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-3">
                                <asp:TextBox ID="txtApprovalCC" runat="server" CssClass="textbox_4" OnKeyPress="return false"
                                    Width="240px" 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 class="row form-group">
                            <div class="col-md-5  col-sm-4">
                            </div>
                            <div class="col-md-6  col-sm-6">
                                <div class="pull-right-button">
                                    <asp:LinkButton ID="btn_add" CssClass="btn save-btn fa-floppy-o" runat="server" OnClick="btn_add_Click"
                                        OnClientClick="if(Validation()) $find('popupProgress').show();else return false;" />
                                    <asp:LinkButton ID="btn_cancel" CssClass="btn save-btn fa-angle-left" runat="server"
                                        CausesValidation="False" OnClick="btn_cancel_Click" />
                                </div>
                            </div>
                        </div>
                        <input id="hdnEmployeeId" runat="server" type="hidden" />
                        <input id="hdnRemainNoOfHours" runat="server" type="hidden" />
                        <input id="hdnNegativeValue" runat="server" type="hidden" />
                        <div class="col-md-3" style="color: Red; display: none">
                            <span class="fa fa-asterisk"></span>
                            <asp:Label ID="lbl_Error" runat="server" Style="color: #ff0000"></asp:Label>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
