public ActionResult DeleteConfirmed(int id) { CustomersCardType customerscardtype = db.CustomersCardTypes.Find(id); db.CustomersCardTypes.Remove(customerscardtype); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /CustomersCardTypeAdmin/Details/5 public ActionResult Details(int id = 0) { CustomersCardType customerscardtype = db.CustomersCardTypes.Find(id); if (customerscardtype == null) { return(HttpNotFound()); } return(View(customerscardtype)); }
public ActionResult Edit(CustomersCardType customerscardtype) { if (ModelState.IsValid) { db.Entry(customerscardtype).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(customerscardtype)); }
public ActionResult Create(CustomersCardType customerscardtype) { if (ModelState.IsValid) { db.CustomersCardTypes.Add(customerscardtype); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(customerscardtype)); }