Exemplo n.º 1
0
        public ActionResult Search()
        {
            var model = new CourseSearchVm()
            {
                OrganizationSLI = GetAllOrganizationSlItems()
            };

            return(View(model));
        }
Exemplo n.º 2
0
        public JsonResult GetSearchInformation()
        {
            var courses = _courseManager.GetAllCourse();
            List <CourseSearchVm> dataList = new List <CourseSearchVm>();

            foreach (var course in courses)
            {
                var searchInfo = new CourseSearchVm()
                {
                    Name         = course.Name,
                    Duration     = course.Duration,
                    Fees         = course.Fees,
                    Participants = _courseManager.GetAllParticipantsForSearch(course.Id),
                    Trainers     = _courseManager.GetAllTrainersForSearch(course.Id),
                    Batches      = _courseManager.GetAllBatchForSearch(course.Id)
                };
                dataList.Add(searchInfo);
            }

            return(Json(dataList));
        }