/*private void pictureBox_close_Click(object sender, EventArgs e) * { * this.Hide(); * LoginEmployee logout = new LoginEmployee(); * logout.Show(); * }*/ private void pictureBox_close_Click_1(object sender, EventArgs e) { this.Hide(); LoginEmployee logout = new LoginEmployee(); logout.Show(); }
//jika user admin private void pictureBox3_Click(object sender, EventArgs e) { this.Hide(); LoginEmployee login = new LoginEmployee(); login.Show(); }
private void btn_close_Click(object sender, EventArgs e) { this.Hide(); LoginEmployee logout = new LoginEmployee(); logout.Show(); }
//Registrasi private void btn_loginstudent_Click(object sender, EventArgs e) { { koneksi.Open(); SqlCommand cmd = koneksi.CreateCommand(); cmd.CommandType = CommandType.Text; cmd.CommandText = "insert into [Admin](Username, Nama, Password) values ('" + textBox2.Text + "','" + textBox1.Text + "','" + textBox3.Text + "')"; cmd.ExecuteNonQuery(); koneksi.Close(); //untuk membuat textbox kosong ketika input data textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; MessageBox.Show("Registrasi Successfully"); this.Hide(); LoginEmployee login = new LoginEmployee(); login.Show(); } }