public Cv SaveNewCv(Cv newCv) { newCv.LastModifiedDateTime = DateTime.Now; newCv.IsLive = true; newCv.Educations.ForEach(e => SetItem(e, newCv.Id)); newCv.Achievements.ForEach(e => SetItem(e, newCv.Id)); newCv.WorkExperiences.ForEach(e => SetItem(e, newCv.Id)); newCv.References.ForEach(e => SetItem(e, newCv.Id)); newCv.Conferences.ForEach(e => SetItem(e, newCv.Id)); _context.Cvs.AddOrUpdate(newCv); _context.SaveChanges(); return newCv; }
public RedirectToRouteResult CvEdit(Cv cv) { _repository.SaveNewCv(cv); return RedirectToAction("CvEdit", "Home"); }
public ActionResult AddWorkExperience(Cv cv) { cv.WorkExperiences.Add(new WorkExperience()); return PartialView("~/Views/Shared/EditorTemplates/WorkExperienceList.cshtml", cv); }
public ActionResult AddReference(Cv cv) { cv.References.Add(new Reference()); return PartialView("~/Views/Shared/EditorTemplates/ReferenceList.cshtml", cv); }
public ActionResult AddEducation(Cv cv) { cv.Educations.Add(new Education()); return PartialView("~/Views/Shared/EditorTemplates/EducationList.cshtml", cv); }
public ActionResult AddAchievement(Cv cv) { cv.Achievements.Add(new Achievement()); return PartialView("~/Views/Shared/EditorTemplates/AchievementList.cshtml", cv); }