Example #1
0
        private void tsbthem1_Click(object sender, EventArgs e)
        {
            PhieuThu1 frm = new PhieuThu1();

            frm.THEM = true;
            frm.MAPT = DEMPT2.ToString();
            frm.ShowDialog();
            LoadDataPT();
        }
Example #2
0
        private void taophieuthuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PhieuThu1 frm = new PhieuThu1();

            frm.THEM = true;
            frm.MAPT = Demthu.ToString();
            frm.ShowDialog();
            Thu();
        }
Example #3
0
        private void tsbsua1_Click(object sender, EventArgs e)
        {
            PhieuThu1 frm = new PhieuThu1();

            frm.THEM = false;
            if (DEMPT1 == 0)
            {
                MessageBox.Show("Bạn chưa chọn phiếu thu để cập nhật thông tin mới.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                if (gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "MAPT") != null)
                {
                    frm.MAPT = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "MAPT").ToString();
                }
                if (gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "LYDOTHU") != null)
                {
                    frm.LYDOTHU = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "LYDOTHU").ToString();
                }
                if (gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "NGUOINOPTIEN") != null)
                {
                    frm.NGUOINOPTIEN = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "NGUOINOPTIEN").ToString();
                }
                if (gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "SOTIEN") != null)
                {
                    frm.SOTIEN = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "SOTIEN").ToString();
                }
                if (gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "GHICHU") != null)
                {
                    frm.GHICHU = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "GHICHU").ToString();
                }
                if (gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "NGAYTHU") != null)
                {
                    frm.NGAY = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "NGAYTHU").ToString();
                }
                frm.ShowDialog();
            }
            LoadDataPT();
        }