// search public HttpResponseMessage Post(ResumeSearchModel model) { try { List <ResumeSearchResult> res = this._repo.SearchCandidates(model); foreach (ResumeSearchResult obj in res) { string resumeFilePath = obj.ResumeVirtualPath; if (!string.IsNullOrWhiteSpace(resumeFilePath)) { obj.ResumeFileName = new FileInfo(resumeFilePath).Name; obj.ResumeVirtualPath = "/" + resumeFilePath.Replace(HttpContext.Current.Request.PhysicalApplicationPath, String.Empty).Replace("\\", "/"); } } HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, res); return(response); } catch (Exception ex) { _tracer.Error(Request, this.ControllerContext.ControllerDescriptor.ControllerType.FullName, ex.StackTrace); return(new HttpResponseMessage(HttpStatusCode.InternalServerError) { Content = new StringContent(ex.Message) }); } }
public List <ResumeSearchResult> SearchCandidates(ResumeSearchModel model) { return(this.DataContext.SearchCandidates(model.SearchType, model.search, model.FirstName, model.LastName, model.Email, model.ContactNumber, model.MinExperience, model.ResumeSourceTypeID, model.ResumeSourceDetail, model.Skills, model.Passport, model.Visa, model.TravelledOnsiteBefore, model.Gender, model.Certifications, model.CandidateStatus, model.PageNo, model.PageSize, model.SortColumn, model.SortDirection)); }
public List <SearchResumeResponseModel> SearchResume(ResumeSearchModel searchData) { try { using (var dbContext = new PMSEntities()) { var query = dbContext.tblResumeDatas.ToList(); if (query != null && query.Count > 0) { if (searchData.Designation != null && searchData.Designation.HasValue) { query = query.Where(i => i.Designation == searchData.Designation).ToList(); } if (searchData.Department != null && searchData.Department.HasValue) { query = query.Where(i => i.Department == searchData.Department).ToList(); } if (searchData.Years != null && searchData.Years.HasValue) { query = query.Where(i => i.ExpYears == searchData.Years).ToList(); } if (!string.IsNullOrEmpty(searchData.Name)) { query = query.Where(i => i.Name.Contains(searchData.Name)).ToList(); } if (!string.IsNullOrEmpty(searchData.Skills)) { query = query.Where(i => i.Keywords.Contains(searchData.Skills)).ToList(); } if (query != null && query.Count > 0) { return(query.Select(i => new SearchResumeResponseModel { Id = i.Id, ResumeId = i.ResumeId, ResumeDate = i.ResumeDate, Name = i.Name, Keywords = i.Keywords, ExpYears = i.ExpYears, ExpMonths = i.ExpMonths, PresentSalary = i.PresentSalary, ExpectedSalary = i.ExpectedSalary, Mobile = i.Mobile, Email = i.Email, CVCompletePath = i.CVCompletePath }).ToList()); } } } } catch (Exception ex) { } return(null); }
public JsonResult SearchResume(ResumeSearchModel resumeSearchModel) { var result = _resumeService.SearchResume(resumeSearchModel); return(Json(result, JsonRequestBehavior.AllowGet)); }
public List <SearchResumeResponseModel> SearchResume(ResumeSearchModel searchData) { return(_resumeRepository.SearchResume(searchData)); }