public IHttpActionResult Reset(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.Reset(ControllerContext.GetAuthUserId(), id, ref dtoItem, out Library.DTO.Notification notification);
     return(Ok(new Library.DTO.ReturnData <object>()
     {
         Data = dtoItem, Message = notification
     }));
 }
Beispiel #2
0
 public IHttpActionResult Reset(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.Reset(ControllerContext.GetAuthUserId(), id, ref dtoItem, out Library.DTO.Notification notification);
     return(Ok(new Library.DTO.ReturnData <object>()
     {
         Data = dtoItem, Message = notification
     }));
 }