private void btnThemMoi_Click(object sender, EventArgs e) { frmPhieuKT_ThemMoi frm = new frmPhieuKT_ThemMoi(); frm.Closed += delegate { LoadData(); this.Refresh(); }; frm.ShowDialog(); }
private void btnSua_Click(object sender, EventArgs e) { string maPhieuKT = grvData.GetRowCellValue(grvData.FocusedRowHandle, "MaPhieuKT").ToString(); if (string.IsNullOrEmpty(maPhieuKT)) { MessageBox.Show(string.Format("Vui lòng chọn bản ghi cần sửa!"), CommonConstant.MESSAGE_WARNING, MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } frmPhieuKT_ThemMoi frm = new frmPhieuKT_ThemMoi(2, maPhieuKT); frm.Closed += delegate { LoadData(); this.Refresh(); }; frm.ShowDialog(); }