Пример #1
0
 private void byKodeBarangToolStripMenuItem_Click(object sender, EventArgs e)
 {
     foreach (ListViewItem lvi in listGudang.SelectedItems)
     {
         Koneksi.ExecuteCommand("Delete From tb_gudang Where id_gudang = '" + idGudang[Convert.ToInt32(lvi.SubItems[0].Text) - 1].ToString() + "'");
     }
     ShowData();
 }
Пример #2
0
 private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
 {
     foreach (ListViewItem lvi in listBarang.SelectedItems)
     {
         Koneksi.ExecuteCommand("Delete From tb_barang Where kode_barang = '" + lvi.SubItems[1].Text + "'");
     }
     ShowData();
 }
Пример #3
0
        private void materialRaisedButton1_Click(object sender, EventArgs e)
        {
            int total = Convert.ToInt32(numUangMasuk.Text) - Convert.ToInt32(numUangKeluar.Text);

            MessageBox.Show(total.ToString());
            if (KeuanganForm.isEdit)
            {
                Koneksi.ExecuteCommand("UPDATE `db_retail`.`tb_keuangan` SET `kode_rekening` = '" + tb_Rekening.Text + "', `uang_masuk` = '" + numUangMasuk.Text + "', `uang_keluar` = '" + numUangKeluar.Text + "', `total` = '" + total.ToString() + "' WHERE `tb_keuangan`.`id_keuangan` = '" + KeuanganForm.dataPass[3] + "';");
            }
            else
            {
                Koneksi.ExecuteCommand("INSERT INTO `db_retail`.`tb_keuangan` (`id_keuangan`, `tanggal`, `kode_rekening`, `uang_masuk`, `uang_keluar`, `total`) VALUES (NULL, '" + DateTime.Now.ToString("yyyy-MM-dd") + "', '" + tb_Rekening.Text + "', '" + numUangMasuk.Text + "', '" + numUangKeluar.Text + "', '" + total + "');");
            }
            this.Close();
        }
Пример #4
0
 private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (listKeuangan.SelectedItems.Count == 0)
     {
         MessageBox.Show("Harap Pilih 1", "Warning !", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else
     {
         foreach (ListViewItem lvi in listKeuangan.SelectedItems)
         {
             Koneksi.ExecuteCommand("Delete From tb_keuangan where id_keuangan = " + id_keuangan[Convert.ToInt32(lvi.SubItems[0].Text) - 1].ToString());
         }
         PopulateData();
     }
 }
Пример #5
0
 void UpdateData()
 {
     Koneksi.ExecuteCommand("Update tb_barang SET kode_barang = '" + tbKodeBarang.Text + "', nama_barang = '" + tbNamaBarang.Text + "' Where kode_barang = '" + BarangForm.barang[0].ToString() + "'");
 }
Пример #6
0
 void InsertData()
 {
     Koneksi.ExecuteCommand("Insert INTO tb_barang(kode_barang, nama_barang) VALUES('" + tbKodeBarang.Text + "', '" + tbNamaBarang.Text + "');");
 }
 void InsertBarang()
 {
     Koneksi.ExecuteCommand("Insert INTO tb_gudang(id_gudang, tanggal, kode_barang, nama_barang, barang_masuk, harga_satuan, suplier, keterangan) VALUES (NULL, '" + DateTime.Now.ToString("yyyyMMddHHmmss") + "', '" + cmbKodeBarang.Text + "', '" + tbNamaBarang.Text + "', '" + numBarangMasuk.Value.ToString() + "','" + tbHargaSatuan.Text + "','" + cmbSupplier.Text + "', '" + tbKeterangan.Text + "');");
 }
 void UpdateBarang()
 {
     Koneksi.ExecuteCommand("Update tb_gudang SET kode_barang = '" + cmbKodeBarang.Text + "', nama_barang = '" + tbNamaBarang.Text + "', barang_masuk = '" + numBarangMasuk.Value.ToString() + "', harga_satuan = '" + tbHargaSatuan.Text + "', suplier = '" + cmbSupplier.Text + "', keterangan = '" + tbKeterangan.Text + "' Where id_gudang = '" + GudangForm.strGudang[6] + "'");
 }