public ActionResult DeleteConfirmed(Guid id) { tbl_tableType tbl_tableType = db.tbl_tableType.Find(id); db.tbl_tableType.Remove(tbl_tableType); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "id,code,name")] tbl_tableType tbl_tableType) { if (ModelState.IsValid) { db.Entry(tbl_tableType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tbl_tableType)); }
public ActionResult Create([Bind(Include = "id,code,name")] tbl_tableType tbl_tableType) { if (ModelState.IsValid) { tbl_tableType.id = Guid.NewGuid(); db.tbl_tableType.Add(tbl_tableType); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tbl_tableType)); }
// GET: TableType/Delete/5 public ActionResult Delete(Guid?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tbl_tableType tbl_tableType = db.tbl_tableType.Find(id); if (tbl_tableType == null) { return(HttpNotFound()); } return(View(tbl_tableType)); }