Exemple #1
0
        private void DeleteDep_Click(object sender, RoutedEventArgs e)
        {
            var res = MessageBox.Show("Czy na pewno chcesz usunąc oddział?", "Usunąć?", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No);

            if (res == MessageBoxResult.Yes)
            {
                var dep = new Department();
                dep.Address  = "";
                dep.BossName = "";
                dep.Name     = "";
                XMLActions.SaveDepartment(ConfigurationManager.AppSettings["department"], dep);
                DataDepatment.Text = dep.ToString();
            }
        }
Exemple #2
0
        private void Save_Click(object sender, RoutedEventArgs e)
        {
            var dep = new Department();

            dep.Name     = Name.Text;
            dep.BossName = BossName.Text;
            dep.Address  = Address.Text;

            XMLActions.SaveDepartment(ConfigurationManager.AppSettings["department"], dep);

            var main = new MainWindow();

            main.Show();
            Close();
        }