public ActionResult Create(ApplicantEmailTemplate applicantemailtemplate) { if (ModelState.IsValid) { applicantemailtemplateRepository.InsertOrUpdate(applicantemailtemplate); applicantemailtemplateRepository.Save(); return RedirectToAction("Index"); } else { ViewBag.PossibleTemplateCreatedByUsers = userRepository.All; return View(applicantemailtemplate); } }
public void InsertOrUpdate(ApplicantEmailTemplate applicantemailtemplate) { if (applicantemailtemplate.ApplicantEmailTemplateID == default(int)) { // New entity context.ApplicantEmailTemplate.Add(applicantemailtemplate); } else { // Existing entity context.Entry(applicantemailtemplate).State = EntityState.Modified; } }
public ActionResult Create() { ApplicantEmailTemplate applicantemailtemplate = new ApplicantEmailTemplate(); ViewBag.PossibleTemplateCreatedByUsers = userRepository.All; return View(applicantemailtemplate); }
public ViewResult Search(ApplicantEmailTemplate searchApplicantEmailTemplate) { if(searchApplicantEmailTemplate!=null) { } return View("Index",applicantemailtemplateRepository.AllIncluding(applicantemailtemplate => applicantemailtemplate.TemplateCreatedByUser)); }