Пример #1
0
        private void butDelBrg_Click(object sender, EventArgs e)
        {
            Barang brg = new Barang();

            brg.setidBrg(int.Parse(idBrg.Text));
            brg.DeleteBrg();
            MessageBox.Show("1 Record Succesfully Deleted");
            idBrg.Clear();
        }
Пример #2
0
        private void butSave_Click(object sender, EventArgs e)
        {
            Barang brg = new Barang();

            brg.setidBrg(int.Parse(idBrg.Text));
            brg.setkodeBrg(kodeBrg.Text);
            brg.setnamaBrg(namaBrg.Text);
            brg.setjlhAwalBrg(int.Parse(jlhAwalBrg.Text));
            brg.sethrgHppBrg(decimal.Parse(hrgHppBrg.Text));
            brg.sethrgJualBrg(decimal.Parse(hrgJualBrg.Text));
            brg.setcreated_at(DateTime.Now);
            brg.setupdated_at(DateTime.Now);
            brg.UpdateBrg();
            MessageBox.Show("1 Record Succesfully Updated");
            idBrg.Clear();
            kodeBrg.Clear();
            namaBrg.Clear();
            jlhAwalBrg.Clear();
            hrgHppBrg.Clear();
            hrgJualBrg.Clear();
        }