protected async override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); int placeID; string idstring; base.OnNavigatedTo(e); NavigationContext.QueryString.TryGetValue("id", out idstring); placeID = Int32.Parse(idstring); Place_extended local = await vextended.GetDefaultExtendeds(placeID); detalleLocal.DataContext = local; //Ofertas var ofertas = await vofertas.GetDefault(local.placeID, true); foreach (Offer item in ofertas) { item.place = local; } ofertaslocal.DataContext = GetItemGroups(ofertas.OrderBy(o => o.place.distraw).ToList(), c => c.place.name); //Fiestas var fiestas = await vparties.GetDefault(local.placeID); fiestaslocal.DataContext = GetItemGroups(fiestas.OrderBy(o => o.beginDate.Date).ToList(), c => c.fecha); string url = "http://produccion.rl2012alc.com/api/index.php/getPlacePicturesFromUsers"; imagenes.DataContext = await vimages.GetDefault(local.placeID.ToString(), url); }
protected async override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); string idstring; base.OnNavigatedTo(e); NavigationContext.QueryString.TryGetValue("id", out idstring); placeID = Int32.Parse(idstring); local = await vextended.GetDefaultExtendeds(placeID); }
public async Task <Place_extended> GetDefaultExtendeds(int id) { Uri url = new Uri("http://produccion.rl2012alc.com/api/index.php/getPlaces"); objetoslistas.getPlacesinput paquete = new objetoslistas.getPlacesinput(); paquete.placeIDs = new int[1]; paquete.placeIDs[0] = id; string respuesta = await metodosJson.jsonPOST(url, paquete); var respuestajson = JsonConvert.DeserializeObject <objetoslistas.getPlacesoutput>(respuesta.ToString()); Place_extended local = new Place_extended(respuestajson.place[0]); Extendeds = local; return(local); }