コード例 #1
0
 public ActionResult Edit(PaymentForm model)
 {
     if (ModelState.IsValid)
     {
         db.Entry(model).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(model);
 }
コード例 #2
0
        public ActionResult Create(PaymentForm model)
        {
            if (ModelState.IsValid)
            {
                db.PaymentForm.Add(model);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(model);
        }
コード例 #3
0
 public ActionResult Delete(PaymentForm model)
 {
     db.Entry(model).State = System.Data.Entity.EntityState.Deleted;
     db.SaveChanges();
     return RedirectToAction("Index");
 }