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