public ActionResult DeleteConfirmed(long id) { DispatchAgencyTbl dispatchAgencyTbl = db.DispatchAgencyTbls.Find(id); db.DispatchAgencyTbls.Remove(dispatchAgencyTbl); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "DispatchAgencyID,DispatchAgencyName,Address,EmailID")] DispatchAgencyTbl dispatchAgencyTbl) { if (ModelState.IsValid) { db.Entry(dispatchAgencyTbl).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(dispatchAgencyTbl)); }
public ActionResult Create([Bind(Include = "DispatchAgencyID,DispatchAgencyName,Address,EmailID")] DispatchAgencyTbl dispatchAgencyTbl) { if (ModelState.IsValid) { db.DispatchAgencyTbls.Add(dispatchAgencyTbl); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(dispatchAgencyTbl)); }
// GET: Store/DispatchAgency/Delete/5 public ActionResult Delete(long?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DispatchAgencyTbl dispatchAgencyTbl = db.DispatchAgencyTbls.Find(id); if (dispatchAgencyTbl == null) { return(HttpNotFound()); } return(View(dispatchAgencyTbl)); }