public ActionResult DeleteConfirmed(int id) { AdjustmentsCodes adjustmentsCodes = db.AdjustmentsCodes.Find(id); db.AdjustmentsCodes.Remove(adjustmentsCodes); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "AdjustmentsCodesID,Type,Description,Range")] AdjustmentsCodes adjustmentsCodes) { if (ModelState.IsValid) { db.Entry(adjustmentsCodes).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(adjustmentsCodes)); }
public ActionResult Create([Bind(Include = "AdjustmentsCodesID,Type,Description,Range")] AdjustmentsCodes adjustmentsCodes) { if (ModelState.IsValid) { db.AdjustmentsCodes.Add(adjustmentsCodes); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(adjustmentsCodes)); }
// GET: AdjustmentsCodes/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AdjustmentsCodes adjustmentsCodes = db.AdjustmentsCodes.Find(id); if (adjustmentsCodes == null) { return(HttpNotFound()); } return(View(adjustmentsCodes)); }