public IHttpActionResult Approve(int id, object dtoItem) { // authentication if (id > 0 && !fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanApprove)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } executor.Approve(ControllerContext.GetAuthUserId(), id, ref dtoItem, out Library.DTO.Notification notification); return(Ok(new Library.DTO.ReturnData <object>() { Data = dtoItem, Message = notification })); }
public IHttpActionResult ApproveData(int id, object dtoItem) { if (!fwBLL.CanPerformAction(ControllerContext.GetAuthUserId(), ModuleCode, ModuleAction.CanApprove)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } executor.Approve(ControllerContext.GetAuthUserId(), id, ref dtoItem, out Notification notification); return(Ok(new ReturnData <object>() { Data = dtoItem, Message = notification })); }
public IHttpActionResult Approve(int id, object dtoItem) { // authentication if (id > 0 && !fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanApprove)) { return(Ok(new Library.DTO.ReturnData <Object>() { Data = null, Message = new Library.DTO.Notification { Type = Library.DTO.NotificationType.Error, Message = "Not authorized!" }, TotalRows = 0 })); } executor.Approve(ControllerContext.GetAuthUserId(), id, ref dtoItem, out Library.DTO.Notification notification); return(Ok(new Library.DTO.ReturnData <object>() { Data = dtoItem, Message = notification })); }