private void LOGIN_Click(object sender, EventArgs e) { Int64 count; Int64 reg; // MessageBox.Show(TEACH.Text); // MessageBox.Show(STUD.Text); if (UNAME.Text != "" & PASS.Text != "" & PROF.Text == "STUDENT") { com.Connection = con; com.CommandText = "select RNO from sprofile where PASS= '******' "; reg = Convert.ToInt64(UNAME.Text); count = Convert.ToInt64(com.ExecuteScalar()); if (count == reg) { course f = new course(); f.Show(); Hide(); } else MessageBox.Show("wrong password or username"); } else if (UNAME.Text != "" & PASS.Text != "" & PROF.Text == "TEACHER") { com.Connection = con; com.CommandText = "select TID from tprofile where PASS= '******' "; count = Convert.ToInt32(com.ExecuteScalar()); reg = Convert.ToInt32(UNAME.Text); if (count == reg) { teacher_menu f = new teacher_menu(); f.Show(); Hide(); } else MessageBox.Show("wrong TEACHER ID OR PASSWORD"); } else MessageBox.Show("FILL ALL VALUES"); UNAME.Text = ""; PASS.Text = ""; PROF.Text = ""; }
private void button3_Click(object sender, EventArgs e) { course f = new course(); f.Show(); Hide(); }