public async Task <ActionResult> List(Paging paging, List <OrderBy> orderBy) { try { var data = await _driverBusinessService.RetrieveDrivers(orderBy, paging); return(this.JsonNet(data)); } catch (Exception ex) { return(this.JsonNet("")); } }
public async Task <ActionResult> List(Paging paging, List <OrderBy> orderBy) { var isSuperAdmin = User.IsSuperAdmin(); var drivingSchoolId = UserDrivingSchoolId; try { var data = await _driverBusinessService.RetrieveDrivers(isSuperAdmin, drivingSchoolId, orderBy, paging); return(this.JsonNet(data)); } catch (Exception ex) { return(this.JsonNet("")); } }
public async Task <ActionResult> Edit(int driverFeedbackId) { var driverFeedback = await _driverFeedbackBusinessService.RetrieveDriverFeedback(driverFeedbackId); if (driverFeedback == null) { return(HttpNotFound()); } var driverData = await _driverBusinessService.RetrieveDrivers(); var drivers = driverData.Items.ToList(); var viewModel = new DriverFeedbackViewModel() { DriverFeedback = driverFeedback, Drivers = new SelectList(drivers, "DriverId", "Name") }; return(View(viewModel)); }