public async Task <ActionResult> CurrentBookingSearch() { BookingDTO bookingSearch = new BookingDTO(); var task1 = new VehicleGroupService(AUTHTOKEN, p_mobileNo).GetDataAsync(); var task2 = new VehicleTypeService(AUTHTOKEN, p_mobileNo).GetDataAsync(); var result = await Task.WhenAll(task1, task2); bookingSearch.VehicleGroupList = result[0]; bookingSearch.VehicleTypeList = result[1]; return(View(bookingSearch)); }
public async Task <ActionResult> Ratecard() { var rateCardVm = new RateCardVm(); var task1 = new VehicleGroupService(AUTHTOKEN, p_mobileNo).GetDataAsync(); var task2 = new VehicleTypeService(AUTHTOKEN, p_mobileNo).GetDataAsync(); var result = await Task.WhenAll(task1, task2); rateCardVm.VehicleGrouplookUpData = result[0]; rateCardVm.VehicleTypelookUpData = result[1]; return(View(rateCardVm)); }
public async Task <ActionResult> Index() { var tripEstimateVm = new TripEstimateVm(); var task1 = new VehicleGroupService(AUTHTOKEN, p_mobileNo).GetDataAsync(); var task2 = new VehicleTypeService(AUTHTOKEN, p_mobileNo).GetDataAsync(); var result = await Task.WhenAll(task1, task2); tripEstimateVm.VehicleGrouplookUpData = result[0]; tripEstimateVm.VehicleTypelookUpData = result[1]; if (ISLOGGEDIN) { tripEstimateVm.customer = (Customer)HttpContext.Session["SSN_CUSTOMER"]; } else { tripEstimateVm.customer = new Customer(); } ViewBag.isUserLoggedIn = ISLOGGEDIN; return(View(tripEstimateVm)); }