Ejemplo n.º 1
0
        private void btnChangePwd_Click(object sender, EventArgs e)
        {
            student = StudentDB.GetStudentInfo(student.UserId);
            if (student.Password == txtOldPwd.Text)
            {
                if (txtNewPwd.Text == txtNewConfirmPwd.Text)

                {
                    if (StudentDB.UpdatePassword(txtNewConfirmPwd.Text, student.UserId))
                    {
                        MessageBox.Show("Password has been successfully change");
                        txtOldPwd.Clear();
                        txtNewPwd.Clear();
                        txtNewConfirmPwd.Clear();
                        txtOldPwd.Focus();
                    }
                    else
                    {
                        MessageBox.Show("Fail");
                    }
                }
            }
            else
            {
            }
        }
Ejemplo n.º 2
0
        public frmViewProfile(int studentID)
        {
            InitializeComponent();
            student = StudentDB.GetStudentInfo(studentID);

            txtFName.Text      = student.firstName;
            txtLName.Text      = student.lastName;
            txtSkillLevel.Text = student.studentLevel.ToString();
            txtClassID.Text    = student.classID.ToString();
        }