private void button2_Click(object sender, EventArgs e)
        {
            try
            {
                if (textBox2.Text == "")
                {
                    MessageBox.Show("NIK Kosong!");
                    return;
                }


                OracleCommand cmd = new OracleCommand("SELECT NIK FROM WARGA WHERE NIK = :NIK", conn);
                cmd.Parameters.Add(":NIK", textBox2.Text);

                OracleDataAdapter da = new OracleDataAdapter(cmd);
                DataSet           ds = new DataSet();
                da.Fill(ds);
                int i = ds.Tables[0].Rows.Count;
                if (i == 1)
                {
                    FormTransaksi frm = new FormTransaksi(conn, textBox2.Text);
                    frm.ShowDialog();

                    ds.Clear();
                }
                else
                {
                    MessageBox.Show("NIK Tidak terdaftar!");
                }
            }
            catch (OracleException ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Beispiel #2
0
        private void transaksiPersewaanToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormTransaksi frmTransaksi = new FormTransaksi(Sewa, trans);

            frmTransaksi.ShowDialog();
            this.trans = frmTransaksi.Transaksi;
        }
Beispiel #3
0
        private void iNVENTARISOBATToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormTransaksi trx = new FormTransaksi();

            trx.ShowDialog();
        }