public IHttpActionResult Putt_TakeChangeHistory(int id, t_TakeChangeHistory t_TakeChangeHistory) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != t_TakeChangeHistory.ID) { return(BadRequest()); } db.Entry(t_TakeChangeHistory).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!t_TakeChangeHistoryExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.OK)); }
public IHttpActionResult Gett_TakeChangeHistory(int id) { t_TakeChangeHistory t_TakeChangeHistory = db.t_TakeChangeHistory.Find(id); if (t_TakeChangeHistory == null) { return(NotFound()); } return(Ok(t_TakeChangeHistory)); }
public IHttpActionResult Postt_TakeChangeHistory(t_TakeChangeHistory t_TakeChangeHistory) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.t_TakeChangeHistory.Add(t_TakeChangeHistory); db.SaveChanges(); return(CreatedAtRoute("DefaultApi", new { id = t_TakeChangeHistory.ID }, t_TakeChangeHistory)); }
public IHttpActionResult Deletet_TakeChangeHistory(int id) { t_TakeChangeHistory t_TakeChangeHistory = db.t_TakeChangeHistory.Find(id); if (t_TakeChangeHistory == null) { return(NotFound()); } db.t_TakeChangeHistory.Remove(t_TakeChangeHistory); db.SaveChanges(); return(Ok(t_TakeChangeHistory)); }