Exemplo n.º 1
0
 private void ExecuteCreateOrder()
 {
     if (Clients.Any() && Products.Any())
     {
         StartLoading();
         DialogOrderEditViewModel.OpenDialog(DialogIdentifier0);
         StopLoading();
     }
 }
Exemplo n.º 2
0
 public MainViewModel(IDialogHost dialogHost, IDataRepository dataRepository, object dialogIdentifier0, object dialogIdentifier1)
 {
     DataRepository = dataRepository;
     DataRepository.OnRepositoryClosed += DataRepository_OnRepositoryClosed;
     DialogHost                 = dialogHost;
     DialogIdentifier0          = dialogIdentifier0;
     DialogIdentifier1          = dialogIdentifier1;
     DialogClientEditViewModel  = new DialogClientEditViewModel(dialogHost, this, dataRepository);
     DialogOrderEditViewModel   = new DialogOrderEditViewModel(dialogHost, this, dataRepository);
     DialogProductEditViewModel = new DialogProductEditViewModel(dialogHost, this, dataRepository);
     DialogInformationViewModel = new DialogInformationViewModel(dialogHost);
     Connect       = new RelayCommand(ExecuteConnect);
     Disconnect    = new RelayCommand(ExecuteDisconnect);
     CreateClient  = new RelayCommand(ExecuteCreateClient);
     EditClient    = new RelayCommand <IClient>(ExecuteEditClient);
     RemoveClient  = new RelayCommand <IClient>(ExecuteRemoveClient);
     CreateOrder   = new RelayCommand(ExecuteCreateOrder);
     EditOrder     = new RelayCommand <IOrder>(ExecuteEditOrder);
     RemoveOrder   = new RelayCommand <IOrder>(ExecuteRemoveOrder);
     CreateProduct = new RelayCommand(ExecuteCreateProduct);
     EditProduct   = new RelayCommand <IProduct>(ExecuteEditProduct);
     RemoveProduct = new RelayCommand <IProduct>(ExecuteRemoveProduct);
 }
Exemplo n.º 3
0
 private void ExecuteEditOrder(IOrder order)
 {
     DialogOrderEditViewModel.OpenDialog(order, DialogIdentifier0);
 }