public IHttpActionResult PutPODETAIL(string pono, string itcode, PODETAIL pODETAIL) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (pono != pODETAIL.PONO && itcode != pODETAIL.ITCODE) { return(BadRequest()); } db.MarkAsModified(pODETAIL); try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!PODETAILExists(pono, itcode)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult PutSUPPLIER(string id, SUPPLIER sUPPLIER) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != sUPPLIER.SUPLNO) { return(BadRequest()); } db.MarkAsModified(sUPPLIER); try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!SUPPLIERExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult PutITEM(string id, ITEM iTEM) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != iTEM.ITCODE) { return(BadRequest()); } db.MarkAsModified(iTEM); try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!ITEMExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }