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


<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerAutoPostBackControl.ascx" TagName="DatePickerControl" TagPrefix="Date" %>
<%@ Register Src="~/UserControls/Common/EmployeeSearch/EmployeeSearch.ascx" TagName="EmployeeSearchControl" TagPrefix="hims" %>
<%@ Register Src="~/UserControls/AutoComplete/AutoCompleteControl.ascx" TagName="AutoCompleteControl" TagPrefix="acc" %>
<%@ Register Src="~/UserControls/Common/CommonSearch/CommonSearch.ascx" TagName="CommonSearchUserControl" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/Common/StudentSearch/StudentSearch.ascx" TagName="StudentSearch" TagPrefix="Std" %>
<%@ 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>
            <Std:StudentSearch ID="StudentSearch" 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="221"
                                    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" SkinID="0" OnClick="AddNewButton_Click"
                                            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="SearchGatePassTypeLabel" runat="server" Text="Gate Pass Type"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList runat="server" ID="SearchGatePassTypeDropDownList" SkinID="CustomWidthDropDownList"
                                                    class="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                    <asp:ListItem Text="- ALL -" Value="0"></asp:ListItem>
                                                    <asp:ListItem Text="Personal" Value="1"></asp:ListItem>
                                                    <asp:ListItem Text="School" Value="2"></asp:ListItem>
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SearchVehicleTypeLabel" runat="server" Text="Vehicle Type"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                               <asp:DropDownList runat="server" ID="SearchVehicleTypeDropDownList" SkinID="CustomWidthDropDownList"
                                                    class="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3" runat="server" display="none">
                                            <timePicker:TimeSelector ID="TimeSelector1" runat="server" DisplaySeconds="False" 
                                                SelectedTimeFormat="Twelve" AmPm="AM" Date="" Hour="0" Minute="0" Enabled="false"
                                                Second="0" meta:resourcekey="ActivityStartTimeSelectorResource1" CssClass="pTop5" />
                                        </div>


                                        <div class="alignCenter pTop5 col-md-12">
                                            <asp:Button ID="SearchButton" Text="&#xf002; Search" runat="Server" SkinID="0" class="btn-search btn fas" OnClick="SearchButton_Click"/>
                                            <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" SkinID="0" class="btn btn-examcommon btn fas" />--%>
                                        </div>

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

                                            <div class="himsBoxHeader">
                                                <div class="leftdiv">
                                                </div>
                                                <div class="himsBoxTitle">
                                                    <%-- <div class="headerText">
                                                        <asp:Label ID="StudentGatePassLabel" runat="server" Text="Student Gate Pass List"></asp:Label>
                                                    </div>--%>
                                                </div>
                                            </div>
                                            <div class="himsBoxContent">
                                                <asp:UpdatePanel ID="MenuPlanDetailUpdatePanel" runat="server" UpdateMode="Always">
                                                    <ContentTemplate>
                                                        <div id="Div5" runat="server" visible="false">
                                                            <div class="table-responsive">
                                                                <asp:GridView ID="VehicleLogGridView" runat="server" AutoGenerateColumns="False"
                                                                    AllowPaging="false" SkinID="" ShowHeader="True" PagerSettings-Visible="false" OnRowDataBound="VehicleLogGridView_RowDataBound"
                                                                    DataKeyNames="Id,OrgGroupId,GatepassTypeId,VehicleTypeId" 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="Gatepass Type" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="GatepassType" runat="server" Text='<%# Bind("GatepassType") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Vehicle Type" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="VehicleType" runat="server" Text='<%# Bind("VehicleType") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Vehicle No" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="VehicleNo" runat="server" Text='<%# Bind("VehicleNo") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Driver Name" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="DriverName" runat="server" Text='<%# Bind("DriverName") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Driver Contact No" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="DriverContactNo" runat="server" Text='<%# Bind("DriverContactNo") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                         <asp:TemplateField HeaderText="Vehicle In Date Time" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="VehicleInDateTime" runat="server" Text='<%# Bind("VehicleInDateTime","{0:HH:mm:ss}") %>'></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">
                                <header>
                                    <asp:Label ID="StudentGatePassDetailLabel" runat="server" Text="Vehicle Log"></asp:Label>
                                </header>


                            </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" OnClick="FirstRecordImageButton_Click"
                                                    runat="server" ImageUrl="~/Images/arrowLlast.gif" CommandName="Page" CommandArgument="First"
                                                    CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                                <i class="fa fa-fast-backward"></i>
                                                </asp:LinkButton>
                                                <asp:LinkButton AlternateText="Previous page" ToolTip="Previous page" ID="PreviousImageButton" OnClick="PreviousImageButton_Click"
                                                    runat="server" ImageUrl="~/Images/arrowLeft.gif" CommandName="Page" CommandArgument="Prev"
                                                    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" OnClick="NextImageButton_Click"
                                                                runat="server" ImageUrl="~/Images/arrowRight.gif" CommandName="Page" CommandArgument="Next"
                                                                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"  SkinID="0" OnClick="BackButton_Click"
                                                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="GatePassTypeLabel" runat="server" Text="Gate Pass Type" SkinID="MandatoryLabel"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:DropDownList runat="server" ID="GatePassTypeDropDownList" SkinID="CustomWidthDropDownList"
                                            class="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                            <asp:ListItem Text="- Select -" Value="0"></asp:ListItem>
                                            <asp:ListItem Text="Personal" Value="1"></asp:ListItem>
                                            <asp:ListItem Text="School" Value="2"></asp:ListItem>
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="GatePassIdLabel" runat="server" Text="Gate Pass Id"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="GatePassIdTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" Enabled ="false"
                                            SkinID="CustomWidthTextBox" runat="server"> </asp:TextBox>
                                    </div>
                                </div>
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="VehicleNoLabel" runat="server" Text="Vehicle No" SkinID="MandatoryLabel"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="VehicleNoTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                            SkinID="CustomWidthTextBox" runat="server"> </asp:TextBox>
                                    </div>
                                </div>
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="VehicleTypeLabel" runat="server" Text="Vehicle Type" SkinID="MandatoryLabel"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:DropDownList runat="server" ID="VehicleTypeDropDownList" 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="DriverNameLabel" runat="server" Text="Driver Name" SkinID="MandatoryLabel"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="DriverNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                            SkinID="CustomWidthTextBox" runat="server"> </asp:TextBox>
                                    </div>
                                </div>
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="DriverContactLabel" runat="server" Text="Driver Contact"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="DriverContactTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" onkeypress="return isNumberKey(event)"
                                            SkinID="CustomWidthTextBox" runat="server"> </asp:TextBox>
                                    </div>
                                </div>
                                <div class="outerBox11 pTop5 col-md-3 ">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="PurposeOfVisitLabel" Text="Purpose Of Visit" runat="server"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="PurposeOfVisitTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                            SkinID="CustomWidthTextBox" runat="server"> </asp:TextBox>
                                    </div>
                                </div>
                                <div class="cBoth"></div>
                               
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="VehicleInTimeLabel" runat="server" Text="Vehicle In Time"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                       
                                         <timePicker:TimeSelector ID="VehicleInTimeSelector" 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="VehicleOutTimeLabel" runat="server" Text="Vehicle Out Time"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <timePicker:TimeSelector ID="VehicleOutTimeSelector" 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="outerBox11 pTop5 col-md-3 ">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="RemarkLabel" Text="Remark" runat="server"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="RemarkTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                            SkinID="CustomWidthTextBox" runat="server" TextMode="MultiLine"> </asp:TextBox>
                                    </div>
                                </div>
                                <asp:HiddenField ID="IdHiddenField" runat="server" />
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </ContentTemplate>
    </asp:UpdatePanel>
    <script type="text/javascript">
        function isNumberKey(evt) {
            var charCode = (evt.which) ? evt.which : event.keyCode
            if (charCode > 31 && (charCode < 48 || charCode > 57)) {
                return false;
            }
            
        }
        </script>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/vehicle-log")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>
