Esempio n. 1
0
 public ActionResult EditCategory(DrugType drugType)
 {
     if (ModelState.IsValid)
     {
         unitOfWork.DrugTypeRepository.Update(drugType);
         unitOfWork.DrugTypeRepository.SaveChanges();
         return RedirectToAction("ListCategory");
     }
     return View(drugType);
 }
Esempio n. 2
0
 public ActionResult CreateCategory(DrugType category)
 {
     if (ModelState.IsValid)
     {
         category.IsActive = true;
         unitOfWork.DrugTypeRepository.Insert(category);
         unitOfWork.DrugTypeRepository.SaveChanges();
         return RedirectToAction("ListCategory");
     }
     return View(category);
 }