public async void CargarLugares() { Locations.Clear(); if (navigationService.GetAgenteActual() != null) { LocationsRequest = await apiService.GetParqueados(); if (LocationsRequest != null && LocationsRequest.Count() > 0) { foreach (var location in LocationsRequest) { string minuto = "" + location.HoraFin.ToLocalTime().Minute; TimeSpan tiempoSobrante = location.HoraFin.ToLocalTime() - DateTime.Now.ToLocalTime(); if (location.HoraFin.ToLocalTime().Minute.ToString().Length == 1) { minuto = "0" + location.HoraFin.ToLocalTime().Minute; } var item = new ListRequest { Titulo = location.placa, Subtitulo = "Finaliza a las " + location.HoraFin.ToLocalTime().Hour + ":" + minuto, }; Locations.Add(item); } } } }
public LocationsResponse Locations(LocationsRequest request) { try { return(DB.Locations(request.SongId)); } catch (Exception ex) { return(null); } }
public JsonResult Locations() { var locationsRequest = new LocationsRequest { Term = string.Empty }; LocationsResponse locationsResponse = _service.GetDistinctListofLocations(locationsRequest); return Json(locationsResponse.Locations); }
public Task <LocationsResponse> GetTrainLocations(string color) { var trainLines = string.IsNullOrEmpty(color) ? GetAllTrainLinesName() : new List <string> { color }; var locationRequest = new LocationsRequest() { TrainRoutes = trainLines, }; return(GetAsync <LocationsRequest, LocationsResponse>(locationRequest)); }
public IEnumerable <CoreSellersList> Get([FromBody] LocationsRequest request) { using (IDbConnection db = new SqlConnection(_settings.ConnectionString)) { string readSp = "zRest_GetCoreSeller"; DynamicParameters parameter = new DynamicParameters(); parameter.Add("@ZipCode", request.ZipCode); parameter.Add("@Lat", request.lat); parameter.Add("@Lng", request.lng); parameter.Add("@Range", request.range); parameter.Add("@RangeUnits", request.RangeUnits); return(db.Query <CoreSellersList>(readSp, parameter, commandType: CommandType.StoredProcedure).ToList()); } }