private void taophieuchiToolStripMenuItem_Click(object sender, EventArgs e) { PhieuChi frm = new PhieuChi(); frm.THEM1 = true; frm.MAPC = demchi.ToString(); frm.ShowDialog(); Chi(); }
private void tsbthem_Click(object sender, EventArgs e) { PhieuChi frm = new PhieuChi(); frm.THEM1 = true; frm.MAPC = DEMPC2.ToString(); frm.ShowDialog(); LoadDataPC(); }
private void tsbsua_Click(object sender, EventArgs e) { PhieuChi frm = new PhieuChi(); frm.THEM1 = false; if (DEMPC1 == 0) { MessageBox.Show("Bạn chưa chọn phiếu chi để cập nhật thông tin mới", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { if (gridView2.GetRowCellValue(gridView2.FocusedRowHandle, "MAPC") != null) { frm.MAPC = gridView2.GetRowCellValue(gridView2.FocusedRowHandle, "MAPC").ToString(); } if (gridView2.GetRowCellValue(gridView2.FocusedRowHandle, "LYDOCHI") != null) { frm.LYDOCHI = gridView2.GetRowCellValue(gridView2.FocusedRowHandle, "LYDOCHI").ToString(); } if (gridView2.GetRowCellValue(gridView2.FocusedRowHandle, "NGUOINHAN") != null) { frm.NGUOINHAN = gridView2.GetRowCellValue(gridView2.FocusedRowHandle, "NGUOINHAN").ToString(); } if (gridView2.GetRowCellValue(gridView2.FocusedRowHandle, "SOTIEN") != null) { frm.SOTIEN1 = gridView2.GetRowCellValue(gridView2.FocusedRowHandle, "SOTIEN").ToString(); } if (gridView2.GetRowCellValue(gridView2.FocusedRowHandle, "GHICHU") != null) { frm.GHICHU1 = gridView2.GetRowCellValue(gridView2.FocusedRowHandle, "GHICHU").ToString(); } if (gridView2.GetRowCellValue(gridView2.FocusedRowHandle, "NGAYCHI") != null) { frm.NGAY1 = gridView2.GetRowCellValue(gridView2.FocusedRowHandle, "NGAYCHI").ToString(); } frm.ShowDialog(); } LoadDataPC(); }