private void AddCustomer_Click(object sender, RoutedEventArgs e) { AddCustomer ac = new AddCustomer(); ac.ParentWindow = this; this.Hide(); ac.Show(); updateData = true; }
private void NewCustomerButton_Click(object sender, RoutedEventArgs e) { AddCustomer ac = new AddCustomer(); ac.ParentWindow = this; ac.CustomerAddCompleted += (s, es) => { foreach (UIElement ele in OrderStackPanel.Children) { if (ele is OrderControl) { (ele as OrderControl).PopulateCustomerComboBox(); } } }; this.Hide(); ac.Show(); }