예제 #1
0
        private void Add_button_Click(object sender, EventArgs e)
        {
            dataSet = BusinessLogic.ReadAuditoriums();
            AddEditAuditoriumsForm AddAuditorium = new AddEditAuditoriumsForm(dataSet.Auditoriums, null);

            AddAuditorium.Text = "Добавление аудитории";
            this.Enabled       = false;
            AddAuditorium.ShowDialog();
            if (AddAuditorium.DialogResult == DialogResult.OK)
            {
                dataSet = BusinessLogic.WriteAuditoriums(dataSet);
                ReloadAuditoriums();
            }
            this.Enabled = true;
        }
예제 #2
0
        private void Edit_button_Click(object sender, EventArgs e)
        {
            dataSet            = BusinessLogic.ReadAuditoriums();
            LastSelectionIndex = Auditoriums_dataGridView.SelectedRows[0].Index;
            AddEditAuditoriumsForm EditAuditorium = new AddEditAuditoriumsForm(dataSet.Auditoriums, dataSet.Auditoriums.Rows.Find(Auditoriums_dataGridView.SelectedRows[0].Cells["ID"].Value));

            EditAuditorium.Text = "Редактирование аудитории";
            this.Enabled        = false;
            EditAuditorium.ShowDialog();
            if (EditAuditorium.DialogResult == DialogResult.OK)
            {
                dataSet = BusinessLogic.WriteAuditoriums(dataSet);
                ReloadAuditoriums();
            }
            this.Enabled = true;
        }