Пример #1
0
        public ActionResult EducationLevel()
        {
            if (!ViewBag.AllowView)
            {
                ViewBag.Error = "You are not Authorize to use this Page";
                return(PartialView("_partialviewNotFound"));
            }

            IEnumerable <EducationLevelDTO> list = _educationLevelService.GetEducationLevel();

            return(View(list));
        }
        public ActionResult AddEducation()
        {
            EmpEducationDTO employeeEducation = new EmpEducationDTO();

            employeeEducation.CountryList = _empEducationService.GetCountryList();
            List <SelectListItem> educationLevel = new List <SelectListItem>();

            foreach (var row in _educationLevel.GetEducationLevel())
            {
                educationLevel.Add(new SelectListItem
                {
                    Text  = row.LevelName,
                    Value = row.LevelId.ToString()
                });
            }
            IEnumerable <SelectListItem> CountryList = _countryService.GetCountryList();

            ViewBag.EducationLevel = educationLevel;
            ViewBag.Countries      = CountryList;
            return(View(employeeEducation));
        }
Пример #3
0
        public ActionResult EducationCreate(int id)
        {
            if (!ViewBag.AllowCreate)
            {
                ViewBag.Error = "You are not Authorize to use this Page";
                return(PartialView("_partialviewNotFound"));
            }
            List <SelectListItem> educationLevel = new List <SelectListItem>();

            foreach (var row in _educationLevel.GetEducationLevel())
            {
                educationLevel.Add(new SelectListItem {
                    Text  = row.LevelName,
                    Value = row.LevelId.ToString()
                });
            }
            IEnumerable <SelectListItem> CountryList = _countryService.GetCountryList();

            ViewBag.Countries      = CountryList;
            ViewBag.EducationLevel = educationLevel;
            ViewBag.SideBar        = _moduleService.AdminEmployeeDetailsMenu(id);
            ViewBag.EmployeeDetail = _empDetails.GetEmployeeDetails(id);
            return(View("../Employee/Education/EducationCreate"));
        }