private void CmdNext_Click(object sender, EventArgs e) { if ((txtUserName.Text != "") && (txtPassword.Text != "")) { if (isValidateUser(txtUserName.Text, txtPassword.Text, userType)) { MessageBox.Show("Username and password validated successfully!!!", "Career Guidance App", MessageBoxButtons.OK, MessageBoxIcon.Information); if (userType != "Administrator") { SaveLogDetails(txtUserName.Text, userType); this.Hide(); FrmStudentDetails frmStudentDetails = new FrmStudentDetails(txtUserName.Text, userType); frmStudentDetails.Show(); } else { this.Hide(); MDICareer f1 = new MDICareer(txtUserName.Text, userType); f1.Show(); } } else { MessageBox.Show("Username or password validation failed, please type correct username or password", "Career Guidance App", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { MessageBox.Show("User name or password cannot be emptied, please type username or password", "Career Guidance App", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void ShowNewForm(object sender, EventArgs e) { FrmStudentDetails childForm = new FrmStudentDetails(userName, userType); childForm.MdiParent = this; childForm.Show(); }
private void CmdNext_Click(object sender, EventArgs e) { if (radioButton1.Checked) { FrmStudentDetails frmStudentDetails = new FrmStudentDetails(userName, userType); frmStudentDetails.Show(); this.Hide(); } }