示例#1
0
 public ActionResult Edit(OSSystem ossystem)
 {
     if (ModelState.IsValid)
     {
         db.Entry(ossystem).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(ossystem);
 }
示例#2
0
        public ActionResult Create(OSSystem ossystem)
        {
            if (ModelState.IsValid)
            {
                db.OSSystems.Add(ossystem);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(ossystem);
        }