public ActionResult DeleteConfirmed(int id) { Customers_Table customers_Table = db.Customers_Table.Find(id); db.Customers_Table.Remove(customers_Table); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "customerId,customerName,proId")] Customers_Table customers_Table) { if (ModelState.IsValid) { db.Entry(customers_Table).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.proId = new SelectList(db.ProductTables, "proId", "proName", customers_Table.proId); return(View(customers_Table)); }
// GET: Customers_Table/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Customers_Table customers_Table = db.Customers_Table.Find(id); if (customers_Table == null) { return(HttpNotFound()); } return(View(customers_Table)); }
// GET: Customers_Table/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Customers_Table customers_Table = db.Customers_Table.Find(id); if (customers_Table == null) { return(HttpNotFound()); } ViewBag.proId = new SelectList(db.ProductTables, "proId", "proName", customers_Table.proId); return(View(customers_Table)); }