private async void Delete_Tapped(object sender, EventArgs e) { using (UserDialogs.Instance.Loading("")) { try { var s = (TappedEventArgs)e; var castedObj = s.Parameter as Favourite; FavService fs = new FavService(); bool r = await fs.DeleteFavorite(castedObj).ConfigureAwait(false); if (r) { IntroPageViewModel ivm = new IntroPageViewModel(); ivm.Initializefavourites(); } } catch (Exception ex) { var log = ex; LogService.LogErrors(ex.ToString()); } } }
public AppLanding() { InitializeComponent(); try { ivm = new IntroPageViewModel(); mcvm = new MyCreatedCollectionViewModel(); ivm.GetDeals(); ivm.GetCategories(); ivm.GetAll(); ivm.GetAllSearchFromNewModel(); ivm.GetAllThisWeek(); ivm.Initializefavourites(); mcvm.InitializeFavListNewUI(); ThisWeek_Tapped(this, null); ShowSurVeyOne(); this.BindingContext = this; } catch (Exception ex) { var log = ex; } }
private void RefreshFavourites() { IntroPageViewModel ivm = new IntroPageViewModel(); ivm.Initializefavourites(); }