//string adminID; private void loginbtn_Click(object sender, EventArgs e) { string user = userName.Text; string pass = password.Text; string userdb, passworddb; ReturnData rc = new ReturnData(); userdb = rc.ScalarReturn("Select count(AdminID) from AdminStore where AdminName='" + user + "'"); if (userdb.Equals("0")) { MessageBox.Show("The User Name Is Invalid"); } else { passworddb = rc.ScalarReturn("select AdminPassword from Administrator where AdminName='" + user + "'"); if (passworddb.Equals(pass)) { //adminID = rc.ScalarReturn("Select AdminID from Administrator where UserName='******'"); InsertForm f2 = new InsertForm(); f2.Show(); this.Hide(); } else { MessageBox.Show("This user Password is invlaid"); } } HomePage hm = new HomePage(); hm.Show(); this.Hide(); }
private void pictureBox1_Click(object sender, EventArgs e) { InsertForm inf = new InsertForm(); inf.Show(); }