private void button3_Click(object sender, EventArgs e) { Main_Form M = new Main_Form(); M.Show(); this.Hide(); }
private void button2_Click(object sender, EventArgs e) { Main_Form mf = new Main_Form(); mf.Show(); this.Hide(); }
private void btnCancel_Click(object sender, EventArgs e) { con.Open(); cmd = new SqlCommand("SELECT * FROM UserTable WHERE UserName= '******' and Password = '******'", con); da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds); int i = ds.Tables[0].Rows.Count; if (i == 1) { Main_Form fT = new Main_Form(); fT.Show(); this.Hide(); } else { MessageBox.Show("Not a Registered ADMIN, OR Invalid Username or Password"); } con.Close(); }