예제 #1
0
 public ActionResult Create(SecurityClearance securityclearance)
 {
     if (ModelState.IsValid) {
         securityclearanceRepository.InsertOrUpdate(securityclearance);
         securityclearanceRepository.Save();
         return RedirectToAction("Index");
     } else {
         return View();
     }
 }
예제 #2
0
 public void InsertOrUpdate(SecurityClearance securityclearance)
 {
     if (securityclearance.SecurityClearanceID == default(int)) {
         // New entity
         context.SecurityClearance.Add(securityclearance);
     } else {
         // Existing entity
         context.Entry(securityclearance).State = EntityState.Modified;
     }
 }
예제 #3
0
 public ViewResult Search(SecurityClearance searchSecurityClearance)
 {
     if(searchSecurityClearance!=null)
     {
                     }
                 return View("Index",securityclearanceRepository.All);
 }