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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="conLeavePermissionModify" runat="Server" ContentPlaceHolderID="BodyContentPH">
    <!--[if gt IE 5.5]>
	<link rel="stylesheet" type="text/css" href="../css/ProgressforIE.css" />
	<link rel="stylesheet" type="text/css" href="../css/anytimeIE.css" />
    <![endif]-->

    <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 src="../plugins/datepicker/bootstrap-datepicker.js"></script>

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

    <script type="text/javascript">
        //commented by Manikandan To check why these coding are added here.
        //01-Mar-2020
        //$(document).ready(function () {
        //    $("#ctl00_BodyContentPH_txt_StartTime").keydown(function (e) {
        //        e.preventDefault();
        //    });
        //    $("#ctl00_BodyContentPH_txt_EndTime").keydown(function (e) {
        //        e.preventDefault();
        //    });
        //    $("#ctl00_BodyContentPH_txt_NumberOfHours").keydown(function (e) {
        //        e.preventDefault();
        //    });
        //    $('#linkClose').click(function () {
        //        $('#divError').hide('fade');
        //    });
        //    $("#ctl00_BodyContentPH_TxtPermissionDate").keydown(function (e) {
        //        e.preventDefault();
        //    });
        //});


        var sessionDateValue = '<%= Session["IDateFormat"] %>';
        var sessionTimeValue = '<%= Session["ITimeFormat"] %>';
        var sessionDateAndTimeValue = sessionDateValue + ' ' + sessionTimeValue;
        $(function () {
            $('#ctl00_BodyContentPH_TxtPermissionDate').datetimepicker({ format: document.getElementById('ctl00_BodyContentPH_Hidden1').value }
            );
        });
        $(function () {
            $('#ctl00_BodyContentPH_txt_StartTime').datetimepicker({ format: sessionDateAndTimeValue }
            );
        });
        $(function () {
            $('#ctl00_BodyContentPH_txt_EndTime').datetimepicker({ format: sessionDateAndTimeValue }
            );
        });

        //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 MaxLength = "Maximum length is ";


        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 = "Fill From Time";
        var FillEndDate = "Fill To Time";
        var FillReason = "Fill Reason";
        var PermissionEmpty = "Permission Hours Should Not Be Empty / Zero.Click Calculate Hours";
        //"Number of Hours Applied Should Not Be Empty / Zero.Click Calculate Hours";
        var ConfirmSave = "Are you sure to, Save?";
        //Included by A.Amsaveni on 28/09/2013 to change the delete message 
        var ConformDelete = "Are you sure to, Delete?";

        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, ConfirmSavedeatils) {

            FillPermissinDate = permissiondtae;
            FillStarDate = StarDtae;
            FillEndDate = EndDate;
            FillReason = Reason;
            PermissionEmpty = permissionEmpty;
            ConfirmSave = ConfirmSavedeatils;
        }

        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 CheckDatesAndNumberOfDays() {
            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() {

            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 == "") {
                alert(FillStarDate);
                document.getElementById("ctl00_BodyContentPH_txt_StartTime").focus();
                return false;
            }
            else if (document.aspnetForm.ctl00_BodyContentPH_txt_EndTime.value == "") {
                alert(FillEndDate);
                document.getElementById("ctl00_BodyContentPH_txt_EndTime").focus();
                return false;
            }
            else if (trim(document.aspnetForm.ctl00_BodyContentPH_txtReason.value) == "") {
                alert(FillReason);
                document.getElementById("ctl00_BodyContentPH_txtReason.value").focus();
                return false;

            }
            else if (document.aspnetForm.ctl00_BodyContentPH_txt_NumberOfHours.value == "" || document.aspnetForm.ctl00_BodyContentPH_txt_NumberOfHours.value == "00:00") {
                alert(PermissionEmpty);
                document.aspnetForm.ctl00_BodyContentPH_txt_NumberOfHours.focus();
                return false;

            }
            else {
                return confirm(ConfirmSave);
            }
        }
    </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-sm-2">
                </div>
                <div class="col-sm-2 col-sm-offset-8">
                    <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>
                                (6 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_Modify" />
            </Triggers>
        </asp:UpdatePanel>
        <div class="emp-filter">
            <div class="form-horizontal">
                <div class="row">
                    <div class="col-md-12">
                        <div id="divEmployees" runat="server">
                            <div class="row form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_EmployeeID1" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:Label ID="lbl_EmployeeID" runat="server" CssClass="form-control"></asp:Label>
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_EmployeeName1" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-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">
                                <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">
                                <asp:Label ID="lbl_PermissionApplicationDate" runat="server" CssClass="form-control"></asp:Label>
                            </div>
                            <div class="col-md-1">
                            </div>
                            <div class="col-md-2">
                                <asp:Label ID="lbl_PermissionDate" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:TextBox onpaste="return true" ID="TxtPermissionDate" runat="server" CssClass="form-control man-dat"
                                    EnableViewState="False" onchange="return ClearPermissionHrs();" onCut="return false"
                                    onDrop="return false"></asp:TextBox>
                                <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="Select Valid Permission Date"
                                    OnServerValidate="CompareCurrentdate" Display="None"></asp:CustomValidator>
                            </div>
                        </div>

                        <div class="row form-group">
                            <div class="col-md-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">
                                <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>
                                <asp:CustomValidator ID="CustomValidator2" runat="server" ErrorMessage="Select Valid From Time and Date"
                                    OnServerValidate="CompareDate" Display="None"></asp:CustomValidator>
                            </div>
                            <div class="col-md-1">
                            </div>
                            <div class="col-md-2">
                                <asp:Label ID="lbl_EndTime" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-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>
                                <asp:CustomValidator ID="CustomValidator3" runat="server" ErrorMessage="Select Valid To Time and Date"
                                    OnServerValidate="CompareTodate" Display="None"></asp:CustomValidator>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-2" style="display: none">
                                <asp:Label ID="lbl_RemainingNumberofHours" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3" id="tdRemainNoOfHours" style="display: none">
                                <asp:Label ID="lblRemainNoOfHours" runat="server" CssClass="form-control man-dat"
                                    Height="28px">
                                </asp:Label>
                            </div>
                            <div class="col-md-2">
                                <asp:Label ID="lbl_NumberofHoursapplied" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-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 class="col-md-2 col-md-offset-1">
                                <asp:Label ID="lbl_Reason" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:TextBox onpaste="return true" 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">
                            <div class="col-md-12">
                                <asp:GridView ID="grv_Employees" runat="server" AutoGenerateColumns="False"
                                    CellPadding="4" CssClass="table das-table1">
                                    <Columns>
                                        <asp:TemplateField HeaderText="DATE" HeaderStyle-CssClass="empheader"
                                            ItemStyle-CssClass="table-icons">
                                            <ItemTemplate>
                                                <itemstyle horizontalalign="Center" />
                                                <headerstyle horizontalalign="Center" />
                                                <asp:Label ID="lblDate" Text='<%# Eval("Permission_Date")%>' runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="INTIME" HeaderStyle-CssClass="empheader"
                                            ItemStyle-CssClass="table-icons">
                                            <ItemTemplate>
                                                <itemstyle horizontalalign="Center" />
                                                <headerstyle horizontalalign="Center" />
                                                <asp:Label ID="lbllateHours" Text='<%# Eval("Permission_ToTime")%>' runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="LATE HOURS" HeaderStyle-CssClass="empheader"
                                            ItemStyle-CssClass="table-icons">
                                            <ItemTemplate>
                                                <itemstyle horizontalalign="Center" />
                                                <headerstyle horizontalalign="Center" />
                                                <asp:Label ID="lbllateHours" Text='<%# Eval("No_Of_Hours")%>' runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="REASON" HeaderStyle-CssClass="empheader">
                                            <ItemTemplate>
                                                <itemstyle horizontalalign="Center" />
                                                <headerstyle horizontalalign="Center" />
                                                <asp:Label ID="lblreason" Text='<%# Eval("Permission_Reason")%>' runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="RECEIVED DATE" HeaderStyle-CssClass="empheader">
                                            <ItemTemplate>
                                                <asp:Label ID="lblPrev_Perm_ReceivedDate" Text='<%# Eval("Permission_AppliedDate")%>' runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <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 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 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">
                            </div>
                            <div class="col-md-6">
                                <div class="pull-right-button">
                                    <asp:LinkButton ID="btn_Modify" CssClass="btn save-btn fa-floppy-o" runat="server"
                                        OnClick="btn_Modify_Click" OnClientClick="if(Validation()) $find('popupProgress').show();else return false;" />
                                    <asp:LinkButton ID="btn_print" CssClass="btn save-btn fa-print" runat="server"
                                        OnClick="btn_print_Click" Visible="false" Text="&nbsp;&nbsp;Print" />
                                    <asp:LinkButton ID="btn_Delete" CssClass="btn save-btn fa-trash-o" runat="server"
                                        OnClick="btn_Delete_Click" OnClientClick="return Confirm()" CausesValidation="false"
                                        TabIndex="11" />
                                    <asp:LinkButton ID="btn_Cancel" CssClass="btn save-btn fa-angle-left" runat="server"
                                        CausesValidation="False" OnClick="btn_Cancel_Click" />
                                </div>
                            </div>
                        </div>
                        <asp:HiddenField ID="PolicyExistsEmployees" runat="server" />
                        <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>

    <script type="text/javascript">
        function Confirm() {
            // return confirm(ConfirmSave);
            return confirm(ConformDelete);
        }
    </script>



</asp:Content>
