private void LoadAssessmentDiscipline(int semester)
        {
            string sqlQuery = "SELECT b.ID, b.NameDiscipline, a.ID_student, a.ID_discipline, a.Assessment, a.Semester " +
                              "FROM Assessment_Discipline a, WorkProgramm b WHERE a.Semester = @sem AND a.ID_student = @id_stud AND a.ID_discipline = b.ID";
            SQLiteCommand command = new SQLiteCommand(sqlQuery);

            command.Parameters.AddWithValue("@sem", Convert.ToInt64(semester));
            command.Parameters.AddWithValue("@id_stud", id_student);
            managerDataDiscipAssessment.LoadData(command);
            SQLiteCommand commandUpdate = new SQLiteCommand("UPDATE Assessment_Discipline SET Assessment = @ass WHERE ID_student = @id_stud AND ID_discipline = @id_disp AND semester = @sem");

            commandUpdate.Parameters.AddWithValue("@id_stud", id_student);
            commandUpdate.Parameters.Add(new SQLiteParameter("@id_disp", DbType.Int64, "ID_discipline"));
            commandUpdate.Parameters["@id_disp"].SourceVersion = DataRowVersion.Original;
            commandUpdate.Parameters.Add(new SQLiteParameter("@ass", DbType.Int64, "Assessment"));
            commandUpdate.Parameters.AddWithValue("@sem", Convert.ToInt64(semester));
            SQLiteCommand commandDelete = new SQLiteCommand(" ");

            managerDataDiscipAssessment.InitialCommandUpdate(commandUpdate);
            managerDataDiscipAssessment.InitialCommandDelete(commandDelete);
            dataGridViewDiscip.Columns["ID"].Visible                = false;
            dataGridViewDiscip.Columns["ID_student"].Visible        = false;
            dataGridViewDiscip.Columns["ID_discipline"].Visible     = false;
            dataGridViewDiscip.Columns["Semester"].Visible          = false;
            dataGridViewDiscip.Columns["NameDiscipline"].HeaderText = "Название дисциплины";
            dataGridViewDiscip.Columns["NameDiscipline"].Width      = 300;
            dataGridViewDiscip.Columns["NameDiscipline"].ReadOnly   = true;
            dataGridViewDiscip.Columns["Assessment"].HeaderText     = "Оценка";
            dataGridViewDiscip.Columns["Assessment"].Width          = 100;
        }
        private void LoadCompetenceChosenDiscipline(DataGridViewRow row)
        {
            ManagerDataCompChosenDiscipline.Close();
            long id_spec = Convert.ToInt64(row.Cells["id_specialization"].Value);
            long id_disp = Convert.ToInt64(row.Cells["ID"].Value);

            LoadCompetenceChosenDiscipline(id_spec, id_disp);
            SQLiteCommand   commandUpdate = new SQLiteCommand(" ");
            SQLiteCommand   commandDelete = new SQLiteCommand("DELETE FROM COMPETENCE_DISCIPLINE WHERE ID_competence = @id_comp AND ID_discipline = @id_disp");
            SQLiteParameter parameter1    = new SQLiteParameter("@id_comp", DbType.Int64, "ID");

            parameter1.SourceVersion = DataRowVersion.Original;
            SQLiteParameter parameter2 = new SQLiteParameter("@id_disp", id_disp);

            commandDelete.Parameters.Add(parameter1);
            commandDelete.Parameters.Add(parameter2);
            ManagerDataCompChosenDiscipline.InitialCommandDelete(commandDelete);
            ManagerDataCompChosenDiscipline.InitialCommandUpdate(commandUpdate);
        }
        // загружает список дисциплин, которые формируют выбранную компетенцию
        private void LoadDisciplineChosenCompetence(long id_specialization)
        {
            ManagerDataDisciplineChosenCompetence.Close();
            long id_competence = Convert.ToInt64(dataGridDisciplineChosenCompetence.Tag);

            LoadDisciplineChosenCompetence(id_competence, id_specialization);
            SQLiteCommand   commandUpdate = new SQLiteCommand("UPDATE Competence_Discipline SET Weight = @param WHERE ID_discipline = @id_disp AND ID_competence = @id_comp");
            SQLiteCommand   commandDelete = new SQLiteCommand(" ");
            SQLiteParameter parameter1    = new SQLiteParameter("@param", DbType.Double, "Weight");
            SQLiteParameter parameter2    = new SQLiteParameter("@id_disp", DbType.Int64, "ID_discipline");

            parameter2.SourceVersion = DataRowVersion.Original;
            SQLiteParameter parameter3 = new SQLiteParameter("@id_comp", id_competence);

            commandUpdate.Parameters.Add(parameter1);
            commandUpdate.Parameters.Add(parameter2);
            commandUpdate.Parameters.Add(parameter3);
            ManagerDataDisciplineChosenCompetence.InitialCommandDelete(commandDelete);
            ManagerDataDisciplineChosenCompetence.InitialCommandUpdate(commandUpdate);
        }