예제 #1
0
        public ActionResult Create(CreateViewModel cvm)
        {
            if (ModelState.IsValid)  // required fields entered?
            {
                _adapter.SaveCreateViewModel(cvm);
                return RedirectToAction("Create", "Restricted");
            }

            return View();
        }
예제 #2
0
        public ActionResult Delete(RetrieveViewModel rvm)
        {
            CreateViewModel cvm = new CreateViewModel();

            if (ModelState.IsValid)  // required fields entered?
            {

                cvm = _adapter.GetCreateViewModel(rvm);

                if (cvm == null) // not found
                    return View();
                else
                    return View("DeleteBridge", cvm);
            }

            return View();
        }
예제 #3
0
        public ActionResult DeleteByCoords(CreateViewModel cvm)
        {
            _adapter.DropBridge(cvm);

            return RedirectToAction("Delete", "Restricted");
        }
예제 #4
0
        public ActionResult Update(CreateViewModel cvm)
        {
            if (ModelState.IsValid)  // required fields entered?
            {
                _adapter.UpdateCreateViewModel(cvm);
                return View("Retrieve");
            }

            return View();
        }