예제 #1
0
 public ActionResult Create(AccountCategory accountcategory)
 {
     if (ModelState.IsValid) {
         accountcategoryRepository.InsertOrUpdate(accountcategory);
         accountcategoryRepository.Save();
         return RedirectToAction("Index");
     } else {
         return View(accountcategory);
     }
 }
예제 #2
0
 public void InsertOrUpdate(AccountCategory accountcategory)
 {
     if (accountcategory.AccountCategoryID == default(int)) {
         // New entity
         context.AccountCategory.Add(accountcategory);
     } else {
         // Existing entity
         context.Entry(accountcategory).State = EntityState.Modified;
     }
 }
예제 #3
0
 public ActionResult Create()
 {
     AccountCategory accountcategory = new AccountCategory();
     return View(accountcategory);
 }
예제 #4
0
 public ViewResult Search(AccountCategory searchAccountCategory)
 {
     if(searchAccountCategory!=null)
     {
                     }
                 return View("Index",accountcategoryRepository.All);
 }