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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ 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" %>--%>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
<asp:UpdatePanel ID="EventEnrollmentUpdatePanel" runat="server" UpdateMode="Always">
    <ContentTemplate>

    <%--<div id="dvTestLoadingmsg" class="hls-wrap">
        <div class="hls-container">
            <div class="hls-content">
                <div class="dsh-syndicate white-popup" style="display: inline-block; width: 119%; height: 150px">
                    <div class="shippingcard" style="text-align: center; vertical-align: middle; width: 100%;">
                        <span id="spn1msg">Loading Details</span><br>
                        <span style="line-height: 2;" id="spn2msg"><b>Please Wait ...</b></span><br>
                        <span id="spnloadingimgOPD">
                            <img src="../../../Images/Loading1.gif" /></span>
                    </div>
                </div>
            </div>
        </div>
    </div>--%>
    <%--  <asp:UpdatePanel ID="HREmployeeMasterSearchUpdatePanel" runat="server">
        <ContentTemplate>--%>
    <div class="hls-bg"></div>
    <Common:CommonSearchUserControl ID="CommonSearchControl" runat="server" Visible="false" />
    <div>
        <asp:Panel ID="employeesearchdetailpanel" runat="server" meta:resourcekey="employeesearchdetailpanelresource1">
            <div id="divContentPage" class="divcontentpagemargin">

                <div class="dashBoardLeftCont">
                    <div class="himssuHeader3WireBox">
                        <table>
                            <tr>
                                <td>
                                    <div class="leftUlMenu">
                                        <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="229"
                                            Visible="true" runat="server" />
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <%-- <Vacancy:VacancyControl ID="VacancyUserControl" runat="server" Visible="true" />--%>
                    <div class="himssuHeader1WireBox card card-box" id="Div4" runat="server" visible="True" style="overflow-x: auto">
                        <div class="himsBoxHeader card-head">
                            <div class="leftdiv">
                            </div>
                            <div class="himsBoxTitle">
                                <div class="headerText fLeft">
                                    <header>
                                        <i class="fas fa-info-circle"></i>
                                        <asp:Label ID="Label4" Text="Candidate Detail" runat="server" />
                                    </header>
                                </div>
                                <div class="fRight mt-27">
                                    
                                </div>
                            </div>
                             <div class="fRight mt-27 pagination display-flex">
                               
                                            <div id="NumberOfRecordDiv" class="display-flex" runat="server" visible="true">
                                                <asp:LinkButton AlternateText="First page" ToolTip="First page" ID="FirstRecordImageButton"
                                                    runat="server" 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" CommandName="Page" CommandArgument="Prev"
                                                    OnClick="PreviousImageButton_Click" CssClass="btn btn-default gridviewpagerbuttonpadding">
					<i class="fa fa-play fa-rotate-180"></i>
                                                </asp:LinkButton>
                                               
				<asp:Label ID="LabelPage" runat="server" Text="Record " AssociatedControlID="ReCordNumber" />
                                                &nbsp; <asp:Label ID="ReCordNumber" Font-Bold="true" SkinID="Dummy" runat="server"></asp:Label>
                                               &nbsp;  <asp:Label ID="ofLabel" Text="of" runat="server" />
                                               &nbsp;  <asp:Label ID="TotalRecord" runat="server" />
                                                &nbsp;
				<asp:LinkButton AlternateText="Next page" ToolTip="Next page" ID="NextImageButtom"
                    runat="server" CssClass="btn btn-default gridviewpagerbuttonpadding" CommandName="Page" CommandArgument="Next"
                    OnClick="NextImageButton_Click">
					 <i class="fa fa-play"></i>
                </asp:LinkButton>

                                                <asp:LinkButton AlternateText="Last page" ToolTip="Last page" ID="LastRecordImageButton"
                                                    runat="server" CssClass="btn btn-default gridviewpagerbuttonpadding" CommandName="Page" CommandArgument="Last"
                                                    OnClick="LastRecordImageButton_Click">
					  <i class="fa fa-fast-forward"></i>
                                                </asp:LinkButton>
                                                &nbsp;  &nbsp; &nbsp;
                                            </div>
                                     
                            </div>
                        </div>
                        <div class="himsBoxContent card-body">
                            <asp:Panel ID="DetailPanel" runat="Server">
                                <div class="contentHolder">
                                    <div>
                                        <asp:UpdatePanel ID="MenuPlanDetailUpdatePanel" runat="server">                                            
                                            <ContentTemplate>
                                                    <div class="topdisplayContainer" style="width: 100%">
                                    
                                                    <div class="himsDisplayBox">
                                                        <div style="margin-top: 0px">
                                                        </div>
                                                        <div class="himsBoxContent messageMessage">
                                                            <div class="topdisplayContainer">
                                                                <table class="fLeft">
                                                                    <tr>
                                                                        <td>
                                                                            <asp:Label ID="CodeLabelL" runat="server" Text="Code :" Font-Bold="true"></asp:Label>
                                                                       <%-- </td>
                                                                        <td>--%>
                                                                            <asp:Label ID="CodeLabelT" runat="server" Text=""></asp:Label>
                                                                        </td>
                                                                        <td>&nbsp;
                                                                        </td>
                                                                        <td>&nbsp;
                                                                        </td>
                                                                        <td>&nbsp;
                                                                        </td>
                                                                        <td>&nbsp;
                                                                        </td>
                                                                        <td>
                                                                            <asp:Label ID="NameLabelL" runat="server" Text="Name :" Font-Bold="true"></asp:Label>
                                                                       <%-- </td>
                                                                        <td>--%>
                                                                            <asp:Label ID="NameLabelT" runat="server" Text=""></asp:Label>
                                                                        </td>
                                                                        <td>&nbsp;
                                                                        </td>
                                                                        <td>&nbsp;
                                                                        </td>
                                                                        <td>&nbsp;
                                                                        </td>
                                                                        <td>&nbsp;
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                                <div class="cBoth">
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="himsBoxFooter">
                                                            <div>
                                                            </div>
                                                        </div>
                                                    </div>
                                              
                                    </div>
                                    <div class="navgraybackground">
                                        <ul class="nav nav-tabs">
                                            <li>
                                                <a href="#tab_1">
                                                    <asp:Button Text="&#xf044; General" ID="EmployeeMendatoryButton" CssClass="transparenttab fas" OnClick="EmployeeMendatoryButton_Click"
                                                        SkinID="0" runat="server" />
                                                </a>
                                            </li>
                                            <li>
                                                <a href="#tab_1">
                                                    <asp:Button Text="&#xf095; Communication" ID="CommunicationButton" CssClass="transparenttab fas" OnClick="CommunicationButton_Click"
                                                        SkinID="0" runat="server" />
                                                </a>
                                            </li>
                                            <li>
                                                <a href="#tab_1">
                                                    <asp:Button Text="&#xf0c0; Employment" ID="EmploymentButton" CssClass="transparenttab fas" OnClick="Employment_Click"
                                                        SkinID="0" runat="server" />
                                                </a>
                                            </li>
                                            <li>
                                                <a href="#tab_1">
                                                    <asp:Button Text="&#xf19d; Qualification" ID="QualificationButton" CssClass="transparenttab fas" OnClick="Qualification_Click"
                                                        SkinID="0" runat="server" />
                                                </a>
                                            </li>
                                            <li>
                                                <a href="#tab_1">
                                                    <asp:Button Text="&#xf0c0; Family" ID="FamilyButton" CssClass="transparenttab fas" OnClick="FamilyButton_Click"
                                                        SkinID="0" runat="server" />
                                                </a>
                                            </li>
                                             <li class="active">
                                                <a href="#tab_1">
                                                    <asp:Button Text="&#xf0c0; Document" ID="DocumentButton" CssClass="transparenttab fas" 
                                                        SkinID="0" runat="server" />
                                                </a>
                                            </li>
                                        </ul>
                                    </div>
                                    <div class="himsBoxContent col-md-12 pTop15">
                                        <div class="mt-10 alignCenter pb15 width-100">
                                            <asp:Button runat="server" ID="SaveButton" Text="&#xf0c7; Save" OnClick="SaveButton_Click"
                                                SkinID="0" CssClass="btn btn-save fas" />
                                        </div>
                                    </div>
                                                <asp:HiddenField ID="UserSourceTypeHiddenField" runat="server" />
                                                <asp:HiddenField ID="UserSourceIdHiddenField" runat="server" />
                                                <asp:HiddenField ID="DocumentNameHiddenField" runat="server" />
                                                <asp:HiddenField ID="UploadConfigurationHiddenField" runat="server" />
                                                <asp:HiddenField ID="ScreenIdHiddenField" runat="server" />
                                                <asp:HiddenField ID="FilePathHiddenField" runat="server" />
                                                <asp:HiddenField ID="VacancyIdHiddenField" runat="server" />
                                                <asp:HiddenField ID="CandidateIdHiddenField" runat="server" />
                                                <asp:HiddenField ID="AttachmentSizeHiddenField" runat="server" />
                                                <div id="DocumenDiv" runat="server" class="col-md-12 pTop5">
                                                    <div class="himsBoxHeader card-head inner" id="Div2" runat="server">
                                                        <div class="leftdiv">
                                                        </div>
                                                        <div class="himsBoxTitle">
                                                            <div class="headerText fLeft">
                                                                <header>
                                                                    <asp:Label ID="Label1" Text="Documents" runat="server" />
                                                                </header>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="himsBoxContent pTop5 table-responsive">
                                                        <asp:GridView ID="DocumentGridView" runat="server" Width="100%" AutoGenerateColumns="false" OnRowDataBound="DocumentGridView_RowDataBound"
                                                            AllowPaging="false" ShowHeader="True" EmptyDataText="No records Found" CssClass="table table-striped table-bordered" DataKeyNames="DocumentId,DocumentFileName"
                                                            Font-Size="Small">
                                                            <Columns>
                                                                <asp:TemplateField HeaderText="SrNo." ItemStyle-Width="1%">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblRowNumber" Text='<%# Container.DataItemIndex + 1 %>' runat="server" />
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Document Name" ItemStyle-Width="30%" HeaderStyle-HorizontalAlign="Left"
                                                                    ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                    <ItemTemplate>
                                                                        <asp:HiddenField ID="IsMandatoryHiddenField" Value='<%# (Eval("IsMandatory")) %>' runat="server" />
                                                                        <asp:Label ID="DocumentNameLabel" runat="server" Text='<%# (Eval("DocumentName")) %>'></asp:Label>
                                                                        <asp:Label ID="IsMandatoryLabel" runat="server" Text="*" Visible="false" ForeColor="Red" Font-Size="Medium"></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Document Name" ItemStyle-Width="30%" HeaderStyle-HorizontalAlign="Left"
                                                                    ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" Visible="false">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="DocumentNameFromDBLabel" runat="server" Text='<%# (Eval("DocumentFileName")) %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="File Name" ItemStyle-Width="30%" HeaderStyle-HorizontalAlign="Left"
                                                                    ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                    <ItemTemplate>
                                                                         <asp:HyperLink ID="UploadedFileHyperLink" runat="server" Text="" CssClass="UploadedgetHyperLink"
                                                                            Target="_blank"></asp:HyperLink>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Upload File" ItemStyle-Width="9%" HeaderStyle-HorizontalAlign="left"
                                                                    ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true">
                                                                    <ItemTemplate>
                                                                       <a href="javascript:;" onclick='OpenFileUploadGrid2(<%#Eval("DocumentId")%>);' class="btn btn-browser">
                                                                        <i class="fa fa-arrow-down"></i>Browse</a>
                                                                        <asp:FileUpload ID="DocumentFileUpload" runat="server" onChange="readURLGrid2(this);" ClientIDMode="Static" Style="display: none;" AllowMultiple="true" />
                                                                        <asp:ImageButton ID="DocumentRefreshbutton" runat="server" OnClick="DocumentRefreshbutton_Click" Style="display: none;" />
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Delete" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="center"
                                                                    ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true">
                                                                    <ItemTemplate>
                                                                        <asp:ImageButton SkinID="DeleteImage" ID="DeleteImageButton" runat="server" OnClick="DeleteImageButton_Click"
                                                                            ImageUrl="~/Images/icons/icon_delete.gif" ToolTip="Delete" />
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                               <%-- <asp:TemplateField HeaderText="" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="center"
                                                                    ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true">
                                                                    <ItemTemplate>
                                                                        <asp:LinkButton ID="DownloadDocumnetButton" runat="server" CommandName="Download" OnClick="DownloadDocumnetButton_Click"
                                                                            Text="Download" CausesValidation="false"></asp:LinkButton>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>--%>
                                                            </Columns>
                                                            <PagerSettings Visible="False" />
                                                        </asp:GridView>
                                                    </div>
                                                </div>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                    </div>
                </div>
            </div>
                 
        </asp:Panel>
     
    </div>
  
            </contenttemplate>
    </asp:UpdatePanel> 
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/Candidatedocument")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <%--<script type="text/javascript">
        var DocId = "";
        var reader = new FileReader();
        var filename = '';
        var CodeName = '';
        var AssignFor = '';
        var fileUploadName = '';
        reader.onload = function (e) {
        }
        function FileUploadCall(fileUpload) {
            if (fileUpload.value != '') {

                var a = $(fileUpload).next("[id*='RefreshButton']");
                a.click();
            }
        }
        function OpenFileUploadGrid2(documentid) {
            $('#DocumentFileUpload').click();
            DocId = documentid;

        }
        function readURLGrid2(input) {
            if (input.files && input.files[0]) {
                reader.readAsDataURL(input.files[0]);

                filename = input.files[0].name;
                if ($('#ctl00_CP_UploadConfigurationHiddenField').val() == "Azure") {
                    ajaxFileUploadAzure2();
                }
                else {
                    ajaxFileUploadGrid();
                }
            }
        }
        function ajaxFileUploadAzure2() {
            if (ValidateImageDetailsgrid()) {
                LoadingMessage('Uploading', '<b>Please Wait</b>');
                $("#loading").ajaxStart(function () {
                    $(this).show();
                }).ajaxComplete(function () {
                    $(this).hide();
                });
                
                var ScreenTypeId = $('#ctl00_CP_ScreenIdHiddenField').val();
                var UserSourceTypeId = $('#ctl00_CP_UserSourceTypeHiddenField').val();
                var UserSourceId = $('#ctl00_CP_UserSourceIdHiddenField').val();
                var DocumentId = 0;
                DocumentId = DocId;
                var DocumentName = filename;
                var GUID = 1;
                if ($('#ctl00_CP_GUIDHiddenField').val() != '')
                    GUID = $('#ctl00_CP_GUIDHiddenField').val();
                $.ajaxFileUpload({
                    url: '/UserControls/MultiFileUpload/DocumentUpload.ashx?ScreenTypeId=' + ScreenTypeId + '&UserSourceTypeId=' + UserSourceTypeId + '&UserSourceId=' + UserSourceId + '&DocumentId=' + DocumentId + '&DocumentName=' + DocumentName + '&GUID=' + GUID,
                    secureuri: false,
                    fileElementId: 'DocumentFileUpload',
                    dataType: 'text',
                    contentType: "application/json; charset=utf-8",
                    data: { name: 'logan', id: 'id', hdn: '1' },
                    success: function (response, status) {
                  
                        window.setTimeout(function () {
                            CloseLoadingpopup();
                            $('#ctl00_CP_DocumentGridView_ctl02_DocumentRefreshbutton').click();
                            $("#ctl00_CP_Label2").text("Uploaded Successfully");

                        }, 100);
                    },
                    error: function (response, status, e) {
                        window.setTimeout(function () {
                            CloseLoadingpopup();
                        }, 100);
                    }
                })
                return false;
            }
        }

        function ajaxFileUploadGrid() {
            if (ValidateImageDetailsgrid()) {
                LoadingMessage('Uploading', '<b>Please Wait</b>');
                $("#loading").ajaxStart(function () {
                    $(this).show();
                }).ajaxComplete(function () {
                    $(this).hide();
                });
                $.ajaxFileUpload({
                    url: '/UserControls/MultiFileUpload/common-file-upload.ashx?DocId=' + DocId,
                    secureuri: false,
                    fileElementId: 'DocumentFileUpload',
                    dataType: 'text',
                    contentType: "application/json; charset=utf-8",
                    data: { name: 'logan', id: 'id', hdn: '1' },
                    success: function (response, status) {

                        window.setTimeout(function () {
                            CloseLoadingpopup();
                            $('#ctl00_CP_DocumentGridView_ctl02_DocumentRefreshbutton').click();
                        }, 100);
                    },
                    error: function (response, status, e) {
                        window.setTimeout(function () {
                            CloseLoadingpopup();
                        }, 100);
                    }
                })
                return false;
            }
        }
    </script>--%>

</asp:Content>
