Beispiel #1
0
        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;
        }
Beispiel #2
0
        public RedirectToRouteResult CvEdit(Cv cv)
        {
            _repository.SaveNewCv(cv);

            return RedirectToAction("CvEdit", "Home");
        }
Beispiel #3
0
        public ActionResult AddWorkExperience(Cv cv)
        {
            cv.WorkExperiences.Add(new WorkExperience());

            return PartialView("~/Views/Shared/EditorTemplates/WorkExperienceList.cshtml", cv);
        }
Beispiel #4
0
        public ActionResult AddReference(Cv cv)
        {
            cv.References.Add(new Reference());

            return PartialView("~/Views/Shared/EditorTemplates/ReferenceList.cshtml", cv);
        }
Beispiel #5
0
        public ActionResult AddEducation(Cv cv)
        {
            cv.Educations.Add(new Education());

            return PartialView("~/Views/Shared/EditorTemplates/EducationList.cshtml", cv);
        }
Beispiel #6
0
        public ActionResult AddAchievement(Cv cv)
        {
            cv.Achievements.Add(new Achievement());

            return PartialView("~/Views/Shared/EditorTemplates/AchievementList.cshtml", cv);
        }