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();
            }
        }
        private void AddCustomer()
        {
            if (window == null)
            {
                MusteriModel musteri = new MusteriModel();

                window = new AddCustomerWindow(musteri);

                window.AddCustomerViewModel.PersonelSave += AddCustomerViewModelSaved;
                window.Closing += AddCustomerWindowClosing;
                window.Show();
            }

            else
            {
                window.Focus();
            }
        }
 public void NotifyCustomerAdded(Klant klant)
 {
     Customers.Add(new KlantVM(klant));
     _addCustomerWindow.Close();
     _addCustomerWindow = null;
 }
 private void AddKlantWindow()
 {
     _addCustomerWindow       = new AddCustomerWindow();
     _addCustomerWindow.Owner = Application.Current.MainWindow;
     _addCustomerWindow.Show();
 }
 public void NotifyAddCancelled()
 {
     _addCustomerWindow.Close();
     _addCustomerWindow = null;
 }
 private void AddCustomerWindowClosing(object sender, EventArgs e)
 {
     window.Dispose();
     window = null;
 }