Пример #1
0
        public ActionResult UpdateResult(Results result)
        {
            try
            {
                if (ModelState.IsValid)
                    new ResultsManager().UpdateResult(result);

                return RedirectToAction(ActionShowResults);
            }
            catch (InvalidOperationException exception)
            {
                return RedirectToAction(ActionError, new { exception });
            }
        }
Пример #2
0
        public ActionResult AddResult(Results result)
        {
            try
            {
                if (ModelState.IsValid)
                    new ResultsManager().AddResult(result);

                return RedirectToAction(ActionShowResults);
            }
            catch
            {
                return RedirectToAction(ActionError);
            }
        }