Exemple #1
0
        private async void Window_Loaded(object sender, RoutedEventArgs e)
        {
            var fabricantes = await consultaDeFabricantes.ObtemObservavelDeFabricantes();

            var list = fabricantes.Select(p => FabricanteViewModel.From(p)).ToList();

            var observableCollection = new FabricantesObservableCollection(
                cadastroDeFabricantes,
                list
                );

            //fabricantesBindingSource.DataSource = bindingList;

            //bindingList.StatusChanged += SetStatusBar;

            //

            //componentesBindingSource.DataSource = await consultaDeComponentes.ParaDropdown();

            CollectionViewSource fabricanteViewModelViewSource = ((CollectionViewSource)(this.FindResource("fabricanteViewModelViewSource")));

            fabricanteViewModelViewSource.Source = observableCollection;
        }
Exemple #2
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            var parameters = e.Parameter as FabricantesPageParameter;

            this.cadastroDeFabricantes = parameters.CadastroDeFabricantes;

            this.consultaDeComponentes = parameters.ConsultaDeComponentes;

            this.consultaDeFabricantes = parameters.ConsultaDeFabricantes;

            //

            var fabricantes = await consultaDeFabricantes.ObtemObservavelDeFabricantes();

            var list = fabricantes.Select(p => FabricanteViewModel.From(p)).ToList();

            var observableCollection = new FabricantesObservableCollection(
                cadastroDeFabricantes,
                list
                );

            Fabricantes = observableCollection;

            //fabricantesBindingSource.DataSource = bindingList;

            //bindingList.StatusChanged += SetStatusBar;

            //

            //componentesBindingSource.DataSource = await consultaDeComponentes.ParaDropdown();

            //CollectionViewSource fabricanteViewModelViewSource = ((CollectionViewSource)(this.FindResource("fabricanteViewModelViewSource")));

            //fabricanteViewModelViewSource.Source = observableCollection;
        }
Exemple #3
0
 private async void Window_Loaded(object sender, RoutedEventArgs e)
 {
     Fabricantes = new FabricantesObservableCollection(new FabricanteViewModel[] { });
 }