Exemplo n.º 1
0
 public ActionResult DeleteConfirm(int id)
 {
     if (RoleRepo.Delete(id))
     {
         return(Json(new { success = true }, JsonRequestBehavior.AllowGet));
     }
     else
     {
         return(Json(new { success = false }, JsonRequestBehavior.AllowGet));
     }
 }
Exemplo n.º 2
0
        public ActionResult Delete(RoleViewModel model)
        {
            ResponseResult result = RoleRepo.Delete(model);

            return(Json(new
            {
                success = result.Success,
                message = result.ErrorMessage,
                entity = result.Entity
            }, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 3
0
        public IHttpActionResult DeleteRole(int id)
        {
            Role role = _RDB.GetById(id);

            if (role == null)
            {
                return(NotFound());
            }
            _RDB.Delete(role);


            return(Ok(role));
        }
Exemplo n.º 4
0
 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));
     }
 }
Exemplo n.º 5
0
        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));
            }
        }
Exemplo n.º 6
0
 public void DeleteRole(int id) => _roleRepo.Delete(id);