예제 #1
0
 public void DeleteMenuCategory(MenuCategory menugroup)
 {
     try {
             db.BeginTransaction();
             db.Execute("Delete MenuDetails where MenuID=@0", menugroup.ID);
             db.Delete(menugroup);
             db.CompleteTransaction();
         }
     catch
     {
         db.AbortTransaction();
     }
 }
예제 #2
0
 public void AddMenuCategory(MenuCategory menugroup)
 {
     db.Insert(menugroup);
 }
예제 #3
0
 public JsonResult AddMenuCategory(MenuCategory menugroup)
 {
     try
     {
         sc.AddMenuCategory(menugroup);
         return Json(new { success = true, msg = "Xóa menu thành công" }, JsonRequestBehavior.AllowGet);
     }
     catch
     {
         return Json(new { success = false, msg = "Đã có lỗi xảy ra" }, JsonRequestBehavior.AllowGet);
     }
 }