public ActionResult Other(OtherMemberModel memberModel) { try { var member = CurrentMember; var candidate = _candidatesQuery.GetCandidate(member.Id); var resume = candidate.ResumeId == null ? null : _resumesQuery.GetResume(candidate.ResumeId.Value); // Check. memberModel.Prepare(); memberModel.Validate(); // Update. resume = UpdateResume(candidate, resume, r => UpdateResume(r, memberModel)); return(Json(new JsonProfileModel { Profile = CreateProfileModel(member, candidate, resume) })); } catch (UserException ex) { ModelState.AddModelError(ex, new StandardErrorHandler()); } return(Json(new JsonResponseModel())); }
private static void UpdateResume(Resume resume, OtherMemberModel memberModel) { resume.Courses = memberModel.Courses.ParseCourses(); resume.Awards = memberModel.Awards.ParseAwards(); resume.Professional = memberModel.Professional; resume.Interests = memberModel.Interests; resume.Affiliations = memberModel.Affiliations; resume.Other = memberModel.Other; resume.Referees = memberModel.Referees; }