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" })); }
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()); }