示例#1
0
        public ActionResult Create(vwInfoBenefit vwinfobenefit)
        {
            if (ModelState.IsValid)
            {
                db.vwInfoBenefits.Add(vwinfobenefit);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(vwinfobenefit);
        }
示例#2
0
 public ActionResult Edit(vwInfoBenefit vwinfobenefit)
 {
     if (ModelState.IsValid)
     {
         db.Entry(vwinfobenefit).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(vwinfobenefit);
 }