Beispiel #1
0
        private void AddBut_Click(object sender, RoutedEventArgs e)
        {
            AddEditTeam form = new AddEditTeam();

            form.Owner = this;
            form.Show();
        }
Beispiel #2
0
        private void EditBut_Click(object sender, RoutedEventArgs e)
        {
            if (DataGrid1.SelectedIndex != -1)
            {
                int i = DataGrid1.SelectedIndex;

                AddEditTeam form = new AddEditTeam(((DataRowView)DataGrid1.Items[i]).Row[0].ToString(), ((DataRowView)DataGrid1.Items[i]).Row[1].ToString(), ((DataRowView)DataGrid1.Items[i]).Row[2].ToString(), ((DataRowView)DataGrid1.Items[i]).Row[4].ToString(), ((DataRowView)DataGrid1.Items[i]).Row[3].ToString());
                form.Owner = this;
                form.Show();
            }
            else
            {
                MessageBox.Show("Выберите команду для редактирования");
            }
        }