示例#1
0
        public async Task <JsonResult> Delete(string id)
        {
            var isDelete = await CategoryBLL.Delete(id);

            if (isDelete)
            {
                return(Json(new { success = "true" }));
            }
            return(Json(new { success = "false" }));
        }
示例#2
0
        public ActionResult Delete(string categoryNO)
        {
            Category category = _categoryBLL.GetCategoryByCategoryNo(categoryNO);

            if (category == null)
            {
                return(Json("False", JsonRequestBehavior.AllowGet));
            }
            else if (_categoryBLL.Delete(category))
            {
                return(Json("True", JsonRequestBehavior.AllowGet));
            }
            else
            {
                return(Json("False", JsonRequestBehavior.AllowGet));
            }
        }
 public IActionResult Delete(int id)
 {
     categoryBLL.Delete(id);
     return(Ok());
 }