Exemplo n.º 1
0
 public ActionResult Create(AccountCategory accountcategory)
 {
     if (ModelState.IsValid) {
         accountcategoryRepository.InsertOrUpdate(accountcategory);
         accountcategoryRepository.Save();
         return RedirectToAction("Index");
     } else {
         return View(accountcategory);
     }
 }
Exemplo n.º 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;
     }
 }
Exemplo n.º 3
0
 public ActionResult Create()
 {
     AccountCategory accountcategory = new AccountCategory();
     return View(accountcategory);
 }
Exemplo n.º 4
0
 public ViewResult Search(AccountCategory searchAccountCategory)
 {
     if(searchAccountCategory!=null)
     {
                     }
                 return View("Index",accountcategoryRepository.All);
 }