protected async override void OnNavigatedTo(NavigationEventArgs e) { // Loading: Artikli.Clear(); ArtiklDalProvider dalProvider = new ArtiklDalProvider(); LoadingIndicator.IsActive = true; List <FirmaDAL.Artikl> result = await Task.Run(() => dalProvider.FetchAll()); LoadingIndicator.IsActive = false; foreach (var item in result) { Artikli.Add(item); } // Navigation logic Frame rootFrame = Window.Current.Content as Frame; if (rootFrame.CanGoBack) { Windows.UI.Core.SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = Windows.UI.Core.AppViewBackButtonVisibility.Visible; } else { Windows.UI.Core.SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = Windows.UI.Core.AppViewBackButtonVisibility.Collapsed; } }
public bool dodajArtikal(Artikal artikal) { if (baza.dodaj(artikal)) { Artikli.Add(artikal); return(true); } return(false); }