<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Hrm_Employee_MyGatePassRequest, App_Web_mpvs5e2w" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl" TagPrefix="Date" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/Common/EmployeeSearch/EmployeeSearch.ascx" TagName="EmployeeSearchControl" TagPrefix="hims" %>
<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="timePicker" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="ResonMasterUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <hims:EmployeeSearchControl ID="EmployeeSearch" Visible="false" runat="server" />
            <hims:EmployeeSearchControl ID="AssignEmployeeSearch" Visible="false" runat="server" />
            <div id="divContentPage" class="divcontentpagemargin">

                <div class="dashBoardLeftCont">
                    <div class="himssuHeader3WireBox">
                        <div class="himsBoxContent">
                            <div class="leftUlMenu">
                                <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="213"
                                    Visible="true" runat="server" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <div class="himssuHeader5WireBox card card-box" id="SearchDiv" runat="server" visible="true">
                        <div class="himsBoxHeader card-head">
                            <asp:Panel ID="Panel1" runat="server">
                                <div class="leftdiv">
                                </div>
                                <div class="himsBoxTitle">
                                    <div class="headerText">
                                        <header>
                                            <i class="fas fa-search"></i>
                                            <asp:Label ID="Label3" runat="server" Text="Search"></asp:Label>
                                        </header>
                                    </div>
                                    <div class="fRight mt-27">
                                        <asp:Button ID="AddNewButtonID" runat="server" OnClick="AddNewButton_Click" SkinID="0"
                                            class="btn btn-add fas" Text="&#xf067; Add" />
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                        <div class="himsBoxContent card-body">
                            <asp:Panel ID="DetailPanel" runat="Server">
                                <div class="contentHolder">
                                    <asp:Panel ID="SearchCriteriaPanel" runat="Server">
                                         
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SearchEntryModeStatusLabel" runat="server" Text="Entry Status"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList runat="server" ID="SearchEntryModeStatusDropDownList" SkinID="CustomWidthDropDownList"
                                                    class="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                </asp:DropDownList>
                                            </div>
                                        </div>

                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="StatusSearchLabel" runat="server" Text="Status"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList runat="server" ID="SearchStatusDropDownList" SkinID="CustomWidthDropDownList"
                                                    CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                </asp:DropDownList>
                                            </div>
                                        </div>

                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="FromDateLabel" runat="server" Text="From Date" Visible="true"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <Date:DatePickerControl DisplayDatePicker="true" ID="FromDatePickerControl" Visible="true"
                                                    runat="server" />
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="ToDateLabel" runat="server" Text="To Date" Visible="true"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <Date:DatePickerControl DisplayDatePicker="true" ID="ToDatePickerControl" Visible="true"
                                                    runat="server" />
                                            </div>
                                        </div>

                                        <div class="cBoth"></div>

                                        <div class="alignCenter pTop5 col-md-12">
                                            <asp:Button ID="SearchButton" Text="&#xf002; Search" runat="Server" OnClick="SearchButton_Click"
                                                SkinID="0" class="btn-search btn fas" />
                                            <asp:Button ID="ResetButton" runat="server" Text="&#xf0e2; Reset" class="btn-reset btn fas" SkinID="0" OnClick="ResetButton_Click" />
                                            <asp:Button ID="ExportButton" runat="server" Text="&#xf093; Export" OnClick="ExportButton_Click" SkinID="0"  CssClass="btn btn-examcommon fas"/>
                                        </div>

                                        <br />
                                    </asp:Panel>
                                    <div id="Div1" class="himssuHeader7WireBox col-md-12 pb5 mt2" runat="server">
                                        <div id="EmployeeGatePassRequestDiv" visible="false" runat="server">

                                            <div class="himsBoxHeader">
                                                <div class="leftdiv">
                                                </div>
                                                <div class="himsBoxTitle">
                                                </div>
                                            </div>
                                            <div class="himsBoxContent pTop5">
                                                <asp:UpdatePanel ID="MenuPlanDetailUpdatePanel" runat="server" UpdateMode="Always">
                                                    <ContentTemplate>
                                                        <div id="Div5" runat="server" visible="false">
                                                            <div class="table-responsive">
                                                                <asp:GridView ID="EmployeeGatePassRequestGridView" runat="server" AutoGenerateColumns="False"
                                                                    OnRowDataBound="EmployeeGatePassRequestGridView_RowDataBound" AllowPaging="false" SkinID="" ShowHeader="True" PagerSettings-Visible="false"
                                                                    DataKeyNames="Id,OrgId,StatusId" EmptyDataText="No records Found !!!" CssClass="table table-striped table-bordered table-hover">
                                                                    <Columns>
                                                                        <asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:LinkButton ID="EditLinkButton" runat="server" CommandName="Select" OnClick="LinkButton_Click"
                                                                                    Text="Select" CausesValidation="false"></asp:LinkButton>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Organization" ItemStyle-Width="12%" HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="OrgLabel" runat="server" Text='<%#Eval("Organization")%>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Code" ItemStyle-Width="5%" HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="CodeLabel" runat="server" Text='<%#Eval("Code")%>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Name" ItemStyle-Width="23%" HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="NameLabel" runat="server" Text='<%#Eval("Name")%>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Gate Pass Date" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="GatePassDateLabel" runat="server" Text='<%# Bind("GatePassDate","{0:dd/MM/yyyy}") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Return Gate Pass Date" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="ReturnGatePassDateLabel" runat="server" Text='<%# Bind("ReturnGatePassDate","{0:dd/MM/yyyy}") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Gate Pass Time" ItemStyle-Width="10%" SortExpression="Title"
                                                                            HeaderStyle-HorizontalAlign="Right" ItemStyle-Wrap="true" ItemStyle-HorizontalAlign="Right">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="GatePassTimeLabel" runat="server" Text='<%# Bind("GatePassTime","{0:hh:mm tt}") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Return Gate Pass Time" ItemStyle-Width="15%" SortExpression="Title"
                                                                            HeaderStyle-HorizontalAlign="Right" ItemStyle-Wrap="true" ItemStyle-HorizontalAlign="Right">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="ReturnGatePassTimeLabel" runat="server" Visible="false" Text='<%# Bind("ReturnGatePassTime","{0:hh:mm tt}") %>'></asp:Label>
                                                                                <asp:Button ID="ReturnGatePassTimeButton" runat="server" Text="Out" OnClick="OutTimeButton_Click" 
                                                                                    Width="40px" SkinID="0" ForeColor="White" BackColor="Black" />
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Entry Status" ItemStyle-Width="5%" HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="EntryModeStatusLabel" runat="server" Text='<%#Eval("EntryModeStatus")%>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Status" ItemStyle-Width="5%" HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="StatusLabel" runat="server" Text='<%#Eval("Status")%>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                    </Columns>
                                                                </asp:GridView>
                                                            </div>
                                                        </div>
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                    </div>
                    <div class="himssuHeader1WireBox card card-box" id="DetailDiv" runat="server" visible="false">
                        <div class="himsBoxHeader card-head">
                            <div class="leftdiv">
                            </div>
                            <div class="himsBoxTitle">
                                <div class="headerText">
                                    <header>
                                        <i class="fas fa-registered"></i>
                                        <asp:Label ID="EmployeeGatePassDetailLabel" runat="server" Text="Student Gate Pass"></asp:Label>
                                    </header>
                                </div>
                            </div>
                            <div class="fRight mt-27">
                                <table>
                                    <tr>
                                        <td class="formLabel">
                                            <div id="NumberOfRecordDiv" class="display-flex" runat="server" visible="true">
                                                <asp:LinkButton AlternateText="First page" ToolTip="First page" ID="FirstRecordImageButton"
                                                    runat="server" ImageUrl="~/Images/arrowLlast.gif" CommandName="Page" CommandArgument="First"
                                                    OnClick="FirstRecordImageButton_Click" CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                                <i class="fa fa-fast-backward"></i>
                                                </asp:LinkButton>
                                                <asp:LinkButton AlternateText="Previous page" ToolTip="Previous page" ID="PreviousImageButton"
                                                    runat="server" ImageUrl="~/Images/arrowLeft.gif" CommandName="Page" CommandArgument="Prev"
                                                    OnClick="PreviousImageButton_Click" CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                                <i class="fa fa-play fa-rotate-180"></i>
                                                </asp:LinkButton>
                                                &nbsp;&nbsp;
                                                            <asp:Label ID="LabelPage" runat="server" Text="Record " AssociatedControlID="ReCordNumber" />
                                                <asp:Label ID="ReCordNumber" Font-Bold="true" SkinID="Dummy" runat="server"></asp:Label>
                                                <asp:Label ID="ofLabel" Text="of" runat="server" />
                                                <asp:Label ID="TotalRecord" runat="server" />
                                                &nbsp;&nbsp;
                                                            <asp:LinkButton AlternateText="Next page" ToolTip="Next page" ID="NextImageButtom"
                                                                runat="server" ImageUrl="~/Images/arrowRight.gif" CommandName="Page" CommandArgument="Next"
                                                                OnClick="NextImageButton_Click" CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                                <i class="fa fa-play"></i>
                                                            </asp:LinkButton>
                                                <asp:LinkButton AlternateText="Last page" ToolTip="Last page" ID="LastRecordImageButton"
                                                    runat="server" ImageUrl="~/Images/arrowRLast.gif" CommandName="Page" CommandArgument="Last"
                                                    OnClick="LastRecordImageButton_Click" CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                                <i class="fa fa-fast-forward"></i>
                                                </asp:LinkButton>
                                            </div>
                                        </td>
                                        <td>&nbsp;&nbsp;
                                            <asp:Button ID="BackButton" runat="Server" OnClick="BackButton_Click" SkinID="0"
                                                class="btn btn-back fas" Text="&#xf30a; Back" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                        <div class="himsBoxContent card-body">
                            <div class="contentHolder">
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="OrgLabel" runat="server" Text="Organization" SkinID="MandatoryLabel"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:DropDownList runat="server" ID="OrgDropDownList" SkinID="CustomWidthDropDownList"
                                            class="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" AutoPostBack="true"
                                            OnSelectedIndexChanged="OrgDropDownList_SelectedIndexChanged">
                                        </asp:DropDownList>
                                        <asp:HiddenField ID="IdHiddenField" runat="server" />
                                    </div>
                                </div>

                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="EntryModeStatusLabel" runat="server" Text="Entry Mode Status" SkinID="MandatoryLabel"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:DropDownList runat="server" ID="EntryModeStatusDropDownList" SkinID="CustomWidthDropDownList"
                                            class="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                        </asp:DropDownList>
                                    </div>
                                </div>


                                <asp:Panel ID="StudentSearchPanel" runat="server">
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="StudentIdNoLabel" runat="server" Text="Code" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5 display-flex">
                                            <asp:TextBox ID="CodeTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                SkinID="CustomWidthTextBox" Width="150px" runat="server" MaxLength="20"
                                                AutoPostBack="true" OnTextChanged="CodeTextBox_TextChanged">
                                            </asp:TextBox>
                                            <asp:ImageButton SkinID="FindImage" ToolTip="Search" ID="CodeImageButton"
                                                runat="server" ImageUrl="~/Images/icons/icon_find.gif" />
                                            <asp:HiddenField ID="SourceIdHiddenField" runat="server" />
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="EmployeeNameLabel" runat="server" Text="Name"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="EMployeeNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                        </div>
                                    </div>
                                </asp:Panel>

                                <div class="outerBox11 pTop5 col-md-3 ">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="ReasonOfGatePassLabel" runat="server" Text="Reason Of Gate Pass" SkinID="MandatoryLabel"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="ReasonOfGatePassTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                            SkinID="MultiLineTextBox" TextMode="MultiLine" class="inputBox" runat="server"
                                            MaxLength="200"> </asp:TextBox>
                                    </div>
                                </div>

                                <div class="outerBox11 pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="RemarkLabel" runat="server" Text="Remark"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="RemarkTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                            SkinID="MultiLineTextBox" class="inputBox" TextMode="MultiLine" runat="server"
                                            MaxLength="200"> </asp:TextBox>
                                    </div>
                                </div>

                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="GatePassDateLabel" runat="server" Text="Gate Pass Date" Visible="True" SkinID="MandatoryLabel"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <Date:DatePickerControl DisplayDatePicker="true" ID="GatePassDateDatePickerControl"
                                            Visible="True" runat="server" />
                                    </div>
                                </div>
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="ReturnGatePassDateLabel" runat="server" Text="Return Gate Pass Date" Visible="True" SkinID="MandatoryLabel"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <Date:DatePickerControl DisplayDatePicker="true" ID="ReturnGatePassDateDatePickerControl"
                                            Visible="True" runat="server" />
                                    </div>
                                </div>
                               <%-- <div class="outerBox11 pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="GatePassTimeLabel" runat="server" Text="Gate Pass Time"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <timePicker:TimeSelector ID="GatePassTimeTimeSelector" runat="server" DisplaySeconds="False"
                                            SelectedTimeFormat="Twelve" AmPm="AM" Date="" Hour="0" Minute="0" Visible="true"
                                            Second="0" meta:resourcekey="ActivityStartTimeSelectorResource1" />
                                    </div>
                                </div>--%>
                                <div class="cBoth pTop5"></div>
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="InTimeLabel" runat="server" Text="In Time"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <timePicker:TimeSelector ID="InTimeSelector" runat="server" DisplaySeconds="False"
                                            SelectedTimeFormat="Twelve" AmPm="AM" Date="" Hour="0" Minute="0" Visible="true"
                                            Second="0" meta:resourcekey="ActivityStartTimeSelectorResource1" class="timepicker"/>
                                    </div>
                                </div>
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="OutTimeLabel" runat="server" Text="Out Time"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <timePicker:TimeSelector ID="OutTimeSelector" runat="server" DisplaySeconds="False"
                                            SelectedTimeFormat="Twelve" AmPm="AM" Date="" Hour="0" Minute="0" Visible="true"
                                            Second="0" meta:resourcekey="ActivityStartTimeSelectorResource1" class="timepicker"/>
                                    </div>
                                </div>
                                
                                <asp:Panel ID="AssignEmployeePanel" runat="server">
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="AssingEmployeeCodeLabel" runat="server" Text="Assign Employee Code" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5 display-flex">
                                            <asp:TextBox ID="AssignEmployeeCodeTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                SkinID="CustomWidthTextBox" Width="150px" runat="server" MaxLength="20" OnTextChanged="AssignEmployeeCodeTextBox_TextChanged"
                                                AutoPostBack="true">
                                            </asp:TextBox>
                                            <asp:ImageButton SkinID="FindImage" ToolTip="Search" ID="AssignEmployeeImageButton"
                                                runat="server" ImageUrl="~/Images/icons/icon_find.gif" />
                                            <asp:HiddenField ID="AssignEmployeeIdHiddenField" runat="server" />
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="AssignEmployeeNameLabel" runat="server" Text="Assign Employee Name"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="AssignEmployeeNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                        </div>
                                    </div>
                                </asp:Panel>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--<script data-main="../../JavaScript/rjs/employee-gatepass" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/employee-gatepass")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>
