Example #1
0
        public async Task <IActionResult> AddType(TypeListViewModel model)
        {
            try
            {
                await _schoolService.AddSchoolType(model.Type.Name);

                ShowAlertSuccess($"Added School Type '{model.Type.Name}'");
            }
            catch (GraException gex)
            {
                ShowAlertDanger("Unable to add School Type: ", gex);
            }
            return(RedirectToAction("Types"));
        }