Example #1
0
        public ActionResult Manage(Adm adm)
        {
            var actionName = nameof(Index);

            try
            {
                _admBusiness.SaveAndReturn(adm);
            }
            catch (Exception ex)
            {
                TempData[nameof(Adm)]     = adm;
                TempData[Constants.ERROR] = ex.Message;
                actionName = nameof(Manage);
            }

            return(RedirectToAction(actionName, "Adm"));
        }
Example #2
0
 private void ValidateAndSave(Adm adm)
 {
     _personBusiness.ValidadePerson(adm.Person);
     _admBusiness.SaveAndReturn(adm);
 }