Пример #1
0
        public void ShowAllCustomers()
        {
            MultiCustomerViewModel viewModel = this.ViewModels.FirstOrDefault(vm => vm is MultiCustomerViewModel) as MultiCustomerViewModel;

            if (viewModel == null)
            {
                viewModel = new MultiCustomerViewModel(repositorys);
                viewModel.RequestClose += this.OnWorkspaceRequestClose;
                this.ViewModels.Add(viewModel);
            }

            this.ActivateViewModel(viewModel);
        }
Пример #2
0
        /// <summary>
        /// Shows all customers.
        /// </summary>
        public void ShowAllCustomers()
        {
            MultiCustomerViewModel viewModel = this.ViewModels.FirstOrDefault(vm => vm is MultiCustomerViewModel) as MultiCustomerViewModel;

            if (viewModel == null)
            {
                MultiCustomerViewModel mcvm = new MultiCustomerViewModel(this.repo);
                mcvm.RequestClose += this.OnWorkspaceRequestClose;
                this.ViewModels.Add(mcvm);
            }

            this.ActivateViewModel(viewModel);
        }