Ejemplo n.º 1
0
        private void buybtn_Click(object sender, EventArgs e)
        {
            check_connection();

            connection.Open();

            String query = "insert into transaksi(id_buku, qty, total_harga) values('" + this.book_id + "', '" + this.qty + "', '" + this.grand_total + "')";

            MySqlCommand command = new MySqlCommand(query, connection);

            if (command.ExecuteNonQuery() == 1)
            {
                MessageBox.Show("Tambah Data Berhasil");
                this.Hide();

                home home_form = new home();
                home_form.Show();
            }
            else
            {
                MessageBox.Show("Tambah Data Gagal");
                this.Hide();

                home home_form = new home();
                home_form.Show();
            }

            connection.Close();
        }
Ejemplo n.º 2
0
        private void homebtn_Click(object sender, EventArgs e)
        {
            this.Hide();

            home home_form = new home();

            home_form.Show();
        }
Ejemplo n.º 3
0
        public void logout()
        {
            isLogin = false;
            role    = null;

            home home_form;

            home_form = new home();
            home_form.Show();
        }