public async Task <IActionResult> Create() { var viewModel = new InsurenceCreateViewModel(); viewModel.Vehicles = await _movtechAPIService.GetAllVeiculos(); viewModel.Insurers = await _movtechAPIService.GetAllInsurers(); viewModel.Brokers = await _movtechAPIService.GetAllBrokers(); return(View(viewModel)); }
public async Task <JsonResult> GetLocalizations() { var vehicles = await _movtechAPIService.GetAllVeiculos(); List <object> retorno = new List <object>(); int i = 0; foreach (var v in vehicles) { i++; object[] row = { v.LicensePlate, v.Latitude, v.Longitude, i }; retorno.Add(row); } return(Json(retorno.ToArray())); }
public async Task <IActionResult> Index() { var vehicles = await _movtechAPIService.GetAllVeiculos(); return(View(vehicles)); }