<%@ page title="" language="C#" autoeventwireup="true" maintainscrollpositiononpostback="true" inherits="PopUp_OTSanction, App_Web_3siecbin" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" runat="server" id="htmlOTpop">
<head id="Head1" runat="server">
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
        name="viewport" />
    <!--[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]-->
    <style type="text/css">
        .modalBackground  
    {         
        background-color: #336699;  
        filter: alpha(opacity=80);  
        opacity: 0.8;  
    }     
    </style>
    <link href="../css/ProgressBar.css" type="text/html" rel="Stylesheet" />
    <link id="stylebootstrap" rel="stylesheet" runat="server" type="text/css" />
    <link id="stylefontawesome" rel="stylesheet" runat="server" type="text/css" />
    <link id="styleAdminLTE" rel="stylesheet" runat="server" type="text/css" />
    <link id="stylecustom" rel="stylesheet" runat="server" type="text/css" />
    <link id="styledatepicker3" rel="stylesheet" runat="server" type="text/css" />
    <link id="styledaterangepicker" rel="stylesheet" runat="server" type="text/css" />
    <script language="javascript" type="text/javascript" src="../js/Popup.js"></script>
    <script language="javascript" type="text/javascript" src="../js/chkbox_delete.js"></script>
    <script type="text/javascript" src="../js/fancydropdown.js" language="jscript"></script>
    <script language="javascript" type="text/javascript" src="../js/lockkeys.js"></script>
    <script src="../plugins/datepicker/jquery-1.11.1.min.js"></script>
    <script src="../plugins/jQuery/jQuery-2.1.4.min.js" type="text/javascript"></script>
    <script src="../plugins/jquery-ui.min.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 src="../plugins/daterangepicker/moment.js" type="text/javascript"></script>
    <link href="../dist/css/fonts.css" rel="stylesheet" type="text/css" />
    <script src="../plugins/input-mask/jquery.inputmask.js"></script>
    <script src="../plugins/input-mask/jquery.inputmask.date.extensions.js"></script>
    <script src="../plugins/input-mask/jquery.inputmask.extensions.js"></script>
    <style type="text/css">
        .FixedHeader {
            position: absolute;
            font-weight: bold;
        }

        .textbox_short11 {
            BORDER-RIGHT: #c5c5c5 0px solid;
            BORDER-TOP: #c5c5c5 0px solid;
            FONT-SIZE: 11px;
            BORDER-LEFT: #c5c5c5 0px solid;
            COLOR: #1f4061;
            BORDER-BOTTOM: #c5c5c5 0px solid;
            FONT-FAMILY: MS Sans Serif,Arial;
            HEIGHT: 17px;
            WIDTH: 50px;
        }
    </style>
    <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>
        function DynamicDatePicker(Format, txtBoxId) {
            $("#" + txtBoxId).datetimepicker({ format: "HH:mm" });
        }
        function DynamicDatePickerForTime(Format, txtBoxId) {
            $("#" + txtBoxId).datetimepicker({ format: "HH:mm" });
        }
    </script>
    <script type="text/javascript">
        var AlertMsg = "Are you sure to Save ?";
        function validate() {
            var cmt = confirm(AlertMsg);
            if (cmt == true) {
                return true;
            }
            else {
                return false;
            }
        }
        function DynamicTimePicker(txtBoxId) {
            try {
                var rangeDemoFormat = "HH:mm";
                $(function () {
                    $("#" + txtBoxId).datetimepicker({ format: rangeDemoFormat }
                    );
                });
            }
            catch (err) {
            }
        }
        function ValidateOTHours(txtBoxID) {
            var splittedValue = document.aspnetForm.txtBoxID.value.split(":");
            if (splittedValue.length < 2) {
                alert("Enter valid OT Hours In");
                document.aspnetForm.txtBoxID.focus();
                return false;
            }
            else if (splittedValue[0].length < 2) {
                alert("Enter valid TO Hours In");
                document.aspnetForm.txtBoxID.focus();
                return false;
            }
            else if (splittedValue[1].length < 2) {
                alert("Enter valid OT Hours In");
                document.aspnetForm.txtBoxID.focus();
                return false;
            }
        }
        function ValidateGridControl() {
            var isValid = false;
            var gridView = document.getElementById('<%= grv_EmployeeOTSanction.ClientID %>');
            var isChecked = false;
            for (var i = 1; i < gridView.rows.length; i++) {
                //debugger;
                var inputs = gridView.rows[i].getElementsByTagName("INPUT");
                //alert(i);
                //for (var j = 0; j < inputs.length; j++) {
                //    alert("Type:" + inputs[j].type + " ;ID:" + j);

                //}
                if (inputs != null) {
                    if (inputs[0].type == "checkbox" && inputs[0].checked === true) {
                        isChecked = true;
                        if (inputs[1].type == "text") {
                            if (inputs[1].value != "") {
                                var splittedValue = inputs[1].value.split(":");
                                if (splittedValue.length < 2) {
                                    alert("Enter Valid Time in the following format hh:mm of record " + i);
                                    inputs[1].focus();
                                    gridView.rows[i].style.backgroundColor = "aqua";
                                    return false;
                                }
                                else if (splittedValue[0].length < 2) {
                                    alert("Enter Valid Time in the following format hh:mm of record " + i);
                                    inputs[1].focus();
                                    gridView.rows[i].style.backgroundColor = "aqua";
                                    return false;
                                }
                                else if (splittedValue[1].length < 2) {
                                    alert("Enter Valid Time in the following format hh:mm of record " + i);
                                    inputs[1].focus();
                                    gridView.rows[i].style.backgroundColor = "aqua";
                                    return false;
                                }
                                var HoursToMinutes = splittedValue[0] * 60;
                                HoursToMinutes = parseInt(HoursToMinutes) + parseInt(splittedValue[1]);
                                var label = inputs[1].parentNode.getElementsByTagName("SPAN")[0];
                                var spanValue = label.textContent;
                                var splittedValue1 = spanValue.split(":");
                                var actHoursToMinutes = splittedValue1[0] * 60;
                                actHoursToMinutes = parseInt(actHoursToMinutes) + parseInt(splittedValue1[1]);
                                //alert(HoursToMinutes + " Actual:" + actHoursToMinutes);
                                if (actHoursToMinutes < HoursToMinutes) {
                                    alert("Modified OT Shoud not be greater than Actual OT of record " + i);
                                    inputs[1].focus();
                                    gridView.rows[i].style.backgroundColor = "aqua";

                                    return false;
                                }
                            }
                            else {
                                alert("Enter value in Modified OT field of record " + i);
                                inputs[1].focus();
                                gridView.rows[i].style.backgroundColor = "aqua";
                                return false;
                            }
                        }
                        if (inputs[2].type == "text") {
                            if (inputs[2].value != "") {
                                var splittedValue = inputs[2].value.split(":");
                                if (splittedValue.length < 2) {
                                    alert("Enter Valid Time in the following format hh:mm of record " + i);
                                    inputs[2].focus();
                                    gridView.rows[i].style.backgroundColor = "aqua";
                                    return false;
                                }
                                else if (splittedValue[0].length < 2) {
                                    alert("Enter Valid Time in the following format hh:mm of record " + i);
                                    inputs[2].focus();
                                    gridView.rows[i].style.backgroundColor = "aqua";
                                    return false;
                                }
                                else if (splittedValue[1].length < 2) {
                                    alert("Enter Valid Time in the following format hh:mm of record " + i);
                                    inputs[2].focus();
                                    gridView.rows[i].style.backgroundColor = "aqua";
                                    return false;
                                }
                                var HoursToMinutes = splittedValue[0] * 60;
                                HoursToMinutes = parseInt(HoursToMinutes) + parseInt(splittedValue[1]);
                                var label = inputs[2].parentNode.getElementsByTagName("SPAN")[0];
                                var spanValue = label.textContent;
                                var splittedValue1 = spanValue.split(":");
                                var actHoursToMinutes = splittedValue1[0] * 60;
                                actHoursToMinutes = parseInt(actHoursToMinutes) + parseInt(splittedValue1[1]);
                                //alert(HoursToMinutes + " Actual:" + actHoursToMinutes);
                                if (actHoursToMinutes < HoursToMinutes) {
                                    alert("Modified OT Shoud not be greater than Actual OT of record " + i);
                                    inputs[2].focus();
                                    gridView.rows[i].style.backgroundColor = "aqua";
                                    return false;
                                }
                            }
                            else {
                                alert("Enter value in Modified OT field of record " + i);
                                inputs[2].focus();
                                gridView.rows[i].style.backgroundColor = "aqua";
                                return false;
                            }
                        }
                        if (inputs[3].type == "text") {
                            if (inputs[3].value != "") {
                                var splittedValue = inputs[3].value.split(":");
                                if (splittedValue.length < 2) {
                                    alert("Enter Valid Time in the following format hh:mm of record " + i);
                                    inputs[3].focus();
                                    gridView.rows[i].style.backgroundColor = "aqua";
                                    return false;
                                }
                                else if (splittedValue[0].length < 2) {
                                    alert("Enter Valid Time in the following format hh:mm of record " + i);
                                    inputs[3].focus();
                                    gridView.rows[i].style.backgroundColor = "aqua";
                                    return false;
                                }
                                else if (splittedValue[1].length < 2) {
                                    alert("Enter Valid Time in the following format hh:mm of record " + i);
                                    inputs[3].focus();
                                    gridView.rows[i].style.backgroundColor = "aqua";
                                    return false;
                                }
                                var HoursToMinutes = splittedValue[0] * 60;
                                HoursToMinutes = parseInt(HoursToMinutes) + parseInt(splittedValue[1]);
                                var label = inputs[3].parentNode.getElementsByTagName("SPAN")[0];
                                var spanValue = label.textContent;
                                var splittedValue1 = spanValue.split(":");
                                var actHoursToMinutes = splittedValue1[0] * 60;
                                actHoursToMinutes = parseInt(actHoursToMinutes) + parseInt(splittedValue1[1]);
                                //alert(HoursToMinutes + " Actual:" + actHoursToMinutes);
                                if (actHoursToMinutes < HoursToMinutes) {
                                    alert("Modified OT Shoud not be greater than Actual OT of record " + i);
                                    inputs[3].focus();
                                    gridView.rows[i].style.backgroundColor = "aqua";
                                    return false;
                                }
                            }
                            else {
                                alert("Enter value in Modified OT field of record " + i);
                                inputs[3].focus();
                                gridView.rows[i].style.backgroundColor = "aqua";
                                return false;
                            }
                        }
                        //return true;
                    }
                }
            }
            if (isChecked == false) {
                alert("Please select atleast one record!");
                return false;
            }
            return true;
        }
        function ValidateGridControl1() {
            //Reference the GridView.
            debugger;
            var grid = document.getElementById("<%=grv_EmployeeOTSanction.ClientID %>");

            //Reference all INPUT elements.
            var inputs = grid.getElementsByTagName("INPUT");
            var isChecked = false;
            //Set the Validation Flag to True.
            var isValid = true;
            for (var i = 0; i < inputs.length; i++) {
                //If TextBox.             
                if (inputs[i].type == "checkbox" && inputs[i].checked) {
                    isChecked = true;
                    if (inputs[i].type == "text") {
                        //Reference the Error Label.
                        var label = inputs[i].parentNode.getElementsByTagName("SPAN")[0];

                        var id = inputs[i].id;
                        //If Blank, display Error Label.
                        if (inputs[i].value == "") {
                            alert("Enter valid data");
                            //label.style.display = "block";
                            isValid = false;
                        }
                        else {

                        }
                    }
                }
            }
            if (!isChecked) {
                alert("Please select atleast one record!")
                isValid = false;
            }
            return isValid;
        }
    </script>
</head>
<body>
    <form id="aspnetForm" runat="server">
        <cc1:ToolkitScriptManager ID="sm" runat="server"></cc1:ToolkitScriptManager>
        <asp:UpdatePanel ID="upLeave" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:Panel ID="pnlProgress" runat="server" Style="display: none;">
                    <asp:Panel ID="pnlLoading" runat="server" HorizontalAlign="center">
                        <div class="InsideGroupLeavepolicyProgressBar">
                            <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"
                                    Text="Please Wait..." Font-Bold="true" Font-Size="12px" Font-Italic="true" Font-Family="Arial"></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="modalBackground" popupcontrolid="pnlProgress" behaviorid="popupProgress">
                </cc1:modalpopupextender>
            </ContentTemplate>
            <Triggers>
                <asp:PostBackTrigger ControlID="btn_Approved" />
                <asp:PostBackTrigger ControlID="btn_Reject" />
                <asp:PostBackTrigger ControlID="btnApprovalAll" />
            </Triggers>
        </asp:UpdatePanel>
        <div id="Div1" runat="server">
            <div class="content">

                <div class="inr-ftr">
                    <div class="row" style="padding-left: 15px; padding-right: 15px">
                        <div class="col-sm-6">
                            <h5 class="pull-left">
                                <span>
                                    <asp:Label ID="lblheader" Text="OverTime Approval" runat="server"></asp:Label></span></h5>
                        </div>
                        <div class="clearfix">
                        </div>
                    </div>
                </div>
                <div class="emp-filter">
                    <div class="form-horizontal">
                        <div class="row form-group">
                            <div class="col-md-12">
                                <div class="pull-right-button">
                                    <asp:LinkButton ID="btn_Approved" runat="server" CssClass="btn save-btn fa-thumbs-o-up"
                                        OnClientClick="if(ValidateGridControl()) $find('popupProgress').show();else return false;"
                                        OnCommand="btn_Approved_Command" CommandName="Single" />
                                    <asp:LinkButton ID="btn_Reject" runat="server" CssClass="btn save-btn fa-thumbs-o-down"
                                        OnClientClick="if(ValidateGridControl()) $find('popupProgress').show();else return false;" OnCommand="btn_Approved_Command" CommandName="Rejected" />
                                    <asp:LinkButton ID="btnApprovalAll" runat="server" Text="&nbsp;&nbsp;Approve All Levels" CssClass="btn save-btn fa-thumbs-o-up"
                                        OnClientClick="if(ValidateGridControl()) $find('popupProgress').show();else return false;" OnCommand="btn_Approved_Command" CommandName="All" Visible="false" />
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-12">
                                <div class="table-responsive" style="height: 400px; width: 100%; overflow-y: auto;">
                                    <asp:GridView ID="grv_EmployeeOTSanction" runat="server" DataKeyNames="Employee_Code_Id" Width="100%"
                                        AutoGenerateColumns="false" OnSorting="grv_OTSanctionSorting" OnRowDataBound="grv_EmployeeOTSanction_RowDataBound"
                                        CssClass="table das-table1" OnRowCancelingEdit="grv_EmployeeOTSanction_RowCancelingEdit"
                                        OnRowEditing="grv_EmployeeOTSanction_RowEditing" OnRowUpdating="grv_EmployeeOTSanction_RowUpdating">
                                        <Columns>
                                            <%--1.Checkbox--%>
                                            <asp:TemplateField HeaderStyle-CssClass="empheader" ItemStyle-CssClass="table-icons">
                                                <HeaderTemplate>
                                                    <asp:CheckBox ID="checkall" runat="server" AutoPostBack="true" OnCheckedChanged="grv_CheckAll_CheckedChanged" />
                                                    <asp:Label ID="lblall" runat="server"></asp:Label>
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="deletethis" runat="server" AutoPostBack="true" Checked='<%# (Eval("SelectedRecords").ToString() == "1" ? true : false) %>'
                                                        OnCheckedChanged="grv_Check_CheckedChanged"></asp:CheckBox>
                                                </ItemTemplate>
                                                <ItemStyle HorizontalAlign="Center" Width="6%" />
                                            </asp:TemplateField>
                                            <%--2.RecordID--%>
                                            <asp:TemplateField HeaderText="Process Record ID" Visible="False" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblProc_RecordId" runat="server" Text='<%#Eval("Process_Rec_ID") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--3.Employeee ID--%>
                                            <asp:TemplateField HeaderText="Employee Id" SortExpression="Employee_Code_Id" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label Width="60px" ID="lblEmployeeCodeId" runat="server" Text='<%# Eval("Employee_Code_Id") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--4.Employee Name--%>
                                            <asp:TemplateField HeaderText="Employee Name" SortExpression="Employee_Firstname"
                                                HeaderStyle-CssClass="empheader" ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label Width="100px" ID="lblEmployeeName" runat="server" Text='<%# Eval("Employee_Firstname") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--5.Level Name--%>
                                            <asp:TemplateField HeaderText="Level Name" SortExpression="Level Name" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label Width="100px" ID="lblLevelName" runat="server" Text='<%# Eval("Level Name") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--6.Date--%>
                                            <asp:TemplateField HeaderText="Date" SortExpression="Shiftdate" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons" ItemStyle-Width="100px">
                                                <ItemTemplate>
                                                    <asp:Label Width="80px" ID="lblOTDate" Text='<%#Eval("Shiftdate") %>' runat="server"></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--7.Day Type--%>
                                            <asp:TemplateField HeaderText="Day Type" SortExpression="Day Type" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label Width="60px" ID="lblDayType" Text='<%#Eval("Day Type") %>' runat="server"></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--8.Actual OT--%>
                                            <asp:TemplateField HeaderText="Actual OT" SortExpression="Actual OT" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label Width="40px" ID="lblHoursOT" runat="server" Text='<%# Eval("Actual OT") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--9.Modified OT--%>
                                            <asp:TemplateField HeaderText="Modified OT" SortExpression="Modified OT"
                                                HeaderStyle-CssClass="empheader" ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtHoursOT" runat="server" Text='<%# Eval("Modified OT") %>' CssClass="form-control"
                                                        Style="width: 60px !important" MaxLength="5" onDrop="return false;" onpaste="return false;" onkeypress="return number_colon(event,this);"></asp:TextBox>
                                                    <asp:Label Width="40px" ID="lblActual1" runat="server" Text='<%# Eval("Actual OT") %>' Style="display: none"></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--10.Actual Special OT--%>
                                            <asp:TemplateField HeaderText="Actual Special OT1" SortExpression="Actual Special OT1" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblSPEC_NormOT1" runat="server" Text='<%# Eval("Actual Special OT1") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--11.Modified Special OT--%>
                                            <asp:TemplateField HeaderText="Modified Special OT1" SortExpression="Modified Special OT1"
                                                HeaderStyle-CssClass="empheader" ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtModified_Spec_NormOTHrs1" runat="server" Text='<%# Eval("Modified Special OT1") %>' CssClass="form-control"
                                                        Style="width: 60px !important" MaxLength="5" onDrop="return false;" onpaste="return false;" onkeypress="return number_colon(event,this);"></asp:TextBox>
                                                    <asp:Label ID="lblSPEC_NormOT1Actual" runat="server" Text='<%# Eval("Actual Special OT1") %>' Style="display: none"></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--12.Actual Specila OT2--%>
                                            <asp:TemplateField HeaderText="Actual Special OT2" SortExpression="Actual Special OT2" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label Width="40px" ID="lblSPEC_NormOT2" runat="server" Text='<%# Eval("Actual Special OT2") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--13.Modified Specila OT2--%>
                                            <asp:TemplateField HeaderText="Modified Special OT2" SortExpression="Modified Special OT2"
                                                HeaderStyle-CssClass="empheader" ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtModified_Spec_NormOTHrs2" runat="server" Text='<%# Eval("Modified Special OT2") %>' CssClass="form-control"
                                                        Style="width: 60px !important" MaxLength="5" onDrop="return false;" onpaste="return false;" onkeypress="return number_colon(event,this);"></asp:TextBox>
                                                    <asp:Label Width="40px" ID="lblSPEC_NormOT2Actual" runat="server" Text='<%# Eval("Actual Special OT2") %>' Style="display: none"></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--14.Shift Allowance--%>
                                            <%--Allowances field start--%>
                                            <asp:TemplateField HeaderText="Actual Shift Allowances" SortExpression="Shift_Allow" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblShift_Allow" runat="server" Text='<%# Eval("Shift_Allow") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--15.Modified Shift Allowance--%>
                                            <asp:TemplateField HeaderText="Modified Shift Allowances" SortExpression="Modified_Shift_Allow"
                                                HeaderStyle-CssClass="empheader" ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtModified_Shift_Allow" runat="server" Text='<%# Eval("Modified_Shift_Allow") %>' CssClass="form-control"
                                                        Width="60px" MaxLength="5" onDrop="return false;" onpaste="return false;" onkeypress="return number_dot_Without_Dollar(event,this);"
                                                        onchange="return onChangeHalfDay(event,this);"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--16.Actual Food Allowance--%>
                                            <asp:TemplateField HeaderText="Actual Food Allowances" SortExpression="Food_Allow" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblFood_Allow" runat="server" Text='<%# Eval("Food_Allow") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--17.Modified Food Allowance--%>
                                            <asp:TemplateField HeaderText="Modified Food Allowances" SortExpression="Modified_Food_Allow"
                                                HeaderStyle-CssClass="empheader" ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtModified_Food_Allow" runat="server" Text='<%# Eval("Modified_Food_Allow") %>' CssClass="form-control"
                                                        Width="60px" MaxLength="5" onDrop="return false;" onpaste="return false;" onkeypress="return number_dot_Without_Dollar(event,this);"
                                                        onchange="return onChangeHalfDay(event,this);"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--18.Actual Meal Allowance--%>
                                            <asp:TemplateField HeaderText="Actual Meal Allowances" SortExpression="Meal_Allow" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblMeal_Allow" runat="server" Text='<%# Eval("Meal_Allow") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--19.Modified Meal Allowance--%>
                                            <asp:TemplateField HeaderText="Modified Meal Allowances" SortExpression="Modified_Meal_Allow"
                                                HeaderStyle-CssClass="empheader" ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtModified_Meal_Allow" runat="server" Text='<%# Eval("Modified_Meal_Allow") %>' CssClass="form-control"
                                                        MaxLength="5" onDrop="return false;" onpaste="return false;" onkeypress="return number_dot_Without_Dollar(event,this);"
                                                        onchange="return onChangeHalfDay(event,this);"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--20.Actual SH Allowances--%>
                                            <asp:TemplateField HeaderText="Actual SH Allowances" SortExpression="SH_Allow" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblSH_Allow" runat="server" Text='<%# Eval("SH_Allow") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--21.Modified SH Allowance--%>
                                            <asp:TemplateField HeaderText="Modified SH Allowances" SortExpression="Modified_SH_Allow"
                                                HeaderStyle-CssClass="empheader" ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtModified_SH_Allow" runat="server" Text='<%# Eval("Modified_SH_Allow") %>' CssClass="form-control"
                                                        MaxLength="5" onDrop="return false;" onpaste="return false;" onkeypress="return number_dot_Without_Dollar(event,this);"
                                                        onchange="return onChangeHalfDay(event,this);"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--allowance field end--%>
                                            <%--22.Status--%>
                                            <asp:TemplateField HeaderText="Status" SortExpression="OverTimeStatus" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblOTStatus" runat="server" Text='<%# Eval("OverTimeStatus") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--23.Overtime Mins--%>
                                            <asp:TemplateField HeaderText="Status" Visible="False" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblOTMins" runat="server" Text='<%# Eval("OTMins") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                        <EmptyDataTemplate>
                                            <asp:Label ID="lblNoRecords" runat="server" OnLoad="GetEmptyText"></asp:Label>
                                        </EmptyDataTemplate>
                                        <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>
            </div>
        </div>
    </form>
</body>
</html>
