/// <summary> /// This function returns advance details for search result page (cv guid/profile pic and sector list) /// </summary> /// <param name="refId"></param> /// <param name="isClient"></param> /// <returns></returns> public SearchAdvanced GetAdvancedSearchDetails(int refId, bool isClient) { var response = new SearchAdvanced(); if (isClient) { //get the sectors for Client response.Sectors = new Sectors().GetSectorsForClient(refId).Select(t => t.SectorText).ToList(); } else { //get the sectors for Contact response.Sectors = new Sectors().GetSectorsForContact(refId).Select(t => t.SectorText).ToList(); //cv guid var latestCvs = Documents.GetDocumentByDocType(new[] { 4 }, refId).ToList(); if (latestCvs.Count > 0) response.CvGuid = latestCvs[0].DocGuid; var profilePic = Documents.GetDocumentByDocType(new[] { 3 }, refId).ToList(); if (profilePic.Count > 0) response.ProfileImageUrl = profilePic[0].DownloadUrl; } return response; }
/// <summary> /// This function returns advance details for search result page (cv guid/profile pic and sector list) /// </summary> /// <param name="candidateId"></param> /// <returns></returns> public SearchAdvanced GetAdvancedSearchDetails(int candidateId) { var response = new SearchAdvanced { Sectors = new Sectors().GetSectorsForContact(candidateId).Select(t => t.SectorText).ToList() }; //get the sectors for Contact //cv guid var latestCvs = Documents.GetDocumentByDocType(new[] { 4 }, candidateId).ToList(); if (latestCvs.Count > 0) response.CvGuid = latestCvs[0].DocGuid; var profilePic = Documents.GetDocumentByDocType(new[] { 3 }, candidateId).ToList(); if (profilePic.Count > 0) response.ProfileImageUrl = profilePic[0].DownloadUrl; return response; }