// POST api/<controller> public IHttpActionResult Post([FromBody] ITS_WF_Status state) { try { return(Utils.Response(new WorkflowStatusDTO(Service.Add(state)), HttpStatusCode.InternalServerError, string.Format("Could not create status {0}.", state.WorkflowStatus), Request.RequestUri.AbsoluteUri)); } catch (Exception e) { return(ExceptionMSG(e)); } }
public IHttpActionResult Put([FromBody] ITS_WF_Status invStat) { try { return(Utils.Response(new WorkflowStatusDTO(Service.Update(invStat)), HttpStatusCode.NotFound, string.Format("Could not update work flow status {0}.", invStat.WorkflowStatus), Request.RequestUri.AbsoluteUri)); } catch (Exception e) { return(ExceptionMSG(e)); } }
public WorkflowStatusDTO(ITS_WF_Status workflowstatus) { ID = workflowstatus.ID; StatusCode = workflowstatus.StatusCode; WorkflowStatus = workflowstatus.WorkflowStatus; Description = workflowstatus.Description; UserCreated = workflowstatus.UserCreated; UserUpdated = workflowstatus.UserUpdated; DateCreated = workflowstatus.DateCreated; DateUpdated = workflowstatus.DateUpdated; }