<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_FrontOffice_AppointmentScheduling_VisitorLog, App_Web_hpoycyi1" title="Visitor Log" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl" TagPrefix="Date" %>
<%@ 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/AutoComplete/AutoCompleteControl.ascx" TagName="AutoCompleteControl" TagPrefix="acc" %>
<%@ Register Src="~/UserControls/Common/EmployeeSearch/EmployeeSearch.ascx" TagName="EmployeeSearchControl" TagPrefix="hims" %>
<%@ 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" />
            <hims:EmployeeSearchControl ID="EmployeeSearch" 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="168"
                                    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="SearchOrgLabel" runat="server" Text="Organization"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList runat="server" ID="SearchOrgDropDownList" 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="SearchTypeLabel" runat="server" Text="Type"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList runat="server" ID="SearchTypeDropDownList" 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="SearchWhomToMeetLabel" runat="server" Text="Whom To Meet"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="SearchWhomToMeetTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                    SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <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="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="outerBox pTop5 col-md-3" id="StatusDiv" runat="server">
                                            <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>
                                        <%--Added for mantis : 36642--%>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="VisitorNameLabel" runat="server" Text="Visitor Name"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="VisitorNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                    SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                            </div>
                                        </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" class="btn btn-examcommon fas" />
                                        </div>
                                    </asp:Panel>
                                    <div id="Div1" class="himssuHeader7WireBox col-md-12" runat="server">
                                        <div id="ReasonMasterDetailDiv" visible="false" runat="server">

                                            <div class="himsBoxHeader">
                                                <div class="leftdiv">
                                                </div>
                                                <div class="himsBoxTitle">
                                                    <div class="headerText">
                                                        <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="himsBoxContent pTop10 ">
                                                <asp:UpdatePanel ID="MenuPlanDetailUpdatePanel" runat="server" UpdateMode="Always">
                                                    <ContentTemplate>
                                                        <div id="Div5" runat="server" visible="false">
                                                            <div class="table-responsive">
                                                                <asp:GridView ID="VisitorLogGridView" runat="server" AutoGenerateColumns="False"
                                                                    OnRowDataBound="VisitorLogGridView_RowDataBound" OnPageIndexChanging="VisitorLogGridView_PageIndexChanging"
                                                                    AllowPaging="false" SkinID="" ShowHeader="True" PagerSettings-Visible="false"
                                                                    DataKeyNames="VisitorId,OrgId,StatusId,ContactNumber,StudentCode,StudentName,StudentClass,StudentDivision" 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="10%" SortExpression="Title"
                                                                            HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="OrgLabel" runat="server" Text='<%# Bind("Organization") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Visitor Type" ItemStyle-Width="10%" SortExpression="Type"
                                                                            HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="VisitorTypeLabel" runat="server" Text='<%# Bind("VisitorType") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Visitor Name" ItemStyle-Width="10%" SortExpression="Title"
                                                                            HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="VisitorLabel" runat="server" Text='<%# Bind("VisitorName") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="No. Of Visitor(s)" ItemStyle-Width="10%" SortExpression="Title"
                                                                            HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="NoOfVisitorLabel" runat="server" Text='<%# Bind("NoOfVisitor") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Purpose" ItemStyle-Width="10%" SortExpression="Title"
                                                                            HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="PurposeOfVisitLabel" runat="server" Text='<%# Bind("PurposeOfVisit") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Whom To Meet" ItemStyle-Width="10%" SortExpression="Title"
                                                                            HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="WhomToMeetNameLabel" runat="server" Text='<%# Bind("WhomToMeetName") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Visit Date" ItemStyle-Width="10%" SortExpression="Title"
                                                                            HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="VisitDateLabel" runat="server" Text='<%# Bind("VisitDate","{0:dd/MM/yyyy}") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="In Time" ItemStyle-Width="10%" SortExpression="Title"
                                                                            HeaderStyle-HorizontalAlign="Right" ItemStyle-Wrap="true" ItemStyle-HorizontalAlign="Right">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="InTimeLabel" runat="server" Text='<%# Bind("InTime","{0:HH:mm:ss}") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Out Time" ItemStyle-Width="15%" SortExpression="Title"
                                                                            HeaderStyle-HorizontalAlign="Right" ItemStyle-Wrap="true" ItemStyle-HorizontalAlign="Right">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="OutTimeLabel" runat="server" Visible="false" Text='<%# Bind("OutTime","{0:HH:mm:ss}") %>'></asp:Label>
                                                                                <asp:Button ID="OutTimeButton" runat="server" Text="Out" OnClick="OutTimeButton_Click"
                                                                                    Width="40px" SkinID="0" ForeColor="White" BackColor="Black" />
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Remark" ItemStyle-Width="15%" SortExpression="Title" Visible="false"
                                                                            HeaderStyle-HorizontalAlign="Right" ItemStyle-Wrap="true" ItemStyle-HorizontalAlign="Right">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="RemarkLabel" runat="server" Visible="false" Text='<%# Bind("Remark") %>'></asp:Label>
                                                                                <%--<asp:Button ID="OutTimeButton" runat="server" Text="Out" OnClick="OutTimeButton_Click"
                                                                                            Width="40px" SkinID="CustomWidthButton" ForeColor="White" BackColor="Black" />--%>
                                                                            </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="fab fa-vimeo-v"></i>
                                        <asp:Label ID="VisitorLogDetailLabel" runat="server" Text="Visitor Log"></asp:Label>
                                    </header>

                                </div>
                            </div>
                            <div class="fRight mt-27 pagination display-flex">
                                <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>
                                    </div>
                                </div>
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="TypeLabel" runat="server" Text="Type"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:DropDownList runat="server" ID="TypeDropDownList" SkinID="CustomWidthDropDownList"
                                            class="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" AutoPostBack="true" OnSelectedIndexChanged="TypeDropDownList_SelectedIndexChanged">
                                        </asp:DropDownList>
                                    </div>
                                </div>

                                <div id="StudentSearchDiv" runat="server" visible="false">
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="StudentIdNoLabel" runat="server" Text="ID No" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5 display-flex">
                                            <asp:TextBox ID="StudentIdNoTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                SkinID="CustomWidthTextBox" runat="server" MaxLength="200"
                                                AutoPostBack="true" OnTextChanged="StudentIdNoTextBox_TextChanged">
                                            </asp:TextBox>
                                            <asp:ImageButton SkinID="FindImage" ToolTip="Student Search" ID="StudentIdNoImageButton"
                                                runat="server" ImageUrl="~/Images/icons/icon_find.gif" />
                                            <asp:HiddenField ID="SourceIdHiddenField1" runat="server" />
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="StudentNameLabel" runat="server" Text="Name"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="StudentNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                SkinID="CustomWidthTextBox" runat="server" MaxLength="200" Enabled="false"> </asp:TextBox>
                                        </div>
                                    </div>
                                    <%--<div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="VisitDateLabel" runat="server" Text="Visit Date" Visible="True"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <Date:DatePickerControl DisplayDatePicker="true" ID="VisitDatePickerControl"
                                                Visible="True" runat="server" />
                                        </div>
                                    </div>--%>
                                    <%--<div class="outerBox 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="GatePassTimeSelector" 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="ReturnGatePassTimeLabel" runat="server" Text="Return Gate Pass Time"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <timePicker:TimeSelector ID="ReturnGatePassTimeSelector" 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="col-md-12">
                                        <div class="outerBox11 pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="FatherPhotoLabel" runat="server" Text="Father Photo"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:ImageButton ID="FatherPhotoImage" runat="server" AlternateText=" " Height="80px" Width="80px"
                                                    Style="border: 1px Solid" OnClick="FatherPhotoImage_Click" />
                                            </div>
                                            <asp:Label ID="FatherNameLabel" runat="server"></asp:Label><br />
                                            <asp:Label ID="FatherMobileLabel" runat="server"></asp:Label>
                                        </div>
                                        <div class="outerBox11 pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="MotherPhotoLabel" runat="server" Text="Mother Photo"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:ImageButton ID="MotherPhotoImage" runat="server" AlternateText=" " Height="80px" Width="80px"
                                                    Style="border: 1px Solid" OnClick="MotherPhotoImage_Click" />
                                            </div>
                                            <asp:Label ID="MotherNameLabel" runat="server"></asp:Label><br />
                                            <asp:Label ID="MotherMobileLabel" runat="server"></asp:Label>
                                        </div>
                                        <div class="outerBox11 pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="RelativePhotoLabel" runat="server" Text="Relative Photo"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:ImageButton ID="RelativePhotoImage" runat="server" AlternateText=" " Height="80px" Width="80px"
                                                    Style="border: 1px Solid" OnClick="RelativePhotoImage_Click" />
                                            </div>
                                            <asp:Label ID="RelativeNameLabel" runat="server"></asp:Label><br />
                                            <asp:Label ID="RelativeMobileLabel" runat="server"></asp:Label>
                                        </div>
                                        <div class="outerBox11 pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="StudentPhotoLabel" runat="server" Text="Student Photo"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:ImageButton ID="StudentPhotoImage" Visible="true" runat="server" Height="80px" Width="80px"
                                                    AlternateText=" " Style="border: 1px Solid" Enabled="false" />
                                            </div>
                                        </div>
                                        <%--<div class="cBoth pTp5"></div>
                                        <div class="outerBox11 pTop5 col-md-3 ">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="StudentRemarkLabel" Text="Remark" runat="server"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="StudentRemarkTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                    SkinID="CustomWidthTextBox" runat="server" MaxLength="200" TextMode="MultiLine"> </asp:TextBox>
                                            </div>
                                        </div>--%>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="ClassLabel" runat="server" Text="Class"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="ClassTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                SkinID="CustomWidthTextBox" runat="server" MaxLength="200" Enabled="false"> </asp:TextBox>
                                        </div>
                                    </div>
                                </div>
                                <div id="VisitorSearchDiv" runat="server">
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="TitleLabel" runat="server" Text="Visitor Name" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="TitleTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                runat="server" MaxLength="100" AutoPostBack="false" SkinID="CustomWidthTextbox"></asp:TextBox>
                                            <asp:HiddenField ID="IdHiddenField" runat="server" />
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="NoOfVisitorLabel" Text="No. of Visitors" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="NoOfVisitorTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                SkinID="CustomWidthTextBox" runat="Server" MaxLength="100" onKeypress="javascript:return isNumber()"></asp:TextBox>
                                        </div>
                                    </div>

                                    <div class="outerBox 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" MaxLength="100"></asp:TextBox>
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="TestDateLabel" runat="server" Text="Visit Date" Visible="True"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <Date:DatePickerControl DisplayDatePicker="true" ID="VisitDateFromDatePickerControl"
                                                Visible="True" runat="server" />
                                        </div>
                                    </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>

                                    <div id="visitordiv" runat="server" visible="true">
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SourceNameLabel" runat="server" Text="Whom to Meet"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5 display-flex">
                                                <asp:TextBox ID="SourceNameTextBox" AutoPostBack="true" onmouseleave="showHideTooltip()"
                                                    Enabled="false" onmouseenter="showHideTooltip()" SkinID="CustomWidthTextBox"
                                                    runat="server" MaxLength="200" OnTextChanged="SourceNameTextBox_OnTextChanged"> </asp:TextBox>
                                                <asp:ImageButton SkinID="FindImage" ID="SourceCodeImageButton" 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="WhomToMeetLabel" Text="Meet Others" runat="server"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="WhomToMeetTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                    SkinID="CustomWidthTextBox" runat="server" MaxLength="200" OnTextChanged="WhomToMeetTextBox_OnTextChanged"> </asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3 ">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="contactNumberLabel" Text="Contact Number" runat="server"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="ContactNumberTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                SkinID="CustomWidthTextBox" onKeypress="javascript:return isNumber()" runat="server" MaxLength="100"> </asp:TextBox>
                                        </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" MaxLength="200" TextMode="MultiLine"> </asp:TextBox>
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <asp:ImageButton ID="VisitorPhoto" Visible="true" runat="server" Height="80px" Width="80px"
                                            AlternateText="Upload Photo" Style="border: 1px Solid" />
                                    </div>
                                    <div id="OTPDiv" visible="true" runat="server" class="outerBox pTop5 col-md-3">
                                        <div class="himsBoxHeader card-head inner">
                                            <asp:Button ID="GenerateOTPButton" Visible="true" runat="server" Text="&#xf044; Generate OTP" SkinID="0"
                                                class="btn green fas" OnClick="GenerateOTPButton_Click" />
                                        </div>
                                        <div class="outerBox11 pTop5 col-md-6">
                                            <div class="controlLabelWidth">
                                                <asp:HiddenField ID="ExpiryDateTime" runat="server" EnableViewState="true" />
                                                <asp:Label ID="Expirylbl" runat="server" Text=""></asp:Label>
                                                <asp:Label ID="TimeCount" runat="server" Text=""></asp:Label>
                                            </div>

                                        </div>
                                        <div class="cBoth"></div>
                                        <div class="outerBox11 pTop5 col-md-12">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="OTPLabel" runat="server" Text="Enter OTP"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="OTPTextBox" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div id="OTPVisibleDiv" class="cBoth outerBox pTop5" runat="server" visible="false"></div>
                                    <div class="cBoth"></div>
                                    <br />
                                    <div class="alignCenter pTop5 col-md-12">
                                        <asp:Button ID="UploadWebCamButton" Visible="true" runat="server" Text="&#Xf030; WebCam" SkinID="0"
                                            class="btn-webcam btn fas" OnClick="WebCamUploadButton_Click" />
                                        <asp:Button ID="RefreshButton" runat="server" Text="&#xf2f9; Refresh" class="fas btn btn-refresh" OnClick="RefreshButton_Click"
                                            SkinID="0" />
                                    </div>

                                </div>
                            </div>
                        </div>
                    </div>
                    </tr>
                    </table>
                   
                </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--<script data-main="../../JavaScript/rjs/encrypt/visitor-log-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/visitor-log")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <script>

        var myVar = setInterval(myTimer, 1000);
        function myTimer() {

            var expirytime = $("#ctl00_CP_ExpiryDateTime").val();
            if (expirytime !== "") {
                var d = new Date();
                if (new Date(expirytime) > d) {
                    $('#ctl00_CP_GenerateOTPButton').attr('disabled', true);
                    var diff = new Date(expirytime) - d;
                    //var diff = new Date(end - start);
                    var t = new Date(new Date(diff).toUTCString().slice(0, -3)).format("mm:ss");
                    $("#ctl00_CP_TimeCount").html(t);
                    $("#ctl00_CP_Expirylbl").html("Expire In:");
                }
                else {
                    $('#ctl00_CP_GenerateOTPButton').attr('disabled', false);
                    $("#ctl00_CP_TimeCount").html("");
                    $("#ctl00_CP_Expirylbl").html("");
                }


            }
            //var Difference_In_Time = date2.getTime() - date1.getTime();
        }
        //Added by dhananajay for mantis Start- 0035063
        function RedirectToFrontOffice(FrontOfficeURL) {
            var newTab = window.open(FrontOfficeURL, '_blank');
             // Redirect the current page with an absolute path
             window.location.href = '../../Pages/BaseFramework/MyDashBoard.aspx';
        }
        //Added by dhananajay for mantis End - 0035063
    </script>
</asp:Content>
