Пример #1
0
        private void Add_button_Click(object sender, EventArgs e)
        {
            ReloadGroups();
            AddEditGroupForm AddGroup = new AddEditGroupForm(dataSet.Groups, dataSet.Categories, dataSet.TheoryTeachers, null);

            AddGroup.Text = "Добавление группы";
            this.Enabled  = false;
            AddGroup.ShowDialog();
            if (AddGroup.DialogResult == DialogResult.OK)
            {
                dataSet = BusinessLogic.WriteGroups(dataSet);
                ReloadGroups();
            }
            this.Enabled = true;
        }
Пример #2
0
        private void Edit_button_Click(object sender, EventArgs e)
        {
            LastSelectionIndex = Groups_dataGridView.SelectedRows[0].Index;
            ReloadGroups();
            AddEditGroupForm EditGroup = new AddEditGroupForm(dataSet.Groups, dataSet.Categories, dataSet.TheoryTeachers, dataSet.Groups.Rows.Find(Groups_dataGridView.SelectedRows[0].Cells["ID"].Value));

            EditGroup.Text = "Редактирование группы";
            this.Enabled   = false;
            EditGroup.ShowDialog();
            if (EditGroup.DialogResult == DialogResult.OK)
            {
                dataSet = BusinessLogic.WriteGroups(dataSet);
                ReloadGroups();
            }
            this.Enabled = true;
        }