コード例 #1
0
 public ActionResult Create()
 {
     ApplicantDocument applicantdocument = new ApplicantDocument();
     ViewBag.PossibleApplicants = applicantRepository.All;
     ViewBag.PossibleApplicantDocumentCategories = applicantdocumentcategoryRepository.All;
     return View(applicantdocument);
 }
コード例 #2
0
 public ActionResult Create(ApplicantDocument applicantdocument)
 {
     if (ModelState.IsValid) {
         applicantdocumentRepository.InsertOrUpdate(applicantdocument);
         applicantdocumentRepository.Save();
         return RedirectToAction("Index");
     } else {
         ViewBag.PossibleApplicants = applicantRepository.All;
         ViewBag.PossibleApplicantDocumentCategories = applicantdocumentcategoryRepository.All;
         return View(applicantdocument);
     }
 }
コード例 #3
0
 public ViewResult Search(ApplicantDocument searchApplicantDocument)
 {
     if(searchApplicantDocument!=null)
     {
                     }
                 return View("Index",applicantdocumentRepository.AllIncluding(applicantdocument => applicantdocument.Applicant, applicantdocument => applicantdocument.ApplicantDocumentCategory));
 }
コード例 #4
0
 public void InsertOrUpdate(ApplicantDocument applicantdocument)
 {
     if (applicantdocument.ApplicantDocumentID == default(int)) {
         // New entity
         context.ApplicantDocument.Add(applicantdocument);
     } else {
         // Existing entity
         context.Entry(applicantdocument).State = EntityState.Modified;
     }
 }