Ejemplo n.º 1
0
 private void dgwGrades_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex > -1)
     {
         try
         {
             if (!rdbMissing.Checked)
             {
                 int IdQuestion        = (int)dgwGrades.Rows[e.RowIndex].Cells[0].Value;
                 frmMicroAssessment fg = new frmMicroAssessment(IdQuestion);
                 fg.Show();
             }
             else
             {
                 int                IdStudent      = (int)dgwGrades.Rows[e.RowIndex].Cells[0].Value;
                 Student            currentStudent = Commons.bl.GetStudent(IdStudent);
                 frmMicroAssessment fg             = new frmMicroAssessment(null,
                                                                            currentClass, currentStudent,
                                                                            currentGradeType, currentSubject, null);
                 fg.Show();
             }
         }
         catch
         {
             MessageBox.Show("Selezionare un voto da visualizzare.");
         }
     }
 }
        private void btnDettagliVoto_Click(object sender, EventArgs e)
        {
            DataRow            riga            = ((DataTable)dgwGrades.DataSource).Rows[dgwGrades.CurrentRow.Index];
            int                idSelectedGrade = (int)riga["idGrade"];
            frmMicroAssessment f = new frmMicroAssessment(idSelectedGrade);

            f.ShowDialog();
        }
Ejemplo n.º 3
0
        public frmKnotsToTheComb(frmMicroAssessment GrandparentForm, int?IdStudent, SchoolSubject SchoolSubject, string Year)
        {
            InitializeComponent();
            currentStudent      = Commons.dl.GetStudent(IdStudent);
            lblStudent.Text     = currentStudent.LastName + " " + currentStudent.FirstName;
            currentIdSchoolYear = Year;
            currentSubject      = SchoolSubject;
            grandparentForm     = GrandparentForm;

            // fills the lookup tables' combos
            cmbSchoolSubject.DisplayMember = "Name";
            cmbSchoolSubject.ValueMember   = "idSchoolSubject";
            cmbSchoolSubject.DataSource    = Commons.dl.GetListSchoolSubjects(true);

            currentSubject = SchoolSubject;
            ChosenQuestion = null;
        }
        private void dgwGrades_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int IdQuestion;

            if (e.RowIndex > -1)
            {
                //DataRow row = ((DataTable)(dgwGrades.DataSource)).Rows[e.RowIndex];
                try
                {
                    IdQuestion = (int)dgwGrades.CurrentRow.Cells[0].Value;
                    frmMicroAssessment fg = new frmMicroAssessment(IdQuestion);
                    fg.Show();
                }
                catch
                {
                    MessageBox.Show("Selezionare un voto da visualizzare.");
                }
            }
        }