示例#1
0
        public ActionResult RecognizeTesting()
        {
            SelectListFactory slFactory = new SelectListFactory();

            ViewBag.RollCallID = slFactory.MakeSelectList <RollCall>("RollCallID", "RollCallID");
            return(View());
        }
示例#2
0
        public async Task <IActionResult> OnGet(int id)
        {
            try
            {
                var trainee = await _traineeService.GetTraineeById(id);

                if (trainee == null)
                {
                    return(NotFound());
                }

                Input = new InputModel()
                {
                    TraineeId   = trainee.TraineeId,
                    Address     = trainee.Address,
                    DoB         = trainee.DoB,
                    Email       = trainee.Email,
                    PhoneHome   = trainee.PhoneHome,
                    PhoneMobile = trainee.PhoneMobile,
                    FullName    = trainee.FullName,
                    GenderId    = trainee.GenderId,
                    Gender      = (await _genderService.GetGenders()).Select(p => SelectListFactory.Create(p))
                };

                return(Page());
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
示例#3
0
        public async Task <IActionResult> OnGet(int id)
        {
            try
            {
                var training = await _trainingService.GetTrainingById(id);

                if (training == null)
                {
                    return(NotFound());
                }

                Input = new InputModel()
                {
                    TrainingId = training.TrainingId,
                    Courses    = (await _courseService.GetCourses()).Select(p => SelectListFactory.Create(p)),
                    CourseId   = training.CourseId,
                    StartDate  = training.StartDate,
                    EndDate    = training.EndDate
                };
                return(Page());
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
示例#4
0
        public async Task <IActionResult> OnGet()
        {
            Input = new InputModel()
            {
                Gender = (await _genderService.GetGenders()).Select(p => SelectListFactory.Create(p))
            };

            return(Page());
        }
示例#5
0
        public async Task <IActionResult> OnGet()
        {
            Input = new InputModel()
            {
                Courses = (await _courseService.GetCourses()).Select(p => SelectListFactory.Create(p))
            };

            return(Page());
        }
示例#6
0
        public IActionResult Index()
        {
            var model = new MenuViewModel()
            {
                Countries = _repository.GetCountries().Select(p => SelectListFactory.Get(p))
            };

            return(View(model));
        }
示例#7
0
        public IActionResult AddUpdateCity()
        {
            var model = new MenuViewModel()
            {
                Countries = _repository.GetCountries().Select(p => SelectListFactory.Get(p))
            };

            return(Json(model));
        }
        public ActionResult SessionDetail(int ID)
        {
            StudySession      Session   = StuSesBO.GetSessionByID(ID);
            SelectListFactory slFactory = new SelectListFactory();

            ViewBag.InstructorID       = slFactory.MakeSelectList <Instructor>("InstructorID", "FullName", Session.InstructorID);
            ViewBag.LastAttendanceDate = RollBO.LastAttendanceDate(Session.RollCallID);

            return(PartialView("_SessionDetail", Session));
        }
示例#9
0
        public StudentController()
        {
            RSMEntities db = new RSMEntities();

            slFactory = new SelectListFactory(db);
            ClassBO   = new ClassBusiness(db);
            StuBO     = new StudentBusiness(db);
            AccBO     = new AccountBusiness(db);
            RollBO    = new RollCallBusiness(db);
            ReBO      = new RequestBusiness(db);
        }
示例#10
0
        public AdminController()
        {
            RSMEntities db = new RSMEntities();

            StuBO     = new StudentBusiness(db);
            ClaBO     = new ClassBusiness(db);
            ReBO      = new RequestBusiness(db);
            SlFactory = new SelectListFactory(db);
            StaffBO   = new StaffBusiness(db);
            AccBO     = new AccountBusiness(db);
            StuImBO   = new StudentImageBusiness(db);
        }
        public RollCallController()
        {
            RSMEntities DB = new RSMEntities();

            RollBO    = new RollCallBusiness(DB);
            SlFactory = new SelectListFactory(DB);
            ClaBO     = new ClassBusiness(DB);
            SubBO     = new SubjectBusiness(DB);
            StuBO     = new StudentBusiness(DB);
            InsBO     = new InstructorBusiness(DB);
            SeBO      = new SemesterBusiness(DB);
            MjBO      = new MajorBusiness(DB);
        }
示例#12
0
        public async Task <IActionResult> AddUpdateCity(MenuViewModel model)
        {
            if (ModelState.IsValid)
            {
                var city = new City()
                {
                    Description = model.CityName,
                    CountryId   = model.CountryId
                };
                await _repository.Add(city);

                await _repository.Save();

                ModelState.AddModelError("", "City Added Successfully");
            }
            model.Countries = _repository.GetCountries().Select(p => SelectListFactory.Get(p));
            return(View(model));
        }
        //
        // GET: /Subject/

        public InstructorsController()
        {
            InsBO     = new InstructorBusiness();
            slFactory = new SelectListFactory();
        }
        //
        // GET: /Subject/

        public ClassController()
        {
            slFactory = new SelectListFactory();
            ClassBO   = new ClassBusiness();
            StuBO     = new StudentBusiness();
        }
        //
        // GET: /Subject/

        public SubjectController()
        {
            SubBO     = new SubjectBusiness();
            slFactory = new SelectListFactory();
        }
示例#16
0
        public IActionResult GetCountries()
        {
            var countries = _repository.GetCountries().Select(p => SelectListFactory.Get(p));

            return(Json(countries));
        }