public void LoadCatalogs() { IsBusy = true; LoadingStep = "Chargement des catalogues ..."; Application.Current.Dispatcher.BeginInvoke(new Action(delegate { Mouse.OverrideCursor = Cursors.Wait; }), null); CatalogRepository = new Model.Local.CatalogRepository(); Catalogs = new ObservableCollection <Model.Local.Catalog>(CatalogRepository.ListParent(0)); Core.Temp.ListF_CATALOGUE = new List <Model.Sage.F_CATALOGUE>(); Core.Temp.ListF_CATALOGUE.Add(new Model.Sage.F_CATALOGUE() { CL_Intitule = "Aucun", }); Core.Temp.ListF_CATALOGUE.AddRange(new Model.Sage.F_CATALOGUERepository().List()); OnPropertyChanged("ListF_CATALOGUE"); SelectedCatalog = null; SyncAll = true; LoadingStep = string.Empty; IsBusy = false; Application.Current.Dispatcher.BeginInvoke(new Action(delegate { Mouse.OverrideCursor = null; }), null); }
public void LoadCatalogs() { IsBusy = true; LoadingStep = "Chargement des catalogues ..."; Application.Current.Dispatcher.BeginInvoke(new Action(delegate { Mouse.OverrideCursor = Cursors.Wait; }), null); CatalogRepository = new Model.Local.CatalogRepository(); Catalogs = new ObservableCollection <Model.Local.Catalog>(CatalogRepository.ListParent(0)); SelectedCatalog = null; LoadingStep = string.Empty; IsBusy = false; Application.Current.Dispatcher.BeginInvoke(new Action(delegate { Mouse.OverrideCursor = null; }), null); }