Exemple #1
0
        private void butSaveBrg_Click(object sender, EventArgs e)
        {
            Barang brg = new Barang();

            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.InsertBrg();
            MessageBox.Show("1 Record Succesfully Saved");
            kodeBrg.Clear();
            namaBrg.Clear();
            jlhAwalBrg.Clear();
            hrgHppBrg.Clear();
            hrgJualBrg.Clear();
        }