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

<%--<%@ Register Src="../UserControls/TA_uc_OrgLevelFilter_Updated_WithoutMandatory.ascx" TagName="TA_uc_OrgLevel_Filter"
    TagPrefix="uc1" %>--%>

<%@ Register Src="~/UserControls/TA_uc_OrganizationLevels.ascx" TagName="OrganizationLevel"
    TagPrefix="uc" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="DevExpress.Web.v14.2" Namespace="DevExpress.Web" TagPrefix="dxw" %>
<asp:Content ContentPlaceHolderID="BodyContentPH" ID="rptMonthlyAttendanceReport"
    runat="server">

    <!--[if gt IE 5.5]>
	<link rel="stylesheet" type="text/css" href="../css/anytimeIE.css" />
		<link rel="stylesheet" type="text/css" href="../css/ProgressforIE.css" />
 <![endif]-->

    <script type="text/javascript" src="../bootstrap/js/1.4.3/jquery.min.js"></script>
    <script src="../bootstrap/js/1.8.5/jquery-ui.min.js" type="text/javascript"></script>

    <script type="text/javascript">

        $(function () {
            $("#<%= txtEmployeeId.ClientID %>").autocomplete({
                source: function (request, response) {
                    $.getJSON("../AutoCompleteByEmployeeId.ashx?EmpAutoid=" + '<%= Convert.ToString(Session["EmpAutoID"]) %>', {
                        term: extractLast(request.term)
                    }, response);
                },
                search: function () {
                    var term = extractLast(this.value);
                    if (term.length < 1) {
                        return false;
                    }
                },
                focus: function () {
                    return false;
                },
                select: function (event, ui) {
                    var terms = split(this.value);
                    terms.pop();
                    terms.push(ui.item.value);
                    terms.push("");
                    this.value = terms.join(",");
                    return false;
                }
            });
            function split(val) {
                return val.split(/,\s*/);
            }
            function extractLast(term) {
                return split(term).pop();
            }
        });
            $(function () {
                $("#<%= txtEmployeeName.ClientID %>").autocomplete({
                    source: function (request, response) {
                        $.getJSON("../AutoCompleteByName.ashx?EmpAutoid=" + '<%= Convert.ToString(Session["EmpAutoID"]) %>', {
                            term: extractLast(request.term)
                        }, response);
                    },
                    search: function () {
                        var term = extractLast(this.value);
                        if (term.length < 1) {
                            return false;
                        }
                    },
                    focus: function () {
                        return false;
                    },
                    select: function (event, ui) {
                        var terms = split(this.value);
                        terms.pop();
                        terms.push(ui.item.value);
                        terms.push("");
                        this.value = terms.join(",");
                        return false;
                    }
                });
                function split(val) {
                    return val.split(/,\s*/);
                }
                function extractLast(term) {
                    return split(term).pop();
                }
            });
                window.onload = function () {
                    PageOnloadDate();
                };
    </script>
    <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 () {
            $('#ctl00_BodyContentPH_txtFromDate').datetimepicker({ format: document.getElementById('ctl00_BodyContentPH_Hidden1').value }
            );
            $('#ctl00_BodyContentPH_txtToDate').datetimepicker({ format: document.getElementById('ctl00_BodyContentPH_Hidden1').value }
            );
            $('#ctl00_BodyContentPH_txtMinWorkHours').datetimepicker({ format: 'HH:mm' }
            );
        });
    </script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#<%=txtEmployeeId.ClientID%>").autocomplete('../AutoCompleteByEmployeeId.ashx?EmpAutoid=' + '<%= Convert.ToString(Session["EmpAutoID"]) %>', {
                multiple: true,
                multipleSeparator: ",",
                width: 180,
                highlight: false,
                scroll: true,
                scrollHeight: 300,
                delay: 10
            });
        });
        $(document).ready(function () {
            $("#<%=txtEmployeeName.ClientID%>").autocomplete('../AutoCompleteByName.ashx?EmpAutoid=' + '<%= Convert.ToString(Session["EmpAutoID"]) %>', {
                multiple: true,
                multipleSeparator: " ,",
                width: 200,
                highlight: false,
                scroll: true,
                scrollHeight: 300,
                delay: 10
            });
        });
    </script>
    <div class="content-header" id="conHeader" runat="server">
        <h1 style="background-image: url(../dist/img/swipe-icon.png); background-repeat: no-repeat; padding-left: 35px">
            <asp:Label ID="lblMonthlyAttendanceReport" 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 class="inr-fil-text">
                        <asp:Label ID="lblFilter" runat="server" Text="Filters"></asp:Label>
                        <asp:Label ID="Label1" runat="server" Visible="false"></asp:Label>
                        <input id="Hidden3" type="hidden" value='<% Response.Write(Convert.ToString(Session["IDateFormat"])); %>' />
                    </div>
                </div>
                <div class="clearfix">
                </div>
            </div>
        </div>
        <div id="collapseOne">
            <div class="emp-filter">
                <div class="form-horizontal">
                    <asp:HiddenField ID="Hidden1" runat="server" />
                    <asp:HiddenField ID="hdnReportFilters" runat="server" />
                    <asp:HiddenField ID="hdnReportType1" runat="server" />
                    <asp:HiddenField ID="hdnCompanyId1" runat="server" />
                    <div id="divEmployeeDetails" runat="server">
                        <div class="row" style="display: none">
                            <div class="col-md-3">
                                <asp:Label ID="lblEmpSwipe" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:TextBox onpaste="return true" ID="txtSwipeCard" MaxLength="20" runat="server"
                                    CssClass="form-control" onkeypress="return acceptCharsNum_MaxLength(event,this,20,MaxLength);"></asp:TextBox>
                                <cc1:AutoCompleteExtender ID="acSwipeCardNo" runat="server" CompletionSetCount="10"
                                    CompletionListItemCssClass="item" CompletionListHighlightedItemCssClass="AutocompleteCSS"
                                    CompletionInterval="10" Enabled="true" MinimumPrefixLength="1" TargetControlID="txtSwipeCard"
                                    ServicePath="../WebServices/AutoCompleteExtender.asmx" ServiceMethod="GetCardNoForReports"
                                    CompletionListCssClass="autocomplete_completionListElement" FirstRowSelected="true">
                                </cc1:AutoCompleteExtender>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lblEmployeeName" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:TextBox onpaste="return true" ID="txtEmployeeName" runat="server" CssClass="form-control"
                                    Style="resize: none" TextMode="multiLine"></asp:TextBox>
                            </div>
                            <div class="col-md-1">
                            </div>
                            <div class="col-md-2">
                                <asp:Label ID="lblEmployeeId" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:TextBox onpaste="return true" ID="txtEmployeeId" runat="server" CssClass="form-control"
                                    Style="resize: none" TextMode="multiLine"></asp:TextBox>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lblEmpCategory" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddlEmpCatagory" runat="server" CssClass="form-control select2"
                                    AppendDataBoundItems="true">
                                    <asp:ListItem Value="0" Selected="True" Text="-Select-"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="col-md-1">
                            </div>
                            <div class="col-md-2">
                                <asp:Label ID="lblEmpType" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddlEmpType" runat="server" CssClass="form-control select2"
                                    AppendDataBoundItems="true">
                                    <asp:ListItem Value="0" Selected="True" Text="-Select-"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lblDesignation" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddlDesignation" runat="server" CssClass="form-control select2"
                                    AppendDataBoundItems="true">
                                    <asp:ListItem Value="0" Selected="True" Text="All"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="col-md-1">
                            </div>
                            <div class="col-md-2">
                                <asp:Label ID="lblGender" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddlGender" runat="server" CssClass="form-control select2">
                                    <asp:ListItem Value="Both" Text="Both"></asp:ListItem>
                                    <asp:ListItem Value="Male" Text="Male"></asp:ListItem>
                                    <asp:ListItem Value="Female" Text="Female"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                        </div>
                    </div>
                    <div class="row form-group">
                        <div class="col-md-2">
                            <asp:Label ID="lblShift" runat="server"></asp:Label>
                        </div>
                        <div class="col-md-3">
                            <asp:DropDownList ID="ddlShift" runat="server" CssClass="form-control select2">
                            </asp:DropDownList>
                        </div>
                        <div class="col-md-1">
                        </div>
                        <div class="col-md-2">
                            <asp:Label ID="lblMinimumWorkHours" runat="server" Style="margin-right: -9px"></asp:Label>
                        </div>
                        <div class="col-md-3">
                            <asp:TextBox onpaste="return true" ID="txtMinWorkHours" runat="server" CssClass="form-control"
                                MaxLength="5" onkeypress="return number_colon(event,this);"></asp:TextBox>
                        </div>
                    </div>
                    <div class="row form-group" runat="server" id="divProduct">
                        <div class="col-md-2">
                            <asp:Label ID="lblDataloading" runat="server"></asp:Label>
                        </div>
                        <div class="col-md-3">
                            <asp:DropDownList ID="ddlDataLoading" runat="server" CssClass="form-control select2">
                                <asp:ListItem Text="All" Selected="true" Value="0"></asp:ListItem>
                                <asp:ListItem Text="Holiday & Weekly off - Worked" Value="3"></asp:ListItem>
                                <asp:ListItem Text="Holiday - Worked" Value="1"></asp:ListItem>
                                <asp:ListItem Text="Weekly off - Worked" Value="2"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                        <div class="col-md-1">
                        </div>
                        <div class="col-md-2">
                            <asp:Label ID="lblReportType" runat="server"></asp:Label>
                        </div>
                        <div class="col-md-3" id="divproducts" runat="server">
                            <label class="radio">
                                <asp:RadioButtonList ID="rbReportType" CssClass="radio-primary" runat="server" RepeatDirection="Horizontal">
                                    <asp:ListItem Value="0" Text="Vertical" Selected="True"></asp:ListItem>
                                    <asp:ListItem Value="1" Text="Horizontal"></asp:ListItem>
                                </asp:RadioButtonList>
                            </label>
                        </div>
                        <div class="col-md-3" id="divCustom" runat="server">
                            <label class="radio">
                                <asp:RadioButtonList ID="rdbtnReport" CssClass="radio-primary" runat="server" RepeatDirection="Horizontal">
                                    <asp:ListItem Value="0" Text="Old" Selected="True"></asp:ListItem>
                                    <asp:ListItem Value="1" Text="New"></asp:ListItem>
                                </asp:RadioButtonList>
                            </label>
                        </div>
                    </div>
                    <div id="divdateTime" runat="server">
                        <div class="clearfix">
                        </div>
                        <div class="row">
                            <div class="row">
                                <div class="line16">
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lblDateFilter" runat="server"></asp:Label>
                            </div>
                            <div class="Pad-left-7px">
                                <div class="col-md-2 Session-padLeftrtp">
                                    <asp:RadioButton ID="rbCustom" runat="server" CssClass="radioLeave radioLeave-primary"
                                        GroupName="rpt" onchange="ajaxGetDate(3);" Checked="true" />
                                </div>
                                <div class="col-md-2">
                                    <asp:RadioButton ID="rbpreviousweek" runat="server" CssClass="radioLeave radioLeave-primary"
                                        GroupName="rpt" onchange="ajaxGetDate(1);" />
                                </div>
                                <div class="col-md-2">
                                    <asp:RadioButton ID="rbThisweek" runat="server" CssClass="radioLeave radioLeave-primary"
                                        GroupName="rpt" onchange="ajaxGetDate(0);" />
                                </div>
                                <div class="col-md-2">
                                    <asp:RadioButton ID="rbpreviousMonth" runat="server" CssClass="radioLeave radioLeave-primary"
                                        GroupName="rpt" onchange="ajaxGetDate(5);" />
                                </div>
                                <div class="col-md-2">
                                    <asp:RadioButton ID="rbThisMonth" runat="server" CssClass="radioLeave radioLeave-primary"
                                        GroupName="rpt" onchange="ajaxGetDate(4);" />
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lblTimePeriod" runat="server"></asp:Label>
                                -
                                <asp:Label ID="lblFrom" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:TextBox onpaste="return true" ID="txtFromDate" runat="server" CssClass="form-control"
                                    onCut="return false" onDrop="return false" MaxLength="11"></asp:TextBox>
                                <asp:CustomValidator ID="cus_FromDate" runat="server" Display="None" EnableClientScript="False"
                                    ErrorMessage="Select valid From Date" OnServerValidate="ValidateFromDate"></asp:CustomValidator>
                                <asp:RequiredFieldValidator ID="reqFromDate" runat="server" ControlToValidate="txtFromDate"
                                    Display="None" EnableClientScript="False" ErrorMessage="Please select FromDate"></asp:RequiredFieldValidator>
                            </div>
                            <div class="col-md-1">
                            </div>
                            <div class="col-md-2">
                                <asp:Label ID="lblTo" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:TextBox onpaste="return true" ID="txtToDate" runat="server" CssClass="form-control"
                                    onCut="return false" onDrop="return false" MaxLength="11"></asp:TextBox>
                                <asp:CustomValidator ID="cus_ToDate" runat="server" Display="None" EnableClientScript="False"
                                    ErrorMessage="Select valid To Date" OnServerValidate="ValidateToDate"></asp:CustomValidator>
                                <asp:CustomValidator ID="cus_ComToDate" runat="server" Display="None" EnableClientScript="False"
                                    ErrorMessage="Select valid date compare with Fromdate" OnServerValidate="CompareDate"></asp:CustomValidator>
                                <asp:RequiredFieldValidator ID="reqToDate" runat="server" ControlToValidate="txtToDate"
                                    Display="None" EnableClientScript="False" ErrorMessage="Please select ToDate"></asp:RequiredFieldValidator>
                            </div>
                        </div>
                    </div>
                    <div class="clearfix">
                    </div>
                    <div class="row">
                        <div class="row">
                            <div class="line16">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <asp:UpdatePanel ID="upOrgLevel" runat="server" UpdateMode="Conditional">
                                <ContentTemplate>
                                    <asp:PlaceHolder ID="PlaceHolderMonthlyAttendance" runat="server">
                                        <uc:OrganizationLevel ID="ucOrganizationLevel" runat="server" />
                                    </asp:PlaceHolder>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                    </div>
                    <div class="row form-group" id="trView" runat="server">
                        <div class="col-md-5">
                        </div>
                        <div class="col-md-6">
                            <div class="pull-right-button">
                                <asp:LinkButton ID="lnkbtnGrid" Text="&nbsp;&nbsp;Grid Report" CssClass="btn save-btn fa-eye" runat="server" OnClick="lnkbtnGrid_Click"
                                    OnClientClick="return DateEntryValidation()" />
                                <asp:LinkButton ID="btn_View" CssClass="btn save-btn fa-eye" runat="server" OnClick="btn_View_Click"
                                    OnClientClick="return DateEntryValidation()" />
                                <asp:LinkButton ID="btn_Export" runat="server" CssClass="btn save-btn fa-file-excel-o"
                                    OnClientClick="return DateEntryValidation()" Text="&nbsp;&nbsp;Export To Excel"
                                    OnClick="btn_Export_Click" />
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="row">
                            <div class="line16">
                            </div>
                        </div>
                    </div>
                    <div class="row form-group">
                        <div class="col-md-12">
                            <div class="pull-right-button">
                                <asp:Label Visible="false" ID="lblmanual" runat="server" Text="WD -  Week Day | WO - Weekly Off | H - Holiday | Spec.OT - Special OT | # - Manual Entry Record"></asp:Label>
                                <asp:LinkButton ID="lnktbnexcel" Visible="false" ToolTip="Excel" CommandName="excel" runat="server" CssClass="btn del-btn fa-file-excel-o" OnClick="btnExport_Click">
                                </asp:LinkButton>
                                <asp:LinkButton ID="lnkbtnpdf" Visible="false" ToolTip="Pdf" CommandName="pdf" runat="server" CssClass="btn del-btn fa-file-pdf-o" OnClick="btnExport_Click">
                                </asp:LinkButton>
                                <asp:LinkButton ID="lnbtnClear" Visible="false" Text="&nbsp;&nbsp;Clear" runat="server" CssClass="btn del-btn" OnClick="lnbtnClear_Click">
                                </asp:LinkButton>
                            </div>
                        </div>
                    </div>
                    <div class="row form-group">
                        <div class="col-md-12">
                            <dxw:ASPxGridView ID="gvData" Visible="false" SettingsBehavior-AllowSort="false" ClientInstanceName="gvData" runat="server"
                                AutoGenerateColumns="false" Width="100%" Settings-HorizontalScrollBarMode="Auto" ViewStateMode="Enabled">
                                <Columns>
                                    <dxw:GridViewDataTextColumn FieldName="EMPLOYEE ID" VisibleIndex="0" Caption="Employee ID">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblEID" Text='<%# Eval("EMPLOYEE ID") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>
                                    <dxw:GridViewDataTextColumn FieldName="Employee Name" VisibleIndex="1" Caption="Employee Name" Width="200px">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblEMPNAME" Text='<%# Eval("Employee Name") %>' runat="server" Style="width: 25%"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>
                                    <dxw:GridViewDataTextColumn FieldName="Shift Date" VisibleIndex="2" Caption="Date">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblDATE" Text='<%# Eval("Shift Date") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>
                                    <dxw:GridViewDataTextColumn FieldName="SHIFT SHORT NAME" VisibleIndex="3" Caption="SSN">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblSHIFT_SHORTNAME" Text='<%# Eval("SHIFT SHORT NAME") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>
                                    <dxw:GridViewDataTextColumn FieldName="IN TIME" VisibleIndex="4" Caption="In Time" Width="80px">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblINTIME" Text='<%# Eval("IN TIME") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>
                                    <dxw:GridViewDataTextColumn FieldName="OUT TIME" VisibleIndex="5" Caption="Out Time" Width="80px">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblOUTTIME" Text='<%# Eval("OUT TIME") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>
                                    <dxw:GridViewDataTextColumn FieldName="Hours Worked" VisibleIndex="6" Caption="HW" Width="80px">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblHRSWORK" Text='<%# Eval("Hours Worked") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>
                                    <dxw:GridViewDataTextColumn FieldName="Late In Hours" VisibleIndex="7" Caption="Late Entry Hours" Width="120px">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblLATEIN" Text='<%# Eval("Late In Hours") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>
                                    <dxw:GridViewDataTextColumn FieldName="Early Out Hours" VisibleIndex="8" Caption="Early Exit Hours" Width="120px">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblEARLYOUT" Text='<%# Eval("Early Out Hours") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>
                                    <dxw:GridViewDataTextColumn FieldName="Week Day OT" VisibleIndex="9" Caption="WD OT-Hours">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblNORMOT" Text='<%# Eval("Week Day OT") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>
                                    <dxw:GridViewDataTextColumn FieldName="Week Off OT" VisibleIndex="10" Caption="WO OT-Hours">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblOFFOT" Text='<%# Eval("Week Off OT") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>




                                    <dxw:GridViewDataTextColumn FieldName="Holiday OT" VisibleIndex="11" Caption="H OT-Hours">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblHOLOT" Text='<%# Eval("Holiday OT") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>


                                    <dxw:GridViewDataTextColumn FieldName="Supposed Work Hours" VisibleIndex="12" Caption="SWH">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblSUPPOSEDWORKHOURS" Text='<%# Eval("Supposed Work Hours") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>
                                    <dxw:GridViewDataTextColumn FieldName="FN Attendance" VisibleIndex="13" Caption="First Session">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblFIRSTSESSION" Text='<%# Eval("FN Attendance") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>
                                    <dxw:GridViewDataTextColumn FieldName="AN Attendance" VisibleIndex="14" Caption="Second Session">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblSECONDSESSION" Text='<%# Eval("AN Attendance") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>
                                    <dxw:GridViewDataTextColumn FieldName="Week Day Special OT 1" VisibleIndex="15" Caption="WD Spec.OT1">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblSPEC_NormOT1" Text='<%# Eval("Week Day Special OT 1") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>
                                    <dxw:GridViewDataTextColumn FieldName="Week Day Special OT 2" VisibleIndex="16" Caption="WD Spec.OT2">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblSPEC_NormOT2" Text='<%# Eval("Week Day Special OT 2") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>
                                    <dxw:GridViewDataTextColumn FieldName="Week Off Special OT 1" VisibleIndex="17" Caption="WO Spec.OT1">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblSPEC_OffOT1" Text='<%# Eval("Week Off Special OT 1") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>
                                    <dxw:GridViewDataTextColumn FieldName="Week OFF Special OT 2" VisibleIndex="18" Caption="WO Spec.OT2">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblSPEC_OffOT2" Text='<%# Eval("Week OFF Special OT 2") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>
                                    <dxw:GridViewDataTextColumn FieldName="Holiday Special OT 1" VisibleIndex="19" Caption="H Spec.OT1">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblSPEC_HOLOT1" Text='<%# Eval("Holiday Special OT 1") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>
                                    <dxw:GridViewDataTextColumn FieldName="Holiday Special OT 2" VisibleIndex="20" Caption="H Spec.OT2">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblSPEC_HOLOT2" Text='<%# Eval("Holiday Special OT 2") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>

                                    <dxw:GridViewDataTextColumn FieldName="Shift Allowance" VisibleIndex="21" Caption="Shift Allowance">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblShift_Allow" Text='<%# Eval("Shift Allowance") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>

                                    <dxw:GridViewDataTextColumn FieldName="Food Allowance" VisibleIndex="22" Caption="Food Allowance">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblFood_Allow" Text='<%# Eval("Food Allowance") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>

                                    <dxw:GridViewDataTextColumn FieldName="Meal Allowance" VisibleIndex="23" Caption="Meal Allowance">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblMeal_Allow" Text='<%# Eval("Meal Allowance") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>

                                    <dxw:GridViewDataTextColumn FieldName="SH Allowance" VisibleIndex="24" Caption="SH Allowance">
                                        <DataItemTemplate>
                                            <asp:Label ID="lblSH_Allow" Text='<%# Eval("SH Allowance") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        </DataItemTemplate>
                                        <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                    </dxw:GridViewDataTextColumn>

                                </Columns>
                                <SettingsPager PageSize="10">
                                    <PageSizeItemSettings Visible="true" ShowAllItem="true" Items="30,60,90" />
                                </SettingsPager>
                                <Settings ShowFilterRow="true" ShowFilterRowMenu="true" ShowStatusBar="Auto" VerticalScrollableHeight="320" />
                                <SettingsText EmptyDataRow="No Records Found" />
                                <%--<SettingsSearchPanel Visible="true" ColumnNames="EMPLOYEE_ID; EMPNAME;FIRSTSESSION;SECONDSESSION;"/>--%>
                                <SettingsSearchPanel Visible="true" HighlightResults="true" ShowApplyButton="true" ShowClearButton="true" />
                            </dxw:ASPxGridView>
                            <dxw:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="gvData" PaperKind="A3">
                                <PageFooter Right="[Page # of Pages #]">
                                </PageFooter>
                            </dxw:ASPxGridViewExporter>
                        </div>
                    </div>

                    <div class="row" id="trSave" runat="server">
                        <div class="col-md-5">
                        </div>
                        <div class="col-md-6">
                            <div class="pull-right-button">
                                <asp:LinkButton ID="btnSave" Text="Save" CssClass="btn save-btn  fa-floppy-o" runat="server"
                                    OnClick="btnSave_Click" />
                                <asp:LinkButton ID="btnBack" Text="Back" CssClass="btn del-btn fa-close" runat="server"
                                    OnClick="btnBack_Click" />
                                <asp:ValidationSummary ID="ValidationSummary1" ShowMessageBox="false" ShowSummary="false"
                                    runat="server" />
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script language="javascript" type="text/javascript">
        var Monthfourdigit = 'Please enter valid date as month, day, and four digit year : Format MM/dd/yyyy.';
        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';
        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, 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;
            EntervalidDateandTime = entervalidDateandTime;
            Invalidvalueforhours = invalidvalueforhours;
            Invalidvalueforminites = invalidvalueforminites;
        }
        var FromDate = "Enter Valid From Date";
        var ToDate = "Enter Valid To Date";
        var EntervalidMinimumWorkHours = "Enter valid Minimum Work Hours(HH:MM)";
        function SetAlertMessages(fromdate, enterToDate, entervalidMinimumWorkHours) {
            FromDate = fromdate;
            ToDate = enterToDate;
            EntervalidMinimumWorkHours = entervalidMinimumWorkHours;
        }
        function DateEntryValidation() {
            var rangeDemoFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
            if (document.aspnetForm.ctl00_BodyContentPH_txtMinWorkHours.value != "") {
                var splittedValue = document.aspnetForm.ctl00_BodyContentPH_txtMinWorkHours.value.split(":");
                if (splittedValue.length < 2) {
                    alert(EntervalidMinimumWorkHours);
                    document.aspnetForm.ctl00_BodyContentPH_txtMinWorkHours.focus();
                    return false;
                }
                else if (splittedValue[0].length < 2) {
                    alert(EntervalidMinimumWorkHours);
                    document.aspnetForm.ctl00_BodyContentPH_txtMinWorkHours.focus();
                    return false;
                }
                else if (splittedValue[1].length < 2) {
                    alert(EntervalidMinimumWorkHours);
                    document.aspnetForm.ctl00_BodyContentPH_txtMinWorkHours.focus();
                    return false;
                }
            }
            if (document.aspnetForm.ctl00_BodyContentPH_txtFromDate.value != '') {
                var weekDay = document.aspnetForm.ctl00_BodyContentPH_txtFromDate;
                var DateFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
                if (checkDate(weekDay, DateFormat, Monthfourdigit, Datefourdigit, Invalidyearentry, Invalidmonthentry, Invaliddateentry, DateformatDDMONYYYY, Entertime, Valueforhours, Invalidvalueforminutes, Invalidtimeformat, EntervalidDateandTime, ValiddatemonthMMDDYYHHMM, ValiddatemonthMMDDYYHHMMTT, EntervalidDateandTime, Invalidvalueforhours, Invalidvalueforminites)) {
                    if (document.aspnetForm.ctl00_BodyContentPH_txtToDate.value != '') {
                        var weekDay = document.aspnetForm.ctl00_BodyContentPH_txtToDate;
                        var DateFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
                        if (checkDate(weekDay, DateFormat, Monthfourdigit, Datefourdigit, Invalidyearentry, Invalidmonthentry, Invaliddateentry, DateformatDDMONYYYY, Entertime, Valueforhours, Invalidvalueforminutes, Invalidtimeformat, EntervalidDateandTime, ValiddatemonthMMDDYYHHMM, ValiddatemonthMMDDYYHHMMTT, EntervalidDateandTime, Invalidvalueforhours, Invalidvalueforminites)) {
                        }
                        else {
                            return false;
                        }
                    }
                    else {
                        alert(ToDate);
                        return false
                    }
                }
                else {
                    return false;
                }
            }
            else {
                alert(FromDate);
                return false;
            }
        }
    </script>
</asp:Content>
