private void BtnEditCustomerGroup_Clicks(object sender, RoutedEventArgs e) { this.isEdit = true; NewCustomerGroup v = new NewCustomerGroup(this); v.Show(); }
private void BtnNewCustomerGroup_Clicks(object sender, RoutedEventArgs e) { this.isEdit = false; bool isWindowOpen = false; foreach (Window w in Application.Current.Windows) { if (w is NewCustomerGroup) { isWindowOpen = true; w.Activate(); } } if (!isWindowOpen) { NewCustomerGroup period = new NewCustomerGroup(this); period.Show(); } }