private void registerToolStripMenuItem_Click(object sender, EventArgs e) { MenuUtama mu = new MenuUtama(); this.Hide(); mu.Show(); }
private void metroButton1_Click(object sender, EventArgs e) { String nick = metroTextBox2.Text; String password = metroTextBox1.Text; konek(); cmd = new MySqlCommand("select nickname,pass from user where nickname='" + metroTextBox2.Text + "'and pass='******'", koneksi); MySqlDataAdapter da = new MySqlDataAdapter(cmd); DataTable dt = new DataTable(); da.Fill(dt); if (dt.Rows.Count > 0) { MenuUtama fr = new MenuUtama(); this.Hide(); fr.Show(); } else { MessageBox.Show("Nickname ATAU PASSWORD SALAH"); } koneksi.Close(); diskonek(); }