public ActionResult Create(Category_Table category)
 {
     try
     {
         if (ModelState.IsValid)
         {
             objBs.categoryBs.Insert(category);
             TempData["Msg"] = "Created Category Successfully";
             return RedirectToAction("Index");
         }
         else
         {
             return View("Index");
         }
     }
     catch (Exception e)
     {
         TempData["Msg"] = "Create Failed : " + e.Message;
         return RedirectToAction("Index");
     }
     return View("Index");
 }
Exemple #2
0
 public void Update(Category_Table category)
 {
     objDb.Update(category);
 }
Exemple #3
0
 public void Insert(Category_Table category)
 {
     objDb.Insert(category);
 }