Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            CustomersCardType customerscardtype = db.CustomersCardTypes.Find(id);

            db.CustomersCardTypes.Remove(customerscardtype);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        //
        // GET: /CustomersCardTypeAdmin/Details/5

        public ActionResult Details(int id = 0)
        {
            CustomersCardType customerscardtype = db.CustomersCardTypes.Find(id);

            if (customerscardtype == null)
            {
                return(HttpNotFound());
            }
            return(View(customerscardtype));
        }
Beispiel #3
0
 public ActionResult Edit(CustomersCardType customerscardtype)
 {
     if (ModelState.IsValid)
     {
         db.Entry(customerscardtype).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(customerscardtype));
 }
Beispiel #4
0
        public ActionResult Create(CustomersCardType customerscardtype)
        {
            if (ModelState.IsValid)
            {
                db.CustomersCardTypes.Add(customerscardtype);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(customerscardtype));
        }