public ActionResult DeleteConfirm(int id) { if (RoleRepo.Delete(id)) { return(Json(new { success = true }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { success = false }, JsonRequestBehavior.AllowGet)); } }
public ActionResult Delete(RoleViewModel model) { ResponseResult result = RoleRepo.Delete(model); return(Json(new { success = result.Success, message = result.ErrorMessage, entity = result.Entity }, JsonRequestBehavior.AllowGet)); }
public IHttpActionResult DeleteRole(int id) { Role role = _RDB.GetById(id); if (role == null) { return(NotFound()); } _RDB.Delete(role); return(Ok(role)); }
public ActionResult Delete(VMRole paramModel) { try { return(Json(new { success = RoleRepo.Delete(paramModel), message = RoleRepo.Message }, JsonRequestBehavior.AllowGet)); } catch (Exception hasError) { return(Json(new { success = false, message = hasError.Message }, JsonRequestBehavior.AllowGet)); } }
public ActionResult DeleteConfirm(int id) { bool result = RoleRepo.Delete(id); if (result) { return(Json(new { success = result, entity = "", message = "Data Deleted! Data Role has been deleted!" }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { success = result, entity = "", message = "Delete Failed!!!" }, JsonRequestBehavior.AllowGet)); } }
public void DeleteRole(int id) => _roleRepo.Delete(id);