示例#1
0
        /// <summary>
        /// To take exam
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToTakeExam(object sender, EventArgs e)
        {
            int    currentId = (int)(sender as Control).Tag;
            ToExam toExam    = new ToExam((StudentPlat)this.ParentForm, currentId);

            this.ParentForm.Hide();
            toExam.Show();
        }
示例#2
0
 /// <summary>
 /// Student dataGridView cell content click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void StudentDataGridViewCellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 7)
     {
         if ((int)studentDataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value == 0)
         {
             int    currentId = (int)studentDataGridView.Rows[e.RowIndex].Cells[2].Value;
             ToExam toExam    = new ToExam((StudentPlat)this.ParentForm, currentId);
             this.ParentForm.Hide();
             toExam.Show();
         }
     }
 }