ResumeListModel GetResumeList(int id)
        {
            ResumeListModel model = new ResumeListModel();

            using (ApplicationDbContext ctx = new ApplicationDbContext())
            {
                model.list = ctx.Resumes.Include("job").Include("own").Where(x => x.job.ID == id && x.Status == "PROCESSING").ToList();
            }
            return(model);
        }
Beispiel #2
0
        public ActionResult ResumeList(int? page)
        {
            var currentPageIndex = page.HasValue ? page.Value - 1 : 0;
            var resumeList = new List<ResumeListItemModel>();
            var resumes = _resumeService.GetResumes(currentPageIndex, DefaultPageSize);

            foreach (var resumeDocument in resumes)
            {
                var resumeFileDocument = _resumeService.GetResumeFile(resumeDocument.FileId, false);
                resumeList.Add(MapResumeListItemModel(resumeDocument, resumeFileDocument));
            }

            var model = new ResumeListModel
            {
                Resumes = resumeList.ToPagedList(currentPageIndex, DefaultPageSize, _resumeService.GetResumesCount()),
            };

            return View(model);
        }