示例#1
0
 public ActionResult Edit(Software software)
 {
     if (ModelState.IsValid)
     {
         db.Entry(software).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.OSSystemID = new SelectList(db.OSSystems, "OSSystemID", "OSSystemname", software.OSSystemID);
     return View(software);
 }
示例#2
0
        public ActionResult Create(Software software)
        {
            if (ModelState.IsValid)
            {
                db.Softwares.Add(software);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(software);
        }