예제 #1
0
 public ActionResult Edit(WorkStationType workstationtype)
 {
     if (ModelState.IsValid)
     {
         db.Entry(workstationtype).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(workstationtype);
 }
예제 #2
0
        public ActionResult Create(WorkStationType workstationtype)
        {
            if (ModelState.IsValid)
            {
                db.WorkStationTypes.Add(workstationtype);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(workstationtype);
        }