コード例 #1
0
 public ActionResult Create(ApplicantEmailTemplate applicantemailtemplate)
 {
     if (ModelState.IsValid) {
         applicantemailtemplateRepository.InsertOrUpdate(applicantemailtemplate);
         applicantemailtemplateRepository.Save();
         return RedirectToAction("Index");
     } else {
         ViewBag.PossibleTemplateCreatedByUsers = userRepository.All;
         return View(applicantemailtemplate);
     }
 }
コード例 #2
0
 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;
     }
 }
コード例 #3
0
 public ActionResult Create()
 {
     ApplicantEmailTemplate applicantemailtemplate = new ApplicantEmailTemplate();
     ViewBag.PossibleTemplateCreatedByUsers = userRepository.All;
     return View(applicantemailtemplate);
 }
コード例 #4
0
 public ViewResult Search(ApplicantEmailTemplate searchApplicantEmailTemplate)
 {
     if(searchApplicantEmailTemplate!=null)
     {
                     }
                 return View("Index",applicantemailtemplateRepository.AllIncluding(applicantemailtemplate => applicantemailtemplate.TemplateCreatedByUser));
 }