private void toVisitBtn_Clicked(object sender, EventArgs e) { EventToVisitIndexModel eventToVisit = new EventToVisitIndexModel { EventID = this.eventID, PosjetilacID = Global.PrijavljeniKorisnik.KorisnikID }; //DisplayAlert("nesto", JsonConvert.SerializeObject(eventToVisit), "ok"); try { System.Net.Http.HttpResponseMessage response = eventToVisitService.PostResponse(eventToVisit); if (response.IsSuccessStatusCode) { DisplayAlert("success", "Oznacili ste dogadjaj sa ToVisit!", "OK"); toVisitBtn.IsVisible = false; this.Navigation.PushAsync(new MainPage()); } else { DisplayAlert("error", "error", "error"); } } catch (Exception ex) { DisplayAlert("ex", "ex", "ex"); } }
private void eventList_ItemTapped(object sender, ItemTappedEventArgs e) { EventToVisitIndexModel eventToVisit = e.Item as EventToVisitIndexModel; this.Navigation.PushAsync(new Events.EventToVisitDetails(eventToVisit.EventID)); }