Пример #1
0
        public async Task <ActionResult> DrivingSchoolAvailability()
        {
            var drivingSchoolCar = await _drivingSchoolCarBusinessService.RetrieveDrivingSchoolCars(false, 0);

            var drivingSchoolCarList = drivingSchoolCar.Items.ToList();
            var viewModel            = new HomeViewModel()
            {
                DrivingSchoolAvailabilityFilter = new DrivingSchoolAvailabilityFilter(),
                DrivingSchoolCars = new SelectList(drivingSchoolCarList, "DrivingSchoolCarId", "DrivingSchoolCarName")
            };

            return(View(viewModel));
        }
        public async Task <ActionResult> List(Paging paging, List <OrderBy> orderBy)
        {
            var isSuperAdmin    = User.IsSuperAdmin();
            var drivingSchoolId = UserDrivingSchoolId;

            try
            {
                var data = await _drivingSchoolCarBusinessService.RetrieveDrivingSchoolCars(isSuperAdmin, drivingSchoolId, orderBy, paging);

                return(this.JsonNet(data));
            }
            catch (Exception ex)
            {
                return(this.JsonNet(""));
            }
        }