<%@ page language="C#" autoeventwireup="true" maintainscrollpositiononpostback="true" inherits="Transactions_PopUp_EmployeeOTSanction, App_Web_135t4hyy" %>

<!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" />

    <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" />

    <title>TimeCheck</title>
    <%--<link rel="stylesheet" type="text/css" href="../css/Calender.css" />--%>
    <%--<link rel="stylesheet" type="text/css" id="anytimestyle" runat="server" href="../css/anytime.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 language="javascript" type="text/javascript" src="../js/calendar.js"></script>--%>

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

    <%--<script language="javascript" type="text/javascript" src="../js/calendar-setup.js"></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">
        .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;
            }
        }

        //$("ctl00_BodyContentPH_GridView1_cell0_10_txt_BonusHrs").AnyTime_picker({format:rangeDemoFormat});
    </script>

</head>
<body>
    <form id="aspnetForm" runat="server">
        <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="col-sm-6">
                            <div class="pull-right">
                                <h6>
                                    <span>
                                        <asp:Label ID="lblle1" runat="server" Text="Red - OT Hours Got Modified" ForeColor="red"></asp:Label></span>
                                </h6>
                            </div>
                        </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="table-responsive">
                                   <asp:GridView ID="grv_EmployeeOTSanction" runat="server" DataKeyNames="Employee_Code_Id"
                                        AllowPaging="true" AutoGenerateColumns="false" PageSize="15" OnPageIndexChanging="grv_OTSanction_PageIndexChanging"
                                        OnSorting="grv_OTSanctionSorting" OnRowDataBound="grv_EmployeeOTSanction_RowDataBound"
                                        CssClass="table das-table1" OnRowCancelingEdit="grv_EmployeeOTSanction_RowCancelingEdit"
                                        OnRowEditing="grv_EmployeeOTSanction_RowEditing" OnRowUpdating="grv_EmployeeOTSanction_RowUpdating">
                                        <Columns>
                                            <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>
                                            <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>
                                           
                                            <asp:TemplateField HeaderText="Employee Id" SortExpression="Employee_Code_Id" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblEmployeeCodeId" runat="server" Text='<%# Eval("Employee_Code_Id") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Employee Name" SortExpression="Employee_Firstname"
                                                HeaderStyle-CssClass="empheader" ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblEmployeeName" runat="server" Text='<%# Eval("Employee_Firstname") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            
                                            <asp:TemplateField HeaderText="Level Name" SortExpression="Level Name" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblLevelName" runat="server" Text='<%# Eval("Level Name") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                             <asp:TemplateField HeaderText="Date" SortExpression="Date" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblOTDate" Text='<%#Eval("Date") %>' runat="server"></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Actual Normal Day OT" SortExpression="ActHrsOT" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblHoursOT" runat="server" Text='<%# Eval("ActHrsOT") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Modified Normal day OT" SortExpression="HrsOT1"
                                                HeaderStyle-CssClass="empheader" ItemStyle-CssClass="table-icons">
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="txtHoursOT" runat="server" Text='<%# Eval("HrsOT") %>' CssClass="form-control"
                                                        MaxLength="5" onDrop="return false;" onpaste="return false;" onkeypress="return number_colon(event,this);"></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:Label ID="lblHoursOT1" runat="server" Text='<%# Bind("HrsOT") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Actual Week Off OT" SortExpression="ActOffOT" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblWeeklyoffOT" runat="server" Text='<%# Eval("ActOffOT") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Modified Week Off OT" SortExpression="HrsOT1"
                                                HeaderStyle-CssClass="empheader" ItemStyle-CssClass="table-icons">
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="txtWeeklyoffOT" runat="server" Text='<%# Eval("OffOT") %>' CssClass="form-control"
                                                        MaxLength="5" onDrop="return false;" onpaste="return false;" onkeypress="return number_colon(event,this);"></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:Label ID="lblWeeklyoffOT1" runat="server" Text='<%# Eval("OffOT") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Actual Holiday OT" SortExpression="ActHolOT" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblHolidayOT" runat="server" Text='<%# Eval("ActHolOT") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Modified Holiday OT" SortExpression="HrsOT1"
                                                HeaderStyle-CssClass="empheader" ItemStyle-CssClass="table-icons">
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="txtHolidayOT" runat="server" Text='<%# Eval("HolOT") %>' CssClass="form-control"
                                                        MaxLength="5" onDrop="return false;" onpaste="return false;" onkeypress="return number_colon(event,this);"></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:Label ID="lblHoliday1" runat="server" Text='<%# Eval("HolOT") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>



                                            <asp:TemplateField HeaderText="Actual Week Day Special OT 1" SortExpression="SPEC_NormOT1" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblSPEC_NormOT1" runat="server" Text='<%# Eval("SPEC_NormOT1") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Modified Week Day Special OT 1" SortExpression="Modified_Spec_NormOTHrs1"
                                                HeaderStyle-CssClass="empheader" ItemStyle-CssClass="table-icons">
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="txtModified_Spec_NormOTHrs1" runat="server" Text='<%# Eval("Modified_Spec_NormOTHrs1") %>' CssClass="form-control"
                                                        MaxLength="5" onDrop="return false;" onpaste="return false;" onkeypress="return number_colon(event,this);"></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:Label ID="lblModified_Spec_NormOTHrs1" runat="server" Text='<%# Eval("Modified_Spec_NormOTHrs1") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Actual Week Day Special OT 2" SortExpression="SPEC_NormOT2" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblSPEC_NormOT2" runat="server" Text='<%# Eval("SPEC_NormOT2") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Modified Week Day Special OT 2" SortExpression="Modified_Spec_NormOTHrs2"
                                                HeaderStyle-CssClass="empheader" ItemStyle-CssClass="table-icons">
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="txtModified_Spec_NormOTHrs2" runat="server" Text='<%# Eval("Modified_Spec_NormOTHrs2") %>' CssClass="form-control"
                                                        MaxLength="5" onDrop="return false;" onpaste="return false;" onkeypress="return number_colon(event,this);"></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:Label ID="lblModified_Spec_NormOTHrs2" runat="server" Text='<%# Eval("Modified_Spec_NormOTHrs2") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>


                                             <asp:TemplateField HeaderText="Actual Week Off Special OT 1" SortExpression="SPEC_OffOT1" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblSPEC_OffOT1" runat="server" Text='<%# Eval("SPEC_OffOT1") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Modified Week Off Special OT 1" SortExpression="Modified_Spec_OffOTHrs1"
                                                HeaderStyle-CssClass="empheader" ItemStyle-CssClass="table-icons">
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="txtModified_Spec_OffOTHrs1" runat="server" Text='<%# Eval("Modified_Spec_OffOTHrs1") %>' CssClass="form-control"
                                                        MaxLength="5" onDrop="return false;" onpaste="return false;" onkeypress="return number_colon(event,this);"></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:Label ID="lblModified_Spec_OffOTHrs1" runat="server" Text='<%# Eval("Modified_Spec_OffOTHrs1") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Actual Week OFF Special OT 2" SortExpression="SPEC_OffOT2" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblSPEC_OffOT2" runat="server" Text='<%# Eval("SPEC_OffOT2") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Modified Week Off Special OT 2" SortExpression="Modified_Spec_OffOTHrs2"
                                                HeaderStyle-CssClass="empheader" ItemStyle-CssClass="table-icons">
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="txtModified_Spec_OffOTHrs2" runat="server" Text='<%# Eval("Modified_Spec_OffOTHrs2") %>' CssClass="form-control"
                                                        MaxLength="5" onDrop="return false;" onpaste="return false;" onkeypress="return number_colon(event,this);"></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:Label ID="lblModified_Spec_OffOTHrs2" runat="server" Text='<%# Eval("Modified_Spec_OffOTHrs2") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>



                                             <asp:TemplateField HeaderText="Actual Holiday Special OT 1" SortExpression="SPEC_HOLOT1" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblSPEC_HOLOT1" runat="server" Text='<%# Eval("SPEC_HOLOT1") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Modified Holiday Special OT 1" SortExpression="Modified_Spec_HolOTHrs1"
                                                HeaderStyle-CssClass="empheader" ItemStyle-CssClass="table-icons">
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="txtModified_Spec_HolOTHrs1" runat="server" Text='<%# Eval("Modified_Spec_HolOTHrs1") %>' CssClass="form-control"
                                                        MaxLength="5" onDrop="return false;" onpaste="return false;" onkeypress="return number_colon(event,this);"></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:Label ID="lblModified_Spec_HolOTHrs1" runat="server" Text='<%# Eval("Modified_Spec_HolOTHrs1") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Actual Holiday Special OT 2" SortExpression="SPEC_HOLOT2" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblSPEC_HOLOT2" runat="server" Text='<%# Eval("SPEC_HOLOT2") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Modified Holiday Special OT 2" SortExpression="Modified_Spec_HolOTHrs2"
                                                HeaderStyle-CssClass="empheader" ItemStyle-CssClass="table-icons">
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="txtModified_Spec_HolOTHrs2" runat="server" Text='<%# Eval("Modified_Spec_HolOTHrs2") %>' CssClass="form-control"
                                                        MaxLength="5" onDrop="return false;" onpaste="return false;" onkeypress="return number_colon(event,this);"></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:Label ID="lblModified_Spec_HolOTHrs2" runat="server" Text='<%# Eval("Modified_Spec_HolOTHrs2") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>










                                            <asp:TemplateField HeaderText="Status" SortExpression="OverTimeStatus" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblOTStatus" runat="server" Text='<%# Eval("OverTimeStatus") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <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>
                                            <asp:TemplateField HeaderText="Edit" ShowHeader="False" HeaderStyle-CssClass="empheader"
                                                ItemStyle-CssClass="table-icons">
                                                <EditItemTemplate>
                                                    <asp:LinkButton ID="lnkUpdate" runat="server" CausesValidation="True" CommandName="Update"
                                                        Text="Update" OnClientClick="return validate();"></asp:LinkButton>
                                                    <asp:LinkButton ID="lnkCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                                                        Text="Cancel"></asp:LinkButton>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="lnkEdit" runat="server" CausesValidation="false" CommandName="Edit"
                                                        Text="Edit"></asp:LinkButton>
                                                </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 class="row form-group">
                            <div class="col-md-12">
                                <div class="pull-right-button">
                                    <asp:LinkButton ID="btn_Pending" runat="server" CssClass="btn save-btn fa-hand-o-up"
                                        OnClick="btn_Pending_Click" Visible="false" />
                                    <asp:LinkButton ID="btn_Approved" runat="server" CssClass="btn save-btn fa-thumbs-o-up"
                                        OnClick="btn_Approved_Click" />
                                    <asp:LinkButton ID="btn_Forwarded" runat="server" CssClass="btn save-btn fa-angle-double-right"
                                        OnClick="btn_Forwarded_Click" />
                                    <asp:LinkButton ID="btn_Reject" runat="server" CssClass="btn save-btn fa-thumbs-o-down"
                                        OnClick="btn_Reject_Click" />
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
</body>
</html>
