Example #1
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            FormPhieuGiaCong_AddUpd form = new FormPhieuGiaCong_AddUpd();
            DialogResult            dr   = form.ShowDialog();

            dataGridView.DataSource = phieugc_bus.LayTatCa();
        }
Example #2
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            if (txtSoPhieugc.Text.CompareTo("") == 0)
            {
                MessageBox.Show("Vui lòng chọn dòng dữ liệu muốn Sửa !");
            }
            else
            {
                PhieuGiaCong_DTO phieugc = new PhieuGiaCong_DTO();
                phieugc.SoPhieuGiaCong = Int16.Parse(txtSoPhieugc.Text);
                phieugc.NgayLap        = txtNgayLap.Text;
                phieugc.TongTien       = Decimal.Parse(txtTongTien.Text);

                FormPhieuGiaCong_AddUpd form = new FormPhieuGiaCong_AddUpd(phieugc);
                DialogResult            dr   = form.ShowDialog();
                dataGridView.DataSource = phieugc_bus.LayTatCa();
            }
        }