Esempio n. 1
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            FormPhieuChi_Them form = new FormPhieuChi_Them();

            DialogResult dr = form.ShowDialog();

            // txtNgayChi.Text = DateTime.Now.ToString("dd/MM/yyyy");
            dataGridView1.DataSource = phieuchi_bus.LayTatCa();
        }
Esempio n. 2
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            if (txtSoPhieuChi.Text.CompareTo("") == 0)
            {
                MessageBox.Show("Vui lòng chọn dòng dữ liệu muốn Xóa !");
            }
            else
            {
                PhieuChi_DTO phieuchi = new PhieuChi_DTO();
                phieuchi.SoPhieuChi = Int16.Parse(txtSoPhieuChi.Text);
                phieuchi.NoiDung    = txtNoiDung.Text;
                phieuchi.NgayChi    = txtNgayChi.Text;
                phieuchi.SoTienChi  = Decimal.Parse(txtSoTienChi.Text);

                FormPhieuChi_Them form = new FormPhieuChi_Them(phieuchi);
                DialogResult      dr   = form.ShowDialog();
                dataGridView1.DataSource = phieuchi_bus.LayTatCa();
                txtNgayChi.Text          = "";
                txtNoiDung.Text          = "";
                txtSoPhieuChi.Text       = "";
                txtSoTienChi.Text        = "";
            }
        }