Esempio n. 1
0
        public ActionResult Create(PaymentType paymenttype)
        {
            if (ModelState.IsValid)
            {
                db.PaymentTypes.Add(paymenttype);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(paymenttype);
        }
Esempio n. 2
0
 public ActionResult Edit(PaymentType paymenttype)
 {
     if (ModelState.IsValid)
     {
         db.Entry(paymenttype).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(paymenttype);
 }