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

            return View(paymenttype);
        }
Ejemplo 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);
 }