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