public ActionResult ApplyJob(ApplyJobModel model) { var jobApplication = Mapper.Map<JobApplication>(model); jobApplication.FilingDate = DateTime.Now; jobApplication.InterviewResult = InterviewResults.UnderConsideration; this.jobsAppRepo.SaveOrUpdate(jobApplication); return RedirectToAction("Index"); }
public ActionResult ApplyJob(long id) { var curUser = this.usersRepo.FindOne(new UserByLoginSpecify(User.Identity.Name)); var job = this.jobsRepo.FindOne(new ByIdSpecify<Job>(id)); var model = new ApplyJobModel { JobId = id, UserId = curUser.Id, Department = job.Department.Title, Project = job.Project.ProjectFormalizeName.FormalizeName, Salary = job.Salary, JobDescription = job.Description, JobTitle = job.Title }; return View(model); }