private void btnProfile_Click(object sender, EventArgs e) { frmStudentProfile temp = new frmStudentProfile(); temp.Show(); this.Close(); }
private void btLogin_Click(object sender, EventArgs e) { bool isValid = false; bool isValidS = false; server.Service1 ser = new server.Service1(); if (txtRollNo.Text == "" || txtPassword.Text == "") { MessageBox.Show("Incorrect username or password!"); } else { ser.sValidStudent(txtRollNo.Text, txtPassword.Text, out isValid, out isValidS); if (!isValid) { MessageBox.Show("Incorrect username or password!"); } else { frmStudentProfile temp = new frmStudentProfile(); temp.Show(); this.Close(); } } }