コード例 #1
0
        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));
        }
コード例 #2
0
        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()));
        }
コード例 #3
0
        public async Task <IActionResult> Index()
        {
            var vehicles = await _movtechAPIService.GetAllVeiculos();

            return(View(vehicles));
        }