private void bt1_Click(object sender, EventArgs e) { if (Username.Text == "Username" || Nama.Text == "Nama" || Password.Text == "Password" || Email.Text == "NomorHP") { MessageBox.Show("PLEASE FILL THE BLANK"); } else { if (Retype.Text != Password.Text) { label2.Visible = true; } else { label2.Visible = false; String sql = "insert into ADMIN (USERNAME_ADMIN,PASSWORD_ADMIN,NAMA_ADMIN,EMAIL_ADMIN) values ('" + Username.Text + "','" + Password.Text + "','" + Nama.Text + "','" + Email.Text + "');"; MySqlCommand cmd = new MySqlCommand(sql, conn); int affected = cmd.ExecuteNonQuery(); if (affected >= 1) { ((Form)this.TopLevelControl).Hide(); MessageBox.Show("Mashok"); adminParent ap = new adminParent(); ap.Hide(); adminLogin f1 = new adminLogin(); f1.Show(); } } } }
private void button1_Click(object sender, EventArgs e) { adminLogin f1 = new adminLogin(); this.Hide(); f1.Show(); }