private void OnAdd() { if (DaThuTien) { MsgBox.Show(Application.ProductName, "Phiếu thu này đã thanh toán tiền hết rồi.", IconType.Information); return; } dlgAddGhiNhanTraNo dlg = new dlgAddGhiNhanTraNo(PhieuThuGUID, LoaiPT); if (dlg.ShowDialog() == DialogResult.OK) { IsDataChange = true; DisplayAsThread(); } }
private void OnEdit() { if (dgTraNo.SelectedRows == null || dgTraNo.SelectedRows.Count <= 0) { MsgBox.Show(Application.ProductName, "Vui lòng chọn 1 ghi nhận trả nợ.", IconType.Information); return; } DataRow drData = (dgTraNo.SelectedRows[0].DataBoundItem as DataRowView).Row; dlgAddGhiNhanTraNo dlg = new dlgAddGhiNhanTraNo(drData, PhieuThuGUID, LoaiPT); if (dlg.ShowDialog(this) == DialogResult.OK) { IsDataChange = true; DaThuTien = dlg.IsDaTraDu; DisplayAsThread(); } }