Ejemplo n.º 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" }));
        }
Ejemplo n.º 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));
            }
        }
Ejemplo n.º 3
0
 public IActionResult Delete(int id)
 {
     categoryBLL.Delete(id);
     return(Ok());
 }