Ejemplo n.º 1
0
        public ActionResult EducationLevelCreate(EducationLevelDTO data)
        {
            EducationLevelDTO el = new EducationLevelDTO();

            if (!ModelState.IsValid)
            {
                return(View(el));
            }
            try
            {
                EducationLevelDTO res = new EducationLevelDTO();
                res             = _educationLevelService.InsertEducationLevel(data);
                ViewBag.Success = "Education level " + data.LevelName + " has been created successfully";
                ModelState.Clear();
                return(View());
            }
            catch (Exception ex)
            {
                ViewBag.Error = ex.Message;
                return(View());
            }
        }