示例#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();
        }
示例#2
0
        private void homebtn_Click(object sender, EventArgs e)
        {
            this.Hide();

            home home_form = new home();

            home_form.Show();
        }
示例#3
0
        public void logout()
        {
            isLogin = false;
            role    = null;

            home home_form;

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