Exemple #1
0
 void ShowWindowAddCustomer() // Wyświetlenie okna dialogowego do wprowadzenia nowego typu produktu
 {
     NewCustomerVM                  = new AddCustomerViewModel();
     _addCustomerWindow             = new AddCustomerWindow();
     _addCustomerWindow.DataContext = NewCustomerVM;
     _addCustomerWindow.ShowDialog();
 }
        private void AddCustomerButton_Click(object sender, RoutedEventArgs e)
        {
            AddCustomerWindow wind = new AddCustomerWindow();

            //Delegate for updating DataGrid after customer was added to Data Base
            wind.DataChanged += AddCustomerWindow_DataChanged;
            wind.ShowDialog();
        }
Exemple #3
0
        void ShowWindowEditCustomer() // Wyświetlenie okna dialogowego do edycji typu produktu
        {
            if (SelectedCustomer != null)
            {
                NewCustomerVM           = new AddCustomerViewModel();
                NewCustomerVM.Client    = SelectedCustomer;
                NewCustomerVM.IdVisible = Visibility.Visible;

                _addCustomerWindow             = new AddCustomerWindow();
                _addCustomerWindow.DataContext = NewCustomerVM;
                _addCustomerWindow.Title       = "Edycja Klienta";
                _addCustomerWindow.ShowDialog();
            }
        }