public ActionResult Convert(int id, DateTime startDate, string comments) { if (id == 0) { return(View()); } //update the interviewee to reflect that he is now a job seeker var interviewee = _intervieweeService.GetById(id); int convertId = _outcomeService.GetAll() .Where(e => e.Name.ToLower().Contains("convert")) .Select(s => s.Id) .FirstOrDefault(); var userid = User.Identity.GetUserId(); interviewee.OutcomeId = convertId; interviewee.ChangedBy = userid; _intervieweeService.Update(interviewee); var jobSeeker = new JobSeeker { IntervieweeId = id, DateStart = startDate, ChangedBy = userid, CreatedBy = userid }; //create the job seeker record _service.Create(jobSeeker); return(RedirectToAction("Convert")); }
// // GET: /Outcome/ public ActionResult Outcomes() { var model = service.GetAll().Select(e => new { e.Id, e.Name, e.Description }).ToList(); return(View(model)); }