Beispiel #1
0
        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()));
        }
Beispiel #2
0
 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;
 }