Exemplo n.º 1
0
 private void buttonSaveGroup_Click(object sender, EventArgs e)
 {
     if (managerDataGroup.SaveDataGrid())
     {
         MessageBox.Show("Данные успешно сохранены", "Уведомление");
     }
 }
 private void buttonSave_Click(object sender, EventArgs e)
 {
     if (managerDataDiscipAssessment.SaveDataGrid())
     {
         MessageBox.Show("Данные успешно сохранены", "Успех");
     }
     Close();
 }
        private void buttonSaveDiscipChosenComp_Click(object sender, EventArgs e)
        {
            if (dataGridDisciplineChosenCompetence.Rows.Count == 0)
            {
                return;
            }
            double sum = 0;

            double[] weightValue = new double[dataGridDisciplineChosenCompetence.Rows.Count];
            int      i           = -1;

            foreach (DataGridViewRow row in dataGridDisciplineChosenCompetence.Rows)
            {
                weightValue[++i] = Convert.ToDouble(row.Cells["Weight"].Value);
                sum += weightValue[i];
            }
            if (sum == 0)
            {   // если сумма 0, значит нужно задать равные веса
                for (int k = 0; k < weightValue.Length; k++)
                {
                    weightValue[k] = 1.0 / weightValue.Length;
                }
            }
            else if (Math.Abs(sum - 1) > 0.001)
            {   // если сумма не равна 1, значит нужно нормировать
                for (int k = 0; k < weightValue.Length; k++)
                {
                    weightValue[k] = weightValue[k] / sum;
                }
            }
            // сохраняем данные
            for (int k = 0; k < dataGridDisciplineChosenCompetence.Rows.Count; k++)
            {
                dataGridDisciplineChosenCompetence.Rows[k].Cells["Weight"].Value = weightValue[k];
            }
            ManagerDataDisciplineChosenCompetence.SaveDataGrid();
        }
 private void buttonSave_Click(object sender, EventArgs e)
 {
     managerStudent.SaveDataGrid();
     Close();
 }
Exemplo n.º 5
0
 private void buttonSaveSpec2_Click_1(object sender, EventArgs e)
 {
     ManagerDataSpecialization.SaveDataGrid();
 }
Exemplo n.º 6
0
 private void buttonSave_Click(object sender, EventArgs e)
 {
     ManagerDataSpecialty.SaveDataGrid();
 }
 private void buttonSaveCompChosenDisp_Click(object sender, EventArgs e)
 {
     ManagerDataCompChosenDiscipline.SaveDataGrid();
 }
 private void buttonSaveComp_Click(object sender, EventArgs e)
 {
     ManagerDataCompetence.SaveDataGrid();
 }
 private void buttonSaveDis_Click(object sender, EventArgs e)
 {
     ManagerDataDiscipline.SaveDataGrid();
 }
Exemplo n.º 10
0
 private void buttonSaveStudent_Click(object sender, EventArgs e)
 {
     managerDataStudent.SaveDataGrid();
 }
 private void button1_Click(object sender, EventArgs e)
 {
     managerDiscipline.SaveDataGrid();
     Close();
 }