Exemplo n.º 1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            // récupération des artistes
            BusinessLayer.BusinessManager bm = new BusinessLayer.BusinessManager();
            IList<EntitiesLayer.Artiste> artistes = bm.GetArtistes();

            // Initialisation du viewModel

            ViewModel.ArtistesViewModel avm = new WpfArtistesViewer.ViewModel.ArtistesViewModel(artistes);
            avm.CloseNotified += CloseNotified;
            ucArtistes.DataContext = avm;
        }
Exemplo n.º 2
0
        public ArtisteViewer(EntitiesLayer.Artiste source) 
        {
            InitializeComponent();

            if (source == null)
            {
                // récupération d'un artiste
                BusinessLayer.BusinessManager bm = new BusinessLayer.BusinessManager();
                _source = bm.GetArtistes()[0];
            }
            else _source = source;
        }