<%@ page title="Candidate Search" language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Recruitment_CandidateSearch, App_Web_vo04ddbt" uiculture="auto" meta:resourcekey="PageResource1" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/AutoComplete/AutoCompleteControl.ascx" TagName="AutoCompleteControl" TagPrefix="acc" %>
<%@ Register Src="~/UserControls/Common/CommonSearch/CommonSearch.ascx" TagName="CommonSearchUserControl" TagPrefix="Common" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/Common/Recruitment/VacancyDetailBoxControl.ascx" TagName="VacancyControl" TagPrefix="Vacancy" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerAutoPostBackControl.ascx" TagName="DatePickerControl" TagPrefix="Date" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="HREmployeeMasterSearchUpdatePanel" runat="server">
        <ContentTemplate>
            <Common:CommonSearchUserControl ID="CommonSearchControl" runat="server" Visible="false" />
            <div id="divContentPage" class="divcontentpagemargin">
                <div class="dashBoardLeftCont">
                    <div class="himssuHeader3WireBox">
                        <table>
                            <tr>
                                <td>
                                    <div class="himsBoxContent">
                                        <div class="leftUlMenu">
                                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="229"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <Vacancy:VacancyControl ID="VacancyUserControl" runat="server" Visible="true" />
                    <div class="himssuHeader5WireBox card card-box">
                        <div class="himsBoxHeader card-head">
                            <asp:Panel ID="SearchHeaderPanel" runat="server" meta:resourcekey="SearchHeaderPanelResource1">
                                <div class="leftdiv">
                                </div>
                                <div class="himsBoxTitle">
                                    <div class="headerText">
                                        <header>
                                            <i class="fas fa-search"></i>
                                            <asp:Label ID="SearchHeaderLabel" runat="server" Text="Search"></asp:Label>
                                        </header>
                                    </div>
                                </div>
                                <div class="fRight mt-27 pagination ">
                                    <asp:Button ID="AddnewButton" runat="server" OnClick="AddnewButtonControls_Click" Text="&#xf067; Add" SkinID="0" CssClass="btn btn-add fas" />
                                </div>
                            </asp:Panel>
                        </div>
                        <asp:Panel ID="SearchDetailPanel" runat="server" meta:resourcekey="SearchDetailPanelResource1">
                            <div class="himsBoxContent card-body">
                                <div class="contentHolder">
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="CodeSearchLabel" runat="server" Text="CandidateNo" meta:resourcekey="CodeSearchLabelResource1"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="CandidateNoTextBox" runat="server" onmouseleave="showHideTooltip()"
                                                SkinID="CustomWidthTextBox" onmouseenter="showHideTooltip()" meta:resourcekey="CodeSearchTextBoxResource1"
                                                MaxLength="9" onkeypress="javascript:return isNumberKey(this)"></asp:TextBox>
                                            <asp:HiddenField ID="IdHiddenField" runat="server" />
                                            <asp:HiddenField ID="NumberHiddenField" runat="server" />
                                            <asp:HiddenField ID="VacancyIdHiddenField" runat="server" />
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="NameSearchLabel" runat="server" Text="Name" meta:resourcekey="NameSearchLabelResource1"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="NameSearchTextBox" SkinID="CustomWidthTextBox" runat="server"
                                                onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" meta:resourcekey="NameSearchTextBoxResource1"
                                                MaxLength="100"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="SurnameLabel2" runat="server" Text="Surname"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="SurnameTextBox" SkinID="CustomWidthTextBox" runat="server"
                                                onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" meta:resourcekey="NameSearchTextBoxResource1"
                                                MaxLength="100"></asp:TextBox>
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="RecruitmentStatusSearchLabel" runat="server" Text="Status"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList runat="server" ID="RecruitmentStatusDropDownList" 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="SearchFromDateLabel" runat="server" Text="From Date"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <Date:DatePickerControl DisplayDatePicker="true" ID="SearchFromDatePicker" runat="server" />
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="SearchToDateLabel" runat="server" Text="To Date"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <Date:DatePickerControl DisplayDatePicker="true" ID="SearchToDatePicker" runat="server" />
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="OrgLabel" runat="server" Text="Organization" meta:resourcekey="MiddleNameLabelResource1"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList ID="OrganizationDropDownList" runat="server" AutoPostBack="False" SkinID="CustomWidthDropDownList"
                                                class="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <asp:CheckBox ID="ShowWithPhotoCheckBox" runat="server" />
                                        <asp:Label ID="ShowWithPhotoLabel" runat="server" Text="Show With Photo" AssociatedControlID="ShowWithPhotoCheckBox"></asp:Label>
                                    </div>
                                    <div class="alignCenter col-md-12 pTop15 pb5">
                                        <asp:Button ID="SearchButton" runat="Server" OnClick="SearchButton_Click" Text="&#xf002; Search" SkinID="0" CssClass="btn-search btn fas" />
                                        <asp:Button ID="ClearButton" runat="server" OnClick="ClearSearchControls_Click" Text="&#xf0e2; Reset" SkinID="0" CssClass="btn-reset btn fas" />
                                        <asp:Button ID="ExportButton" runat="server" Text="&#xf093; Export" OnClick="ExportButton_Click" SkinID="0" CssClass="btn-examcommon btn fas" />
                                        <asp:Button ID="ExportDetailsButton" runat="server" Text="&#xf093; Export Details" OnClick="ExportDetailsButton_Click" SkinID="0" CssClass="btn-examcommon btn fas" />
                                    </div>
                                    <div id="HREmployeeMasterGridDiv" runat="server">
                                        <div class="himssuHeader7WireBox col-md-12 ">
                                            <div class="himsBoxHeader" id="HREmployeeMasterGridViewPagerDiv" runat="server" visible="False">
                                                <div class="leftdiv">
                                                </div>
                                                <div class="himsBoxTitle">
                                                    <div class="gridHeaderText">
                                                        <asp:Label ID="GridViewLabel" Text="" runat="server" Font-Bold="True" meta:resourcekey="GridViewLabelResource1"
                                                            ForeColor="White" />
                                                    </div>
                                                    <div class="col-md-12 padd-0">

                                                        <div class="col-md-5">
                                                            <asp:Label ID="RecordsPerPage" Text="Records per Page : " runat="server" />
                                                            <asp:DropDownList ID="AddRowsToGridDropDownList" SkinID="CustomWidthDropDownList" Width="60px" runat="server"
                                                                AutoPostBack="true" OnSelectedIndexChanged="AddRowsToGridDropDownList_SelectedIndexChanged">
                                                                <asp:ListItem Text="10" Value="10" Selected="True"></asp:ListItem>
                                                                <asp:ListItem Text="20" Value="20"></asp:ListItem>
                                                                <asp:ListItem Text="50" Value="50"></asp:ListItem>
                                                                <asp:ListItem Text="100" Value="100"></asp:ListItem>
                                                            </asp:DropDownList>
                                                        </div>
                                                        <div class="col-md-7">
                                                            <uc1:GridViewPager ID="HREmployeeMasterGridViewPager" ParentGridView="HREmployeeMasterGridView"
                                                                runat="server" OnFirstRecordClick="HREmployeeMasterGridViewPager_FirstRecordClick"
                                                                OnLastRecordClick="HREmployeeMasterGridViewPager_LastRecordClick" OnNextRecordClick="HREmployeeMasterGridViewPager_NextRecordClick"
                                                                OnPrevRecordClick="HREmployeeMasterGridViewPager_PrevRecordClick" OnTextBoxValueChange="HREmployeeMasterGridViewPager_TextBoxValueChange" />
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="himsBoxContent table-responsive col-md-12">
                                                <div id="HREmployeeMasterGridViewMessageDiv" class="himsBoxContentMsg" runat="server" visible="False">
                                                </div>
                                                <%-- Mantis: 34780, add StatusId in DataKeyNames --%>
                                                <asp:GridView runat="server" ID="HREmployeeMasterGridView" Width="100%" AutoGenerateColumns="False"
                                                    EmptyDataText="No records available for the seacrh criteria!" OnRowDataBound="HREmployeeMasterGridView_RowDataBound"
                                                    DataKeyNames="CandidateId,CandidateNumber,Name,VacancyId,VacancyName,RecruitmentStatusId,RecruitmentStatus,StatusId"
                                                    AllowPaging="True" PageSize="10" OnSelectedIndexChanged="HREmployeeMasterGridView_SelectedIndexChanged"
                                                    ShowHeader="True" meta:resourcekey="HREmployeeMasterGridViewResource1"
                                                    CssClass="table table-striped table-bordered table-hover">
                                                    <Columns>
                                                        <asp:CommandField ShowSelectButton="True" meta:resourcekey="CommandFieldResource1">
                                                            <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                        </asp:CommandField>
                                                        <asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" ItemStyle-Wrap="true">
                                                            <ItemTemplate>
                                                                <asp:LinkButton ID="ConvertLinkButton" runat="server" CommandName="Convert" OnClick="ConvertLinkButton_Click"
                                                                    Text="Convert" CausesValidation="false"></asp:LinkButton>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Candidate Number" ItemStyle-Width="10%" meta:resourcekey="TemplateFieldResource1" HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="CandidateNumberLabel" runat="server" CssClass="boxEllips" ToolTip='<%#Bind("CandidateNumber")%>'
                                                                    Text='<%#Bind("CandidateNumber")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Name" ItemStyle-Width="20%" meta:resourcekey="TemplateFieldResource1" HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="NameLabel" runat="server" CssClass="boxEllips" ToolTip='<%#Bind("Name")%>'
                                                                    Text='<%#Bind("Name")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Recruitment Status" ItemStyle-Width="10%" meta:resourcekey="RecruitmentStatus" HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="RecruitmentStatusLabel" runat="server" CssClass="boxEllips" ToolTip='<%#Bind("RecruitmentStatus")%>'
                                                                    Text='<%#Bind("RecruitmentStatus")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Vacancy Name" ItemStyle-Width="10%" meta:resourcekey="TemplateFieldResource1" HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="VacancyNameLabel" runat="server" CssClass="boxEllips" ToolTip='<%#Bind("VacancyName")%>'
                                                                    Text='<%#Bind("VacancyName")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Organization" ItemStyle-Width="10%" meta:resourcekey="TemplateFieldResource1" HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="OrganizationLabel" runat="server" CssClass="boxEllips" ToolTip='<%#Bind("OrganizationTitle")%>'
                                                                    Text='<%#Bind("OrganizationTitle")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>

                                                        <asp:TemplateField HeaderText="Photo" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Center"
                                                            ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true">
                                                            <ItemTemplate>
                                                                <asp:Image ID="CandidatePhoto" Height="60px" Width="60px" runat="server" ImageUrl='<%# Eval("CandidatePhoto")%>' />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>                                                        
                                                        <asp:TemplateField HeaderText="Created Date" ItemStyle-Width="10%" meta:resourcekey="CreatedDateTime" HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="CreatedDateLabel" runat="server" CssClass="boxEllips" DataFormatString="{0:dd/MM/yyyy}" ToolTip='<%#Bind("CreatedDateTime","{0:dd/MM/yyyy}")%>'
                                                                    Text='<%#Bind("CreatedDateTime","{0:dd/MM/yyyy}")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                    </Columns>
                                                    <PagerSettings Visible="False" />
                                                </asp:GridView>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </asp:Panel>
                    </div>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--<script data-main="../../../JavaScript/rjs/encrypt/assign-organization-encrypt" src="../../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/assign-organization")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>
