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