public ResponsePermissionFunc Update_PermissionFunc(string group_code, IList <PermissionFuncModel> data) { ResponsePermissionFunc resp = new ResponsePermissionFunc(); try { var rest = _IPermissionFuncRepository.Update_PermissionFunc(group_code, data); resp.status = rest >= 0 ? StatusResponse.Success : StatusResponse.Error; resp.message = rest >= 0 ? "Update Successfull." : "Update Fail."; return(resp); } catch (Exception ex) { _ILogs.LogError("PermissionFunc Service: ", ex.Message.ToString(), ex.StackTrace); } return(null); }
public ActionResult GetListPermissionFunc(string GroupCode) { var _data = _IPermissionFuncService.GetListPermissionFunc(GroupCode); if (_data != null) { ResponsePermissionFunc resp = new ResponsePermissionFunc() { status = StatusResponse.Success, message = "success.", data = _data, }; return(Ok(new { resp })); } else { return(BadRequest()); } }
public ActionResult UpdatePermissionFunc(string GroupCode, [FromBody] IList <PermissionFuncModel> data) { ResponsePermissionFunc resp = _IPermissionFuncService.Update_PermissionFunc(GroupCode, data); return(Ok(new { resp })); }