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