private void Button3_Click(object sender, EventArgs e) { this.Hide(); Menu_Glowne main = new Menu_Glowne(); main.Show(); }
private void BunifuThinButton21_Click(object sender, EventArgs e) { string query = "select count(*) from UserTb1 where Uimie='" + Uimie.Text + "' and Upass='******'"; Con.Open(); SqlDataAdapter sda = new SqlDataAdapter(query, Con); DataTable dt = new DataTable(); sda.Fill(dt); if (dt.Rows[0][0].ToString() == "1") { Menu_Glowne mainform = new Menu_Glowne(); mainform.Show(); this.Hide(); } else { MessageBox.Show("Zły login lub hasło!"); } Con.Close(); }