private void Add_button_Click(object sender, EventArgs e)
        {
            ReloadReplacementsCarriers();
            //dataSet = BusinessLogic.ReadReplacementsCarriers();
            AddEditReplacementCarrierForm AddReplacementCarrier = new AddEditReplacementCarrierForm(dataSet.ReplacementsCarriers,
                                                                                                    dataSet.CarriersUses, dataSet.Carriers, dataSet.Instructors, null);

            AddReplacementCarrier.Text = "Добавление замены ТС инструктора";
            this.Enabled = false;
            AddReplacementCarrier.ShowDialog();
            if (AddReplacementCarrier.DialogResult == DialogResult.OK)
            {
                dataSet = BusinessLogic.WriteReplacementsCarriers(dataSet);
                ReloadReplacementsCarriers();
            }
            this.Enabled = true;
        }
        private void Edit_button_Click(object sender, EventArgs e)
        {
            LastSelectionIndex = ReplacementsCarriers_dataGridView.SelectedRows[0].Index;
            ReloadReplacementsCarriers();
            //dataSet = BusinessLogic.ReadReplacementsCarriers();
            AddEditReplacementCarrierForm EditReplacementCarrier = new AddEditReplacementCarrierForm(dataSet.ReplacementsCarriers,
                                                                                                     dataSet.CarriersUses, dataSet.Carriers, dataSet.Instructors,
                                                                                                     dataSet.ReplacementsCarriers.Rows.Find(ReplacementsCarriers_dataGridView.SelectedRows[0].Cells["ID"].Value));

            EditReplacementCarrier.Text = "Редактирование замены ТС инструктора";
            this.Enabled = false;
            EditReplacementCarrier.ShowDialog();
            if (EditReplacementCarrier.DialogResult == DialogResult.OK)
            {
                dataSet = BusinessLogic.WriteReplacementsCarriers(dataSet);
                ReloadReplacementsCarriers();
            }
            this.Enabled = true;
        }
        private void EditReplacement_button_Click(object sender, EventArgs e)
        {
            AutoschoolDataSet             dataSet = BusinessLogic.ReadReplacementsCarriers();
            AddEditReplacementCarrierForm EditReplacementCarrier = new AddEditReplacementCarrierForm(dataSet.ReplacementsCarriers,
                                                                                                     dataSet.CarriersUses, dataSet.Carriers, dataSet.Instructors,
                                                                                                     dataSet.ReplacementsCarriers.Rows.Find(CarriersToReplacement_dataGridView.SelectedRows[0].Cells["ReplacementIDColumn"].Value));

            EditReplacementCarrier.Text = "Редактирование замены ТС инструктора";
            EditReplacementCarrier.Instructor_comboBox.Enabled                  = false;
            EditReplacementCarrier.ReloadInstructors_button.Enabled             = false;
            EditReplacementCarrier.SearchReplaceableCarrier_button.Enabled      = false;
            EditReplacementCarrier.SearchReplaceableCarrier_textBox.Enabled     = false;
            EditReplacementCarrier.DirectionReplaceableCarrier_checkBox.Enabled = false;
            EditReplacementCarrier.ReloadReplaceableCarriers_button.Enabled     = false;
            EditReplacementCarrier.ReplaceableCarriers_dataGridView.Enabled     = false;
            this.Enabled = false;
            EditReplacementCarrier.ShowDialog();
            if (EditReplacementCarrier.DialogResult == DialogResult.OK)
            {
                dataSet = BusinessLogic.WriteReplacementsCarriers(dataSet);
                Get_button_Click(sender, e);
            }
            this.Enabled = true;
        }