private void AddButton_Click(object sender, RoutedEventArgs e)
        {
            viewModel.AddCustomer();

            // C//ustomersViewModel cus = new CustomersViewModel();
            // cus.LoadCustomers();
            DataChangedEventHandler handler = DataChanged;

            if (handler != null)
            {
                handler(this, new EventArgs());
            }
            this.Close();
        }
Exemplo n.º 2
0
 private void BtnAddCustomer_Click(object sender, RoutedEventArgs e)
 {
     AddCustomerViewModel.AddCustomer(txbCustomer.Text, txbAddress.Text, txbCity.Text, txbPostcode.Text, txbPhone.Text, txbEmail.Text);
     MessageBox.Show(txbCustomer.Text + " lisätty tietokantaan");
     this.Close();
 }