private void AddNewUnitButton_Click(object sender, RoutedEventArgs e) { if (NewUnitNameTextBox.Text.Trim() == string.Empty) { return; } _cc.AddWorkUnit(Convert.ToInt32(WorkerGroupsComboBox.SelectedValue), NewUnitNameTextBox.Text, Convert.ToInt32(FactoriesComboBox.SelectedValue)); NewUnitNameTextBox.Text = string.Empty; AddNewUnitGrid.Visibility = Visibility.Hidden; AdministrationClass.AddNewAction(24); }