private void actAdd(object obj) { AddCustomerViewModel addCustomerViewModel = new AddCustomerViewModel(this); AddCustomerView addCustomerView = new AddCustomerView(); addCustomerView.DataContext = addCustomerViewModel; addCustomerViewModel.CloseActionFormAdd = new Action(() => addCustomerView.Close()); addCustomerView.Show(); }
public void openAddCustomerView() { AddCustomerViewModel addCustomerViewModel = new AddCustomerViewModel(); AddCustomerView addCustomerView = new AddCustomerView(); addCustomerView.DataContext = addCustomerViewModel; addCustomerViewModel.CloseActionFormAdd = new Action(() => addCustomerView.Close()); addCustomerView.Show(); }