Esempio n. 1
0
        public ActionResult Create(Method method)
        {
            if (ModelState.IsValid)
            {
                db.Methods.Add(method);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.RemoteWebServiceId = new SelectList(db.RemoteWebServices, "Id", "ServiceName", method.RemoteWebServiceId);
            return View(method);
        }
Esempio n. 2
0
 public ActionResult Edit(Method method)
 {
     if (ModelState.IsValid)
     {
         db.Entry(method).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.RemoteWebServiceId = new SelectList(db.RemoteWebServices, "Id", "ServiceName", method.RemoteWebServiceId);
     return View(method);
 }