public ActionResult Delete(string menuId)
        {
            IFunctionService svc = new FunctionService();
            var model            = svc.Delete(menuId);

            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        public IActionResult Delete(string id)
        {
            if (!ModelState.IsValid)
            {
                return(new BadRequestObjectResult(ModelState));
            }
            else
            {
                _functionService.Delete(id);
                _functionService.Save();

                return(new OkObjectResult(id));
            }
        }
Beispiel #3
0
        public ActionResult Delete(int functionid = -1)
        {
            var count = _funService.GetChildFunction(functionid);

            if (count > 0)
            {
                return(Json(AjaxResult.Fail("该功能下还有子功能,无法删除")));
            }

            _funService.Delete(new PermissionModel {
                Id = functionid
            });
            return(Json(AjaxResult.Success()));
        }
 public void DeleteFunction(int functionId)
 {
     functionService.Delete(functionId);
 }