internal ReasonChangesEntity Add(ReasonChangesEntity obje) { ReasonChangesEntity ReasonChanges = db.ReasonChangesEntities.Add(obje); db.SaveChanges(); return(ReasonChanges); }
public ActionResult DeleteConfirmed(int id) { ReasonChangesEntity reasonChangesEntity = db.Find(id); db.Remove(reasonChangesEntity); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ReasonChangesID,Description,Status,DateChanges,OrderID")] ReasonChangesEntity reasonChangesEntity) { if (ModelState.IsValid) { db.Change(reasonChangesEntity); return(RedirectToAction("Index")); } ViewBag.OrderID = new SelectList(of.ToList(), "OrderID", "Description", reasonChangesEntity.OrderID); return(View(reasonChangesEntity)); }
// GET: Reason/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ReasonChangesEntity reasonChangesEntity = db.Find(id); if (reasonChangesEntity == null) { return(HttpNotFound()); } return(View(reasonChangesEntity)); }
// GET: Reason/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ReasonChangesEntity reasonChangesEntity = db.Find(id); if (reasonChangesEntity == null) { return(HttpNotFound()); } ViewBag.OrderID = new SelectList(of.ToList(), "OrderID", "Description", reasonChangesEntity.OrderID); return(View(reasonChangesEntity)); }
public ReasonChangesEntity Remove(ReasonChangesEntity obje) { return(ob.Remove(obje)); }
public bool Change(ReasonChangesEntity obje) { ob.Change(obje); return(true); }
public bool Add(ReasonChangesEntity obje) { ob.Add(obje); return(true); }
internal bool Change(ReasonChangesEntity obje) { db.Entry(obje).State = EntityState.Modified; db.SaveChanges(); return(true); }