Example #1
0
        public IHttpActionResult UnconfirmData(int id, object dtoItem)
        {
            if (!bLL.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, 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 Approve(int id, object obj)
        {
            if (HasNotUpdatePermission(id, out IHttpActionResult httpActionResult))
            {
                return(httpActionResult);
            }

            SetModuleIdenfitier(executor);

            executor.Approve(ControllerContext.GetAuthUserId(), id, ref obj, out Notification notification);
            return(Ok(new ReturnData <object>()
            {
                Data = obj, Message = notification
            }));
        }