private void statisticFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseView view = new DataBaseView();
                    view.qrvDepartment_statistic_Groups +=
                        " where [Department_name] = '" + cbDepartment.Text + "'";
                    view.dtvDepartment_statistic_Groups();
                    foreach (DataRow r in view.vdtDepartment_statistic_Groups.Rows)
                    {
                        lbGroupValue.Text = r[1].ToString();
                    }
                    view.qrvDepartment_statistic_Students +=
                        " where [Department_name] = '" + cbDepartment.Text + "'";
                    view.dtvDepartment_statistic_Students();
                    view.dependency.OnChange += onChengeDepartment;
                    foreach (DataRow r in view.vdtDepartment_statistic_Students.Rows)
                    {
                        lbStudentValue.Text = r[1].ToString();
                    }
                }
                catch
                {
                }
            };

            Invoke(action);
        }
        private void qualityFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseView view = new DataBaseView();
                    view.qrvGroup_academic_performance +=
                        " where [Group_name] = '" + cbGroup.Text + "'";
                    view.dtvGroup_academic_performance();
                    view.dependency.OnChange += onChangeQuality;
                    foreach (DataRow r in view.vdtGroup_academic_performance.Rows)
                    {
                        lbAvarageValue.Text     = r[1].ToString();
                        lbQualityValue.Text     = r[2].ToString();
                        lblPerfomanceValue.Text = r[3].ToString();
                    }
                }
                catch
                {
                }
            };

            Invoke(action);
        }
        private void btStudentInsert_Click(object sender, EventArgs e)
        {
            switch (cbStudentLogin.Text == "" || tbStudentName.Text == "" ||
                    tbStudentSurname.Text == "" || tbStudentMiddleName.Text == "" ||
                    mtbTicketNumber.Text == "")
            {
            case (true):
                MessageBox.Show("Одно или несколько из полей не заполнены!");
                break;

            case (false):
                switch (btStudentInsert.Text)
                {
                case ("Добавить студента"):
                    DataBaseView view = new DataBaseView();
                    view.qrvProfiles_List += " where [Login_list] = '" + cbStudentLogin.Text + "' and [Status_list] = 'Студент'";
                    view.dtvProfiles_List();
                    try
                    {
                        procedure.spStudent_Insert(view.vdtProfiles_List.Rows[0][0].ToString(), tbStudentSurname.Text, tbStudentName.Text, tbStudentMiddleName.Text, mtbTicketNumber.Text, Convert.ToInt32(cbGroup.SelectedValue.ToString()));
                        cbStudentLogin.Items.Clear();
                        tbStudentMiddleName.Clear();
                        tbStudentName.Clear();
                        tbStudentSurname.Clear();
                        mtbTicketNumber.Clear();
                    }
                    catch
                    {
                        switch (MessageBox.Show("Данного студента нет в системе учётных записей! \n Создать новую учётную запись?", "Создание учётной записи", MessageBoxButtons.YesNo, MessageBoxIcon.Warning))
                        {
                        case DialogResult.Yes:
                            DynamicObjects dynamic = new DynamicObjects();
                            dynamic.parentCreate = this;
                            Thread thread1 = new Thread(dynamic.NewStudentAccountCreate);
                            thread1.Start();
                            break;

                        case DialogResult.No:

                            break;
                        }
                    }
                    break;

                case ("Поменять учебную группу"):
                    DynamicObjects dynamicObjects = new DynamicObjects();
                    dynamicObjects.student = cbStudentLogin.Text;
                    dynamicObjects.parent  = this;
                    Thread thread = new Thread(dynamicObjects.ChangeFormCreate);
                    thread.Start();
                    break;
                }
                break;
            }
        }