Esempio n. 1
0
        public AlertBack DeleteMenuPermission([FromBody] MenuPermission model, int id = 0)
        {
            AlertBack alert = new AlertBack();

            menuPermissionService.Delete(model);
            alert.status  = "success";
            alert.message = "Register Successfully";
            return(alert);
        }
        public IActionResult Delete(int id)
        {
            AlertBack alert = new AlertBack();

            MenuPermission ObjMenuPermission = _menuPermissionService.Get(id);

            _menuPermissionService.Delete(ObjMenuPermission);
            alert.Status  = "success";
            alert.Message = "Register Successfully";

            return(Json(alert));
        }
        public IActionResult Delete(int id)
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            try
            {
                MenuPermission ObjMenuPermission = _menuPermissionService.Get(id);
                _menuPermissionService.Delete(ObjMenuPermission);

                sb.Append("Sumitted");
                return(Content(sb.ToString()));
            }
            catch (Exception ex)
            {
                sb.Append("Error :" + ex.Message);
            }

            return(Content(sb.ToString()));
        }