Exemplo n.º 1
0
        private void btExcelGroupList_Click(object sender, EventArgs e)
        {
            switch (Registry_Class.DirPath == "Empry" || Registry_Class.OrganizationName == "Empty" ||
                    Registry_Class.DocBM == 0.0 || Registry_Class.DocTM == 0.0 ||
                    Registry_Class.DocRM == 0.0 || Registry_Class.DocLM == 0.0)
            {
            case (true):
                ApplicationConfigurationForm configurationForm = new ApplicationConfigurationForm();
                configurationForm.ShowDialog();
                break;

            case (false):
                btExcelGroupList.Enabled = false;
                DataBaseTables tables = new DataBaseTables();
                tables.qrDiscipline = "select [dbo].[Discipline].[Prefix]+' '+[dbo].[Discipline].[The_name_of_the_discipline] from [dbo].[Group] join [dbo].[Burden] on [dbo].[Burden].[Group_ID] = [dbo].[Group].[ID_Group] join [dbo].[Discipline] on [dbo].[Discipline].[ID_Discipline] = [dbo].[Burden].[Discipline_ID] where [dbo].[Group].[Group_name] = '" + cbGroup.Text + "'";
                tables.qrStudent    = "select [Surname_Student]+' '+SUBSTRING([Name_Student],1,1)+'. '+SUBSTRING([Middle_name_Student],1,1)+'.' from [dbo].[Student] where [dbo].[Student].[Group_ID] = " + cbGroup.SelectedValue.ToString();
                tables.dtDisciplineFill();
                tables.dtStudentFill();
                ExcelDocument document = new ExcelDocument();
                document.Group_name   = cbGroup.Text;
                document.dtDiscipline = tables.dtDiscipline;
                document.dtStudents   = tables.dtStudent;
                document.GroupDisciplineCreate();
                btExcelGroupList.Enabled = true;
                break;
            }
        }
Exemplo n.º 2
0
        private void btWordGroupQuality_Click(object sender, EventArgs e)
        {
            switch (Registry_Class.DirPath == "Empry" || Registry_Class.OrganizationName == "Empty" ||
                    Registry_Class.DocBM == 0.0 || Registry_Class.DocTM == 0.0 ||
                    Registry_Class.DocRM == 0.0 || Registry_Class.DocLM == 0.0)
            {
            case (true):
                ApplicationConfigurationForm configurationForm = new ApplicationConfigurationForm();
                configurationForm.ShowDialog();
                break;

            case (false):
                btWordGroupQuality.Enabled = false;
                WordDocument document = new WordDocument();
                document.AVG        = lbAvarageValue.Text;
                document.QC         = lbQualityValue.Text;
                document.PC         = lblPerfomanceValue.Text;
                document.Group_name = cbGroup.Text;
                document.quality_Group();
                btWordGroupQuality.Enabled = true;
                break;
            }
        }
Exemplo n.º 3
0
        private void btWordStudentList_Click(object sender, EventArgs e)
        {
            switch (Registry_Class.DirPath == "Empry" || Registry_Class.OrganizationName == "Empty" ||
                    Registry_Class.DocBM == 0.0 || Registry_Class.DocTM == 0.0 ||
                    Registry_Class.DocRM == 0.0 || Registry_Class.DocLM == 0.0)
            {
            case (true):
                ApplicationConfigurationForm configurationForm = new ApplicationConfigurationForm();
                configurationForm.ShowDialog();
                break;

            case (false):
                btWordStudentList.Enabled = false;
                DataBaseTables data = new DataBaseTables();
                data.qrStudent = "select ROW_NUMBER() over (order by [Surname_Student]  ASC) as \"№ПП\",[Surname_Student] +' '+ [Name_Student]+' '+[Middle_name_Student] as \"Фамилия Имя Отчество Студентов\" from [dbo].[Student] where [Group_ID] = " + cbGroup.SelectedValue.ToString();
                data.dtStudentFill();
                WordDocument document = new WordDocument();
                document.table      = data.dtStudent;
                document.Group_name = cbGroup.Text;
                document.student_list();
                btWordStudentList.Enabled = true;
                break;
            }
        }
Exemplo n.º 4
0
        private void системаToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            ApplicationConfigurationForm applicationConfigurationForm = new ApplicationConfigurationForm();

            applicationConfigurationForm.Show(this);
        }