public DocumentTypeDTO(ITS_DocumentType docs) { ID = docs.ID; DocumentType = docs.DocumentType; Description = docs.Description; EnabledYN = docs.EnabledYN; DateCreated = docs.DateCreated; UserCreated = docs.UserCreated; UserUpdated = docs.UserUpdated; DateUpdated = docs.DateUpdated; }
// PUT api/<controller>/5 public IHttpActionResult Put([FromBody] ITS_DocumentType docType) { return(Utils.Response(MapService.MapOne <ITS_DocumentType, DocumentTypeDTO>(Service.Update(docType)), HttpStatusCode.NotFound, string.Format("Could not update document type {0}.", docType.DocumentType), Request.RequestUri.AbsoluteUri)); }
// POST api/<controller> public IHttpActionResult Post([FromBody] ITS_DocumentType supplier) { return(Utils.Response(MapService.MapOne <ITS_DocumentType, DocumentTypeDTO>(Service.Add(supplier)), HttpStatusCode.InternalServerError, string.Format("Could not create document type {0}.", supplier.DocumentType), Request.RequestUri.AbsoluteUri)); }