<%@ page language="C#" autoeventwireup="true" masterpagefile="~/MasterFile/TimeCheck.master" inherits="Transactions_TA_UI_Transactions_MonthClosureView, App_Web_h5v4txkk" %>

<%@ Register TagPrefix="dxGridview" Namespace="DevExpress.Web" Assembly="DevExpress.Web.v14.2" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%--<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>--%>
<asp:Content ContentPlaceHolderID="BodyContentPH" ID="con_MonClosView" runat="server">

    <script type="text/javascript" language="javascript">
        var MaximumValue = "Maximum Value is 365";
        var InvalidEntry = "Invalid entry";
        var AvailableLeave = "Available leaves should not be empty";
        function SetAlertMessages(maximumValue, invalidEntry, availableLeave) {
            MaximumValue = maximumValue;
            InvalidEntry = invalidEntry;
            AvailableLeave = availableLeave;
        }
        function validate(textbox) {
            var control = textbox;
            var availableleaves = control.value;
            if (availableleaves != "") {
                if (availableleaves > 365) {
                    alert(MaximumValue);
                    document.getElementById(control.id).focus();
                    return false;
                }
                else {
                    if (availableleaves.match(/([1-3][0-6][0-5])/)) {
                        return true;
                    }
                    else {
                        if (availableleaves % 0.5 != 0) {
                            alert(InvalidEntry);
                            document.getElementById(control.id).focus();
                            return false;
                        }
                    }
                }
            }
            else {
                alert(AvailableLeave);
                document.getElementById(control.id).focus();
                return false;
            }
        }
        //On Center Screen
        function popupwindow(url, title, w, h) {
            var left = (screen.width / 2) - (w / 2);
            var top = (screen.height / 2) - (h / 2);
            return window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
        }
    </script>

    <div class="content-header">
        <h1 style="background-image: url(../dist/img/month-Close.png); background-repeat: no-repeat; padding-left: 35px">
            <asp:Label ID="lbl_Header" runat="server"></asp:Label>
        </h1>
        <asp:SiteMapPath ID="site" runat="server" CssClass="breadcrumb">
            <NodeStyle CssClass="active" />
        </asp:SiteMapPath>
    </div>
    <div class="content">
        <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="InsideProgressBar">
                            <div class="row" style="margin-top: 10px">
                                <img src="../dist/img/logo-Progress.png" />
                            </div>
                            <div class="row" style="min-width: 280px">
                                <img src="../dist/img/default.gif" style="width: 100px" />
                            </div>
                            <div class="row" style="margin-bottom: 10px">
                                <asp:Label ID="lblLoading" runat="server" ForeColor="black" Style="text-align: center"
                                    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="ModalPopup" PopupControlID="pnlProgress" BehaviorID="popupProgress">
                </cc1:ModalPopupExtender>
            </ContentTemplate>
            <Triggers>
                <asp:PostBackTrigger ControlID="lnkbtnSendEmail" />
                <asp:PostBackTrigger ControlID="btn_LevelwiseReprocess" />
                <asp:PostBackTrigger ControlID="btn_Save" />
                <asp:PostBackTrigger ControlID="btn_IndividualReprocess" />
            </Triggers>
        </asp:UpdatePanel>
        <div id="myModal" class="modal modal-default fade" role="dialog">
            <div class="modal-dialog" style="min-width: 85%;">
                <!-- Modal content-->
                <div class="modal-content" style="margin-top: 100px">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" style="border-radius: 50px;">
                            &times;</button>
                        <h4 class="modal-title" style="padding-bottom: 10px">
                            <asp:Label ID="lbl_Mon_Individual_Reprocess" runat="server" Text="Month Closure Individual Reprocess"></asp:Label>
                        </h4>
                    </div>
                    <div class="modal-body" style="padding-top: 0px">
                        <iframe id="iframePopup" runat="server" scrolling="auto" width="100%" height="500px"
                            style="border-style: none"></iframe>
                    </div>
                    <div class="modal-footer" style="display: none">
                        <button type="button" class="btn btn-primary pull-right" data-dismiss="modal">
                            Close</button>
                    </div>
                </div>
            </div>
        </div>
        <div class="emp-filter">
            <div class="form-horizontal">
                <div class="row">
                    <div class="col-md-12">
                        <div class="row form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lbl_LevelName1" runat="server"></asp:Label>
                                <asp:Label ID="lbl_LevelId" runat="server" Visible="False"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:Label ID="lbl_LevelName" runat="server" Text="Label" CssClass="form-control"></asp:Label>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lbl_Month1" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:Label ID="lbl_Month" runat="server" Text="Label" CssClass="form-control"></asp:Label>
                            </div>
                            <div class="col-md-1">
                            </div>
                            <div class="col-md-2">
                                <asp:Label ID="lbl_Year1" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:Label ID="lbl_Year" runat="server" CssClass="form-control"></asp:Label>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lbl_StartDate1" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:Label ID="lbl_StartDate" runat="server" Text="Label" CssClass="form-control"></asp:Label>
                            </div>
                            <div class="col-md-1">
                            </div>
                            <div class="col-md-2">
                                <asp:Label ID="lbl_EndDate1" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:Label ID="lbl_EndDate" runat="server" Text="Label" CssClass="form-control"></asp:Label>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-12">
                                <div id="divMonthClosureHistory" runat="server">
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-2">
                                <asp:LinkButton ID="btn_Save" CssClass="btn save-btn fa-angle-double-right" runat="server"
                                    OnClientClick="if(1==1) $find('popupProgress').show();else return false;" OnClick="btn_Save_Click" />
                            </div>
                            <div class="col-md-3">
                                <asp:LinkButton ID="btn_LevelwiseReprocess" CssClass="btn save-btn fa-angle-double-right"
                                    OnClientClick="if(1==1) $find('popupProgress').show();else return false;" runat="server" OnClick="btn_Reprocess_Click" />
                            </div>
                            <div class="col-md-3">
                                <asp:LinkButton ID="btn_IndividualReprocess" runat="server" Text="Button" CssClass="btn save-btn fa-angle-double-right"
                                    OnClick="btn_IndividualReprocess_Click" data-toggle="modal" data-target="#myModal" />
                            </div>
                            <div class="col-md-2" style="display: none">
                                <asp:LinkButton ID="btnPreview" CssClass="btn save-btn fa-eye" runat="server" OnClick="btnPreview_Click" />
                            </div>
                            <div class="col-md-2">
                                <asp:LinkButton ID="btn_View" CssClass="btn save-btn fa-eye" runat="server" OnClick="btn_View_Click" />
                            </div>
                            <div class="col-md-2">
                                <asp:LinkButton ID="btn_Delete" CssClass="btn save-btn fa-trash-o" runat="server"
                                    CausesValidation="False" OnClick="btn_Delete_Click" />
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-2">
                                <asp:LinkButton ID="btnExportCSV" CommandName="csv" Text="&nbsp;&nbsp;Export to CSV" ToolTip="Export to Excel" runat="server" CssClass="btn del-btn fa-file-excel-o" OnClick="btnExport_Click">
                                </asp:LinkButton>
                            </div>
                            <div class="col-md-3">
                                <asp:UpdatePanel runat="server" ID="upda1">
                                    <ContentTemplate>
                                        <asp:LinkButton ID="lnkbtnSendEmail" Text="&nbsp;&nbsp;Send Email" runat="server" CssClass="btn save-btn" OnClick="lnkbtnSendEmail_Click"
                                            OnClientClick="if(confirm('Are you sure to send email')) $find('popupProgress').show();else return false;">
                                        </asp:LinkButton>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                                <asp:LinkButton Style="display: none" ID="btnExport" CommandName="excel" Text="&nbsp;&nbsp;Export to Excel" ToolTip="Export to Excel" runat="server" CssClass="btn del-btn fa-file-excel-o" OnClick="btnExport_Click">
                                </asp:LinkButton>
                            </div>
                            <div class="col-md-3">
                                <asp:LinkButton ID="lnkfinal" CssClass="btn save-btn" Text="Approved" runat="server"
                                    OnClick="lnkfinal_Click" OnClientClick="if(confirm('Are you sure to Approve the data!')) $find('popupProgress').show();else return false;" />
                            </div>
                            <div class="col-md-3">
                                <asp:LinkButton ID="btn_Cancel" CssClass="btn save-btn fa-angle-left" runat="server"
                                    OnClick="btn_Cancel_Click" />
                            </div>
                            <div class="col-md-3">
                                <asp:LinkButton Style="display: none" ID="btnExportPdf" CommandName="pdf" Text="&nbsp;&nbsp;Export to Pdf" ToolTip="Export to Pdf" runat="server" CssClass="btn del-btn fa-file-pdf-o" OnClick="btnExport_Click">
                                </asp:LinkButton>
                            </div>
                        </div>
                        <div class="row" style="display:none">
                            <div class="col-md-3">
                                <asp:Label ID="lblFileName" Text="File Name" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:Label ID="lblFileNameval" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-2">
                                <asp:Label ID="lblFilePathExists" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-4">
                                <asp:Label ID="lblFilePath" runat="server"></asp:Label>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                        <div class="row">
                            <div class="line16">
                            </div>
                        </div>
                        <div class="row form-group" id="import1" runat="server">
                            <div class="col-md-2">
                                <span style="color: Red">|</span>
                                <asp:Label ID="lbl_ImportFilePath" runat="server" Style="padding-left: 1px" Text="Select File"></asp:Label>
                            </div>
                            <div class="col-md-4">
                                <asp:FileUpload ID="fup_ShiftImport" runat="server" CssClass="form-control" />
                            </div>
                        </div>

                        <div class="row form-group" id="import2" runat="server">
                            <div class="col-md-2">
                            </div>
                            <div class="col-md-4">
                                <div class="pull-right-button">
                                    <asp:LinkButton ID="btn_Upload" Text="&nbsp;&nbsp;Upload" CssClass="btn save-btn fa-upload" runat="server" OnClick="btn_Upload_Click" OnClientClick="return Validation();" />
                                    <asp:LinkButton ID="btnClear" Text="&nbsp;&nbsp;Clear" CssClass="btn save-btn" runat="server" OnClick="btnClear_Click" />
                                </div>
                            </div>
                        </div>
                        <div class="row" id="import3" runat="server">
                            <div class="col-md-12">
                                <dxGridview:ASPxGridView ID="grvImportDetails" EnableCallBacks="false" runat="server"
                                    ClientInstanceName="grvImportDetails" Visible="false" AutoGenerateColumns="false" Width="100%">
                                    <Columns>
                                        <dxGridview:GridViewDataTextColumn Caption="Record Number" FieldName="RecordID"
                                            VisibleIndex="0">
                                            <DataItemTemplate>
                                                <asp:Label ID="lblRecordNumber" Text='<%# Bind("RecordID") %>' runat="server"></asp:Label>
                                            </DataItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn Caption="Error Message" FieldName="Err_Msg" VisibleIndex="1">
                                            <DataItemTemplate>
                                                <asp:Label ID="lblError" Text='<%# Bind("Error_Msg") %>' runat="server"></asp:Label>
                                            </DataItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                    </Columns>
                                    <SettingsText EmptyDataRow="No Records Found" />
                                    <SettingsPager PageSize="1000">
                                    </SettingsPager>
                                    <SettingsBehavior SortMode="Value" AllowSort="true" AllowDragDrop="false" />
                                    <Styles AlternatingRow-CssClass="table-bg">
                                    </Styles>
                                </dxGridview:ASPxGridView>
                            </div>
                        </div>
                        <div class="row" style="overflow: auto;">
                            <div class="col-md-12" style="padding-top: 5px; padding-bottom: 10px">
                                <div class="col-md-12" style="padding-top: 20px; display: none" id="legends" runat="server">
                                    <div class="row form-group">
                                        <div class="col-md-3">
                                            <asp:Label ID="lbl_PresentDays" runat="server" Text="P - Present Days" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3">
                                            <asp:Label ID="lbl_AbsentDays" runat="server" Text="A - Absent Days" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3">
                                            <asp:Label ID="lbl_LeaveDays" runat="server" Text="L - Leave Days" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3">
                                            <asp:Label ID="lbl_WeeklyOffDays" runat="server" Text="Off - Weekly Off Days" CssClass="form-control"></asp:Label>
                                        </div>

                                        <div class="col-md-3">
                                            <asp:Label ID="lbl_LOPDays" runat="server" Text="LOP - LOP Days" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3">
                                            <asp:Label ID="lbl_Holidays" runat="server" Text="H - Holidays" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3">
                                            <asp:Label ID="lbl_HoursWorked" runat="server" Text="HW - Hours Worked" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3">
                                            <asp:Label ID="lbl_ExtraHours" runat="server" Text="EH - Extra Hours" CssClass="form-control"></asp:Label>
                                        </div>

                                        <div class="col-md-3">
                                            <asp:Label ID="lbl_LessHoursWorked" runat="server" Text="LH - Less Hours Worked" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3">
                                            <asp:Label ID="lbl_NormalOT" runat="server" Text="NOT - Normal OT" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3">
                                            <asp:Label ID="lbl_WeeklyOffOT" runat="server" Text="WOT - Weekly Off OT" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3">
                                            <asp:Label ID="lbl_HolidayOT" runat="server" Text="HOT - Holiday OT" CssClass="form-control"></asp:Label>
                                        </div>

                                        <div class="col-md-3">
                                            <asp:Label ID="lbl_PermissionHours" runat="server" Text="PH - Permission Hours" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3">
                                            <asp:Label ID="lbl_LateInHours" runat="server" Text="LIH - Late In Hours" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3">
                                            <asp:Label ID="lbl_EarlyOutHours" runat="server" Text="EOH - Early Out Hours" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3" runat="server" id="div0">
                                            <asp:Label ID="lblNSOT1" runat="server" Text="N-SOT1 - Normal Special OT1" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3" runat="server" id="div1">
                                            <asp:Label ID="Label1" runat="server" Text="N-SOT2 - Normal Special OT2" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3" runat="server" id="div2">
                                            <asp:Label ID="Label4" runat="server" Text="H-SOT1 - Holiday Special OT1" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3" runat="server" id="div3">
                                            <asp:Label ID="Label5" runat="server" Text="H-SOT1 - Holiday Special OT1" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3" runat="server" id="div4">
                                            <asp:Label ID="Label2" runat="server" Text="WO- Weekly Off" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3" runat="server" id="div5">
                                            <asp:Label ID="Label3" runat="server" Text="SA - Shift Allowance" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3" runat="server" id="div6">
                                            <asp:Label ID="Label6" runat="server" Text="FA - Food Allowance" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3" runat="server" id="div7">
                                            <asp:Label ID="Label7" runat="server" Text="MA - Meal Allowance" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3" runat="server" id="div8">
                                            <asp:Label ID="Label8" runat="server" Text="SHA - SH Allowance" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3" runat="server" id="div9">
                                            <asp:Label ID="Label9" runat="server" Text="AA - Attendance Allowance" CssClass="form-control"></asp:Label>
                                        </div>
                                        <div class="col-md-3">
                                            <asp:Label ID="lblflag" Style="display: none" runat="server" Text="Month Closure flag has been updated successfully for payroll process" CssClass="form-control"></asp:Label>
                                        </div>
                                    </div>
                                </div>

                                <dxGridview:ASPxGridView ID="grv_MonthClosure" runat="server" ClientInstanceName="grv_MonthClosure" KeyFieldName="PayrollProcess_Id"
                                    OnHtmlDataCellPrepared="grv_MonthClosure_HtmlDataCellPrepared" EnableCallBacks="false" AutoGenerateColumns="false" Width="100%">
                                    <Columns>
                                        <dxGridview:GridViewDataTextColumn FieldName="Employee_Id" VisibleIndex="0" Width="100px">
                                            <DataItemTemplate>
                                                <asp:Label ID="lblEmployeecodeId" runat="server" Text='<%# Bind("Employee_Id") %>'
                                                    Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="lblEmployee_Id" Text='<%# Bind("Employee_Id") %>' runat="server" Width="100px"></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="EmployeeName" VisibleIndex="1" Width="300px">
                                            <DataItemTemplate>
                                                <asp:Label ID="lblEmployeeName" runat="server" Text='<%# Bind("EmployeeName") %>'
                                                    Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: hyphenate; display: inline-block;">
                                                </asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="lblEmployeeNameEdit" Text='<%# Bind("EmployeeName") %>' runat="server" Width="300px"></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />

                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="PresentDays" VisibleIndex="2" Width="50px" ToolTip="Present Days">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblPresentDays" runat="server" Text='<%# Bind("PresentDays") %>'></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:TextBox ID="txtPresentDays" MaxLength="4" onchange="return onChangeHalfDay(this);" onkeypress="return number_dot_Without_Dollar(event,this);" Text='<%# Bind("PresentDays") %>' runat="server" Width="50px"></asp:TextBox>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="AbsentDays" VisibleIndex="3" Width="50px" ToolTip="Absent Days">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblAbsentDays" runat="server" Text='<%# Bind("AbsentDays") %>'></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:TextBox ID="txtAbsentDays" MaxLength="4" onkeypress="return number_dot_Without_Dollar(event,this);" Text='<%# Bind("AbsentDays") %>' runat="server" Width="50px"></asp:TextBox>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="LeaveDays" VisibleIndex="4" Width="50px" ToolTip="Leave Days">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblLeaveDays" runat="server" Text='<%# Bind("LeaveDays") %>'></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:TextBox ID="txtLeaveDays" MaxLength="4" onkeypress="return number_dot_Without_Dollar(event,this);" Text='<%# Bind("LeaveDays") %>' runat="server" Width="50px"></asp:TextBox>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="WeekOffDays" VisibleIndex="5" Width="50px" ToolTip="Weekly Off Days">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblWeekOffDays" runat="server" Text='<%# Bind("WeekOffDays") %>'></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:TextBox ID="txtWeekOffDays" MaxLength="4" onkeypress="return number_dot_Without_Dollar(event,this);" Text='<%# Bind("WeekOffDays") %>' runat="server" Width="50px"></asp:TextBox>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="LOPDays" VisibleIndex="6" Width="50px" ToolTip="LOP Days">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblLopDays" runat="server" Text='<%# Bind("LOPDays") %>'></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:TextBox ID="txtLOPDays" MaxLength="4" onkeypress="return number_dot_Without_Dollar(event,this);" Text='<%# Bind("LOPDays") %>' runat="server" Width="50px"></asp:TextBox>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="Holidays" VisibleIndex="7" Width="50px" ToolTip="Holidays">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblHolidays" runat="server" Text='<%# Bind("Holidays") %>'></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:TextBox ID="txtHolidays" MaxLength="4" Text='<%# Bind("Holidays") %>' runat="server" Width="50px"></asp:TextBox>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn Caption="" FieldName="HrsWork" VisibleIndex="8" Width="70px" ToolTip="Hours Worked">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblHrsWork" Text='<%# Bind("HrsWork") %>' runat="server"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="lblHrsWorkEdit" Text='<%# Bind("HrsWork") %>' runat="server" Width="70px"></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn Caption="" FieldName="HrsExtra" VisibleIndex="9" Width="50px" ToolTip="Extra Hours">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblHrsExtra" Text='<%# Bind("HrsExtra") %>' runat="server"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="lblHrsExtraEdit" Text='<%# Bind("HrsExtra") %>' runat="server"></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn Caption="" FieldName="HrsLess" VisibleIndex="10" Width="50px" ToolTip="Less Hours Worked">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblHrsLess" Text='<%# Bind("HrsLess") %>' runat="server"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="lblHrsLessEdit" Text='<%# Bind("HrsLess") %>' runat="server"></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="NormOT" VisibleIndex="11" Width="50px" ToolTip="Normal OT">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblNormOT" Text='<%# Bind("NormOT") %>' runat="server"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="lblNormOTEdit" Text='<%# Bind("NormOT") %>' runat="server"></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="OffOT" VisibleIndex="12" Width="50px" ToolTip="Week Off OT">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblOffOT" Text='<%# Bind("OffOT") %>' runat="server"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="lblOffOTEdit" Text='<%# Bind("OffOT") %>' runat="server"></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="HolOT" VisibleIndex="13" Width="50px" ToolTip="Holiday OT">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblHolOT" Text='<%# Bind("HolOT") %>' runat="server"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="lblHolOTEdit" Text='<%# Bind("HolOT") %>' runat="server"></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="TotalPermissionHours" VisibleIndex="14" Width="50px" ToolTip="Permission Hours">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblTotalPermissionHours" Text='<%# Bind("TotalPermissionHours") %>'
                                                    runat="server"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="lblTotalPermissionHoursEdit" Text='<%# Bind("TotalPermissionHours") %>' runat="server"></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="LateIn" VisibleIndex="15" Width="50px" ToolTip="Late In Hours">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblLateIn" Text='<%# Bind("LateIn") %>' runat="server"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="lblLateInEdit" Text='<%# Bind("LateIn") %>' runat="server"></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="EarlyOut" VisibleIndex="16" Width="50px" ToolTip="Early Out Hours">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblEarlyOut" Text='<%# Bind("EarlyOut") %>' runat="server" align="center"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="lblEarlyOutEdit" Text='<%# Bind("EarlyOut") %>' runat="server"></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="MonthClosure_Id" VisibleIndex="17"
                                            Visible="false">
                                            <DataItemTemplate>
                                                <asp:Label ID="lblMonthClosureId" runat="server" Text='<%# Bind("MonthClosure_Id") %>'></asp:Label>
                                            </DataItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="SPEC_NormOT1" VisibleIndex="18" Width="70px" ToolTip="Normal Special OT1">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblSPEC_NormOT1" Text='<%# Bind("SPEC_NormOT1") %>' runat="server" align="center"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="lblSPEC_NormOT1Edit" Text='<%# Bind("SPEC_NormOT1") %>' runat="server"></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="SPEC_NormOT2" VisibleIndex="19" Width="70px" ToolTip="Normal Special OT2">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblSPEC_NormOT2" Text='<%# Bind("SPEC_NormOT2") %>' runat="server" align="center"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="lblSPEC_NormOT2Edit" Text='<%# Bind("SPEC_NormOT2") %>' runat="server"></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="SPEC_OffOT1" VisibleIndex="20" Width="70px" ToolTip="Week off Special OT1">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblSPEC_OffOT1" Text='<%# Bind("SPEC_OffOT1") %>' runat="server" align="center"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="lblSPEC_OffOT1Edit" Text='<%# Bind("SPEC_OffOT1") %>' runat="server"></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="SPEC_OffOT2" VisibleIndex="21" Width="70px" ToolTip="Week off Special OT2">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblSPEC_OffOT2" Text='<%# Bind("SPEC_OffOT2") %>' runat="server" align="center"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="lblSPEC_OffOT2Edit" Text='<%# Bind("SPEC_OffOT2") %>' runat="server"></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="SPEC_HOLOT1" VisibleIndex="22" Width="70px" ToolTip="Holiday Special OT1">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblSPEC_HOLOT1" Text='<%# Bind("SPEC_HOLOT1") %>' runat="server" align="center"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="lblSPEC_HOLOT1Edit" Text='<%# Bind("SPEC_HOLOT1") %>' runat="server"></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="SPEC_HOLOT2" VisibleIndex="23" Width="70px" ToolTip="Holiday Special OT2">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblSPEC_HOLOT2" Text='<%# Bind("SPEC_HOLOT2") %>' runat="server" align="center"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="lblSPEC_HOLOT2Edit" Text='<%# Bind("SPEC_HOLOT2") %>' runat="server"></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>


                                        <dxGridview:GridViewDataTextColumn FieldName="Shift_Allow" VisibleIndex="24" Caption="SA" Width="70px" ToolTip="Shift Allowance">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblShift_Allow" Text='<%# Bind("Shift_Allow") %>' runat="server" align="center"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:TextBox ID="txtShift_Allow" MaxLength="4" onkeypress="return number_dot_Without_Dollar(event,this);" Width="70px" Text='<%# Bind("Shift_Allow") %>' runat="server"></asp:TextBox>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="Food_Allow" VisibleIndex="25" Caption="FA" Width="70px" ToolTip="Food Allowance">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblFood_Allow" Text='<%# Bind("Food_Allow") %>' runat="server" align="center"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="lblFood_AllowEdit" Text='<%# Bind("Food_Allow") %>' runat="server"></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="Meal_Allow" VisibleIndex="26" Caption="MA" Width="70px" ToolTip="Meal Allowance">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblMeal_Allow" Text='<%# Bind("Meal_Allow") %>' runat="server" align="center"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="lblMeal_AllowEdit" Text='<%# Bind("Meal_Allow") %>' runat="server"></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="SH_Allow" VisibleIndex="27" Caption="SHA" Width="70px" ToolTip="SH Allowance">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblSH_Allow" Text='<%# Bind("SH_Allow") %>' runat="server" align="center"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="lblSH_AllowEdit" Text='<%# Bind("SH_Allow") %>' runat="server"></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="Att_Allow" VisibleIndex="28" Caption="AA" Width="70px" ToolTip="Attendance Allowance">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblAtt_Allow" Text='<%# Bind("Att_Allow") %>' runat="server" align="center"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label onpaste="return true" ID="txtAtt_Allow" Width="70px" runat="server" Text='<%# Bind("Att_Allow") %>'></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        <%--<dxGridview:GridViewCommandColumn Caption="#" Width="40px">
                                            edit option is enabled means, not able to hide columns due to this reason not able to proceed.
                                            <EditButton Visible="true">
                                            </EditButton>
                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                        </dxGridview:GridViewCommandColumn>
                                            dxGridview:GridViewDataTextColumn FieldName="PayrollProcess_Id" Width="70px" ToolTip="Attendance Allowance" Visible="false">
                                            <Settings AllowAutoFilter="false" />
                                            <DataItemTemplate>
                                                <asp:Label ID="lblPayrollProcess_Id" Text='<%# Bind("PayrollProcess_Id") %>' runat="server" align="center"></asp:Label>
                                            </DataItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="lblPayrollProcess_IdEdit" Width="70px" runat="server"
                                                    Text='<%# Bind("PayrollProcess_Id") %>'></asp:Label>
                                            </EditItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>--%>
                                    </Columns>
                                    <SettingsPager PageSize="1000">
                                        <PageSizeItemSettings Visible="true" ShowAllItem="true" Items="100,200,500,1000,2000" />
                                    </SettingsPager>
                                    <SettingsEditing Mode="Inline" />
                                    <SettingsText EmptyDataRow="No Records Found" />
                                    <Settings ShowFilterRow="true" ShowGroupPanel="true" ShowFilterRowMenu="true" VerticalScrollBarMode="Auto" HorizontalScrollBarMode="Auto" />
                                    <SettingsBehavior SortMode="Value" AllowSort="true" AllowDragDrop="true" ColumnResizeMode="Control" />
                                    <Styles AlternatingRow-CssClass="table-bg">
                                    </Styles>
                                </dxGridview:ASPxGridView>
                                <dxGridview:ASPxGridViewExporter OnRenderBrick="ASPxGridViewExporter1_RenderBrick1" ID="ASPxGridViewExporter1" runat="server" PaperKind="A3" ExportedRowType="All">
                                    <PageFooter Right="[Page # of Pages #]">
                                    </PageFooter>
                                </dxGridview:ASPxGridViewExporter>
                            </div>
                            <div class="clearfix">
                            </div>

                            <div class="row" style="display: none;">
                                <asp:Label ID="lbl_ClosedDate1" runat="server"></asp:Label>
                                <asp:Label ID="lbl_ClosedDate" runat="server" Text="Label" CssClass="form-control"></asp:Label>
                                <asp:Label ID="lblMessage" runat="server" ForeColor="red"></asp:Label>
                            </div>
                            <asp:HiddenField ID="hfstart" runat="server" />
                            <asp:HiddenField ID="hfEnd" runat="server" />
                            <asp:HiddenField ID="hfclosed" runat="server" />
                            <asp:HiddenField ID="hdnfieldNormOT" Value="3120" runat="server" />
                            <asp:HiddenField ID="hdnfieldOffOT" Value="3120" runat="server" />
                            <asp:HiddenField ID="hdnfieldHOT" Value="3120" runat="server" />
                            <%--<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="SelectMonthClosureDetailsForModifyGrid"
                                TypeName="MonthClosureEventData" UpdateMethod="UpdatePayrollProcessDetails">

                                <SelectParameters>
                                    <asp:QueryStringParameter Name="monthClosureId" QueryStringField="MonthClose_Id" Type="Int32" />
                                    <asp:ControlParameter ControlID="lbl_LevelId" Name="levelId" Type="Int32" />
                                    <asp:ControlParameter ControlID="hfstart" Name="starDate" Type="String" />
                                    <asp:ControlParameter ControlID="hfEnd" Name="endDate" Type="String" />
                                    <asp:ControlParameter ControlID="hfclosed" Name="closedDate" Type="String" />
                                </SelectParameters>
                                <UpdateParameters>
                                    <asp:Parameter Name="HrsWork" Type="String" />
                                    <asp:Parameter Name="HrsOT" Type="String" />
                                    <asp:Parameter Name="NormOT" Type="String" />
                                    <asp:Parameter Name="OffOT" Type="String" />
                                    <asp:Parameter Name="HolOT" Type="String" />
                                    <asp:Parameter Name="EarlyOut" Type="String" />
                                    <asp:Parameter Name="LateIn" Type="String" />
                                    <asp:Parameter Name="WorkHrs" Type="String" />
                                    <asp:Parameter Name="HrsLess" Type="String" />
                                    <asp:Parameter Name="HrsExtra" Type="String" />
                                    <asp:Parameter Name="LeaveDays" Type="Double" />
                                    <asp:Parameter Name="AbsentDays" Type="Double" />
                                    <asp:Parameter Name="PresentDays" Type="Double" />
                                    <asp:Parameter Name="Holidays" Type="Double" />
                                    <asp:Parameter Name="LOPDays" Type="Double" />
                                    <asp:Parameter Name="UserId" Type="Int16" />
                                    <asp:Parameter Name="TotalPermissionHours" Type="String" />
                                    <asp:Parameter Name="WeekOffDays" Type="Double" />
                                    <asp:Parameter Name="SPEC_NormOT1" Type="String" />
                                    <asp:Parameter Name="SPEC_NormOT2" Type="String" />
                                    <asp:Parameter Name="SPEC_OffOT1" Type="String" />
                                    <asp:Parameter Name="SPEC_OffOT2" Type="String" />
                                    <asp:Parameter Name="SPEC_HOLOT1" Type="String" />
                                    <asp:Parameter Name="SPEC_HOLOT2" Type="String" />
                                    <asp:Parameter Name="Shift_Allow" Type="String" />
                                    <asp:Parameter Name="Food_Allow" Type="String" />
                                    <asp:Parameter Name="Meal_Allow" Type="String" />
                                    <asp:Parameter Name="SH_Allow" Type="String" />
                                    <asp:Parameter Name="Att_Allow" Type="String" />
                                    <asp:Parameter Name="PayrollProcess_Id" Type="Double" />
                                </UpdateParameters>
                            </asp:ObjectDataSource>--%>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        function OnInit(s, e) {

            AdjustSize();
        }
        function OnEndCallback(s, e) {
            AdjustSize();
        }

        function AdjustSize() {

            var height = Math.max(0, document.documentElement.clientHeight);
            var width = Math.max(0, document.documentElement.clientWidth);
            grid.SetHeight(height);
        }

    </script>

</asp:Content>
