public ActionResult DeleteConfirmed(int id) { HfedProvider hfedProvider = db.HfedProviders.Find(id); db.HfedProviders.Remove(hfedProvider); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Name,Address,MainPhone,Fax,Email,ContactName,ContactEmail,ContactPhone,BoxWeight,ProviderNote")] HfedProvider hfedProvider) { if (ModelState.IsValid) { db.Entry(hfedProvider).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(hfedProvider)); }
public ActionResult Create([Bind(Include = "Id,Name,Address,MainPhone,Fax,Email,ContactName,ContactEmail,ContactPhone,BoxWeight,ProviderNote")] HfedProvider hfedProvider) { if (ModelState.IsValid) { db.HfedProviders.Add(hfedProvider); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(hfedProvider)); }
// GET: HfedProviders/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } HfedProvider hfedProvider = db.HfedProviders.Find(id); if (hfedProvider == null) { return(HttpNotFound()); } return(View(hfedProvider)); }