Пример #1
0
 private void DgwStudents_RowEnter(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex > -1)
     {
         DataGridViewCell c = DgwStudents.Rows[e.RowIndex].Cells["IdStudent"];
         Student          s = db.GetStudent((int)c.Value);
         s.SchoolYear = CmbSchoolYear.Text;
         LoadPicture(s);
     }
 }
Пример #2
0
        public frmKnotsToTheComb(frmMicroAssessment GrandparentForm, int?IdStudent, SchoolSubject SchoolSubject, string Year)
        {
            InitializeComponent();

            currentStudent      = db.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    = db.GetListSchoolSubjects(true);

            currentSubject = SchoolSubject;
            ChosenQuestion = null;
        }