Exemplo n.º 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 });
            }
        }
Exemplo n.º 2
0
        public ActionResult AddResult(Results result)
        {
            try
            {
                if (ModelState.IsValid)
                    new ResultsManager().AddResult(result);

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