示例#1
0
        private void chkAutoNumber_Click(object sender, EventArgs e)
        {
            oStudent = new DataAccess.Student();

            if (chkAutoNumber.Checked)
            {
                txtStudentID.Enabled = false;
                txtStudentID.Text    = oStudent.GetStudentAutoNo();
            }
            else
            {
                txtStudentID.Enabled = true;
                txtStudentID.Text    = "";
            }
        }
示例#2
0
 private void frmStudentEntry_Load(object sender, EventArgs e)
 {
     oStudent = new DataAccess.Student();
     LoadStudents();
     txtStudentID.Focus();
     if (TransactionType == eVariable.TransactionType.ADD)
     {
         txtStudentID.Enabled = false;
         txtStudentID.Text    = oStudent.GetStudentAutoNo();
     }
     else
     {
         txtStudentID.Enabled  = false;
         chkAutoNumber.Enabled = false;
     }
 }