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

<%@ Register Assembly="DevExpress.Web.v14.2" Namespace="DevExpress.Web"
    TagPrefix="dxe" %>
<asp:Content ID="Content1" ContentPlaceHolderID="BodyContentPH" runat="Server">
    <div class="content-header">
        <h1 style="background-image: url(../dist/img/swipe-icon.png); background-repeat: no-repeat; padding-left: 35px">
            <asp:Label ID="lblEarlyOut" runat="server" />
        </h1>
        <asp:SiteMapPath ID="site" runat="server" CssClass="breadcrumb">
            <NodeStyle CssClass="active" />
        </asp:SiteMapPath>
    </div>
    <div class="content">
        <div class="emp-filter">
            <div class="form-horizontal">
                <div class="row form-group">
                    <div class="col-md-12">
                        <div class="table-responsive" style="padding-bottom: 15px">
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                                <ContentTemplate>
                                    <dxe:ASPxGridView ID="grv_Earlyout" EnableCallBacks="false" runat="server"
                                        ClientInstanceName="grv_Earlyout" AutoGenerateColumns="false" Width="100%" KeyFieldName="Process_Rec_ID"
                                        DataSourceID="ObjectDataSource1" OnHtmlRowCreated="grv_Earlyout_HtmlRowCreated">
                                        <Columns>
                                            <dxe:GridViewDataTextColumn FieldName="Employee_Code_Id" Caption="Emp No"
                                                VisibleIndex="0" Width="150px">
                                                <DataItemTemplate>
                                                    <asp:Label ID="lblEmployee_Code_Id" Text='<%# Eval("Employee_Code_Id") %>' runat="server"
                                                        Style="overflow-y: auto; overflow-x: auto; word-break: break-all; width: 126px; word-wrap: break-word; display: inline-block;"></asp:Label>
                                                    <asp:HiddenField ID="lblProcess_Rec_ID" Value='<%# Eval("Process_Rec_ID") %>' runat="server" />
                                                </DataItemTemplate>
                                                <EditItemTemplate>
                                                    <asp:Label ID="Label1" Text='<%# Eval("Employee_Code_Id") %>' runat="server"></asp:Label>
                                                    <asp:HiddenField ID="HiddenField1" Value='<%# Eval("Process_Rec_ID") %>' runat="server" />
                                                </EditItemTemplate>
                                                <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                            </dxe:GridViewDataTextColumn>
                                            <dxe:GridViewDataTextColumn Caption="Employee Name" FieldName="Employee_FirstName"
                                                VisibleIndex="1" Width="250px">
                                                <DataItemTemplate>
                                                    <asp:Label ID="lblEmployeename" Text='<%# Eval("Employee_FirstName") %>' runat="server"
                                                        Style="overflow-y: auto; overflow-x: auto; word-break: break-all; cursor: pointer; word-wrap: break-word; display: inline-block;">
                                                    </asp:Label>
                                                </DataItemTemplate>
                                                <EditItemTemplate>
                                                    <asp:Label ID="lblEmployeename" Text='<%# Eval("Employee_FirstName") %>' runat="server"
                                                        Style="overflow-y: auto; overflow-x: auto; word-break: break-all; cursor: pointer; word-wrap: break-word; display: inline-block; width: 250px;">
                                                    </asp:Label>
                                                </EditItemTemplate>
                                                <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                            </dxe:GridViewDataTextColumn>
                                            <dxe:GridViewDataTextColumn Caption="Level" FieldName="LevelName" VisibleIndex="2"
                                                Width="150px">
                                                <DataItemTemplate>
                                                    <asp:Label ID="lblLevelName" Text='<%# Eval("LevelName") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; cursor: pointer; word-wrap: break-word; display: inline-block;"></asp:Label>
                                                </DataItemTemplate>
                                                <EditItemTemplate>
                                                    <asp:Label ID="lblLevelName" Text='<%# Eval("LevelName") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; cursor: pointer; word-wrap: break-word; display: inline-block;"></asp:Label>
                                                </EditItemTemplate>
                                                <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                            </dxe:GridViewDataTextColumn>
                                            <dxe:GridViewDataTextColumn Width="150px" Caption="Designation" FieldName="TitleName"
                                                VisibleIndex="3">
                                                <DataItemTemplate>
                                                    <asp:Label ID="lblDesignation" Text='<%# Eval("TitleName") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; cursor: pointer; word-wrap: break-word; display: inline-block;"></asp:Label>
                                                </DataItemTemplate>
                                                <EditItemTemplate>
                                                    <asp:Label ID="lblDesignation" Text='<%# Eval("TitleName") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; cursor: pointer; word-wrap: break-word; display: inline-block;"></asp:Label>
                                                </EditItemTemplate>
                                                <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                            </dxe:GridViewDataTextColumn>
                                            <dxe:GridViewDataTextColumn Caption="Gender" FieldName="Gender" VisibleIndex="4"
                                                Width="80px" Visible="false">
                                                <DataItemTemplate>
                                                    <asp:Label ID="lblGender" Text='<%# Eval("Gender") %>' runat="server"></asp:Label>
                                                </DataItemTemplate>
                                                <EditItemTemplate>
                                                    <asp:Label ID="lblGender" Text='<%# Eval("Gender") %>' runat="server"></asp:Label>
                                                </EditItemTemplate>
                                                <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                            </dxe:GridViewDataTextColumn>
                                            <dxe:GridViewDataTextColumn Caption="Date" FieldName="date" VisibleIndex="5"
                                                Width="136px">
                                                <DataItemTemplate>
                                                    <asp:Label ID="lblDate" Text='<%# Eval("date") %>' runat="server"></asp:Label>
                                                </DataItemTemplate>
                                                <EditItemTemplate>
                                                    <asp:Label ID="lblDate" Text='<%# Eval("date") %>' runat="server"></asp:Label>
                                                </EditItemTemplate>
                                                <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                            </dxe:GridViewDataTextColumn>
                                            <dxe:GridViewDataTextColumn Caption="Out Time" FieldName="OutTime" VisibleIndex="6"
                                                Width="126px">
                                                <DataItemTemplate>
                                                    <asp:Label ID="lbloutTime" Text='<%# Eval("OutTime") %>' runat="server"></asp:Label>
                                                </DataItemTemplate>
                                                <EditItemTemplate>
                                                    <asp:Label ID="lbloutTime" Text='<%# Eval("OutTime") %>' runat="server"></asp:Label>
                                                </EditItemTemplate>
                                                <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                            </dxe:GridViewDataTextColumn>
                                            <dxe:GridViewDataTextColumn Caption="Early Out" FieldName="EarlyOut" VisibleIndex="7"
                                                Width="92px">
                                                <DataItemTemplate>
                                                    <asp:Label ID="lblEarlyOut" Text='<%# Eval("EarlyOut") %>' runat="server"></asp:Label>
                                                </DataItemTemplate>
                                                <EditItemTemplate>
                                                    <asp:Label ID="lblEarlyOut" Text='<%# Eval("EarlyOut") %>' runat="server"></asp:Label>
                                                </EditItemTemplate>
                                                <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                            </dxe:GridViewDataTextColumn>
                                            <dxe:GridViewDataTextColumn Caption="Reason" FieldName="Reason" VisibleIndex="8"
                                                Width="250px">
                                                <EditItemTemplate>
                                                    <asp:TextBox TextMode="MultiLine" onpaste="return true" ID="txt_Reason" Text='<%# Bind("Reason") %>'
                                                        onkeyPress="return acceptChars_MaxLength(event,this,255,MaxLength,MaxLength)"
                                                        CssClass="textbox_4" runat="server" MaxLength="255" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; cursor: pointer; word-wrap: break-word; display: inline-block; height: 22px; resize: none"></asp:TextBox>
                                                </EditItemTemplate>
                                                <DataItemTemplate>
                                                    <asp:Label ID="lblReason" Text='<%# Eval("Reason") %>' 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" />
                                            </dxe:GridViewDataTextColumn>
                                            <dxe:GridViewCommandColumn VisibleIndex="9" Caption=" " Width="40px">
                                                <EditButton Visible="True">
                                                </EditButton>
                                                <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                            </dxe:GridViewCommandColumn>
                                        </Columns>
                                        <ClientSideEvents CustomizationWindowCloseUp="function(s, e) { UpdateCustomizationWindowValue(); }" />
                                        <SettingsPager PageSize="10">
                                            <PageSizeItemSettings Visible="true" ShowAllItem="true" Items="10,20,50,100,200" />
                                        </SettingsPager>
                                        <Settings ShowFilterRow="true" ShowFilterRowMenu="true" HorizontalScrollBarMode="Auto" ShowGroupPanel="true" VerticalScrollBarMode="Hidden" VerticalScrollableHeight="400" />
                                        <SettingsText EmptyDataRow="No Records Found" />
                                        <SettingsBehavior AutoExpandAllGroups="false" ColumnResizeMode="Control" />
                                        <SettingsBehavior AllowDragDrop="true" />
                                        <Styles AlternatingRow-CssClass="table-bg">
                                        </Styles>
                                        <GroupSummary>
                                            <dxe:ASPxSummaryItem FieldName="Date" SummaryType="Count" />
                                        </GroupSummary>
                                        <SettingsCustomizationWindow Enabled="True" />
                                        <SettingsBehavior AllowDragDrop="true" />
                                    </dxe:ASPxGridView>
                                    <dxe:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="grv_Earlyout">
                                        <PageFooter Right="[Page # of Pages #]">
                                        </PageFooter>
                                    </dxe:ASPxGridViewExporter>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                    </div>
                </div>
                <div class="row form-group">
                    <div class="col-md-12">
                        <div class="pull-right-button">
                            <asp:LinkButton ID="btn_View" runat="server" OnClick="btn_View_Click" CssClass="btn save-btn fa-eye" />
                            <asp:LinkButton ID="lnktbnexcel" Text="&nbsp;&nbsp;Export To Excel" ToolTip="Excel" CommandName="excel" runat="server" CssClass="btn del-btn fa-file-excel-o" OnClick="btnExport_Click">
                            </asp:LinkButton>
                            <asp:LinkButton ID="lnkbtnpdf" Text="&nbsp;&nbsp;Export To PDF" ToolTip="Pdf" CommandName="pdf" runat="server" CssClass="btn del-btn fa-file-pdf-o" OnClick="btnExport_Click">
                            </asp:LinkButton>
                            <asp:LinkButton ID="btnCustWindow" runat="server" CssClass="btn save-btn fa-folder-open-o"
                                Text="&nbsp;&nbsp;Field Lists" OnClientClick="ShowHideCustomizationWindow();"></asp:LinkButton>
                            <asp:LinkButton ID="btnBack" CssClass="btn save-btn fa-angle-left" runat="server"
                                OnClientClick="location.href='TA_UI_Report_LateInstance.aspx';return false;" />
                            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="SelectEarlyOutReportNew"
                                TypeName="GetReports" UpdateMethod="ReasonEntry_EarlyExit">
                                <SelectParameters>
                                    <asp:QueryStringParameter Name="dtFromDate" QueryStringField="From" Type="String" />
                                    <asp:QueryStringParameter Name="dtToDate" QueryStringField="To" Type="String" />
                                    <asp:QueryStringParameter Name="empId" QueryStringField="EmpID" Type="String" />
                                    <asp:QueryStringParameter Name="shft" QueryStringField="Shift" Type="Int32" />
                                    <asp:QueryStringParameter Name="empName" QueryStringField="EmpName" Type="String" />
                                    <asp:SessionParameter Name="levId" Type="String" SessionField="pLevel" />
                                    <asp:QueryStringParameter Name="employeeCategory" QueryStringField="EmployeeCategory"
                                        Type="Int32" />
                                    <asp:QueryStringParameter Name="employeeType" QueryStringField="EmployeeType" Type="Int32" />
                                    <asp:SessionParameter Name="UserGroupName" SessionField="UserGroupName" Type="string" />
                                    <asp:SessionParameter Name="GradeLevel" SessionField="GradeLevel" Type="string" />
                                    <asp:QueryStringParameter Name="strSwipeCard" QueryStringField="SwipeCard" Type="String" />
                                    <asp:QueryStringParameter Name="ParentId" QueryStringField="ParentLevelid" Type="Int32" />
                                    <asp:QueryStringParameter Name="DesignationId" QueryStringField="Designation" Type="Int32" />
                                    <asp:QueryStringParameter Name="Gender" QueryStringField="Gender" Type="String" />
                                    <asp:QueryStringParameter Name="ExportType" QueryStringField="ExportType" Type="Int32" DefaultValue="1" />
                                    <asp:QueryStringParameter Name="MinExceptkHours" QueryStringField="MinExceptHours" Type="String" DefaultValue="" />
                                    <asp:SessionParameter Name="EmpAutoID" SessionField="EmpAutoId" Type="Int32" />
                                </SelectParameters>
                                <UpdateParameters>
                                    <asp:Parameter Name="Reason" Type="String" />
                                    <asp:Parameter Name="Process_Rec_ID" Type="Int32" />
                                </UpdateParameters>
                            </asp:ObjectDataSource>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script type="text/javascript">

        var MaxLength = "Maximum length is ";


        function MaxLengthh(maxLength) {

            MaxLength = maxLength;
        }
    </script>

</asp:Content>
