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