示例#1
0
        public ActionResult Delete(string id)
        {
            string lstMsg = string.Empty;

            int returnCode = _categoryBL.Delete(id, out lstMsg);

            if ((int)Common.ReturnCode.Succeed == returnCode)
            {
                TempData["Success"] = "Deleted Successfully!";
            }
            else
            {
                TempData["Error"] = lstMsg;
            }
            return(RedirectToAction("CategorySearch"));
        }
示例#2
0
        public ActionResult Delete(int id)
        {
            categoryBL.Delete(id);

            return(RedirectToAction("CategoryDetails"));
        }
示例#3
0
 public IActionResult Delete(string id)
 {
     return(Ok(_categoryBL.Delete(id)));
 }
示例#4
0
        public IActionResult Delete(int id)
        {
            Result <bool> result = _categoryBL.Delete(CacheKey, id);

            return(Json(result));
        }
        public async Task <IActionResult> Delete([FromRoute] string id)
        {
            var response = await _categoryBL.Delete(id);

            return(Accepted(response));
        }