public override void ShowUpdateForm(long id) { DataRow row = gridViewMaster.GetDataRow(gridViewMaster.FocusedRowHandle); if (row == null) return; if (DienDanPermission.I._checkPermissionRes(HelpNumber.ParseInt64(row["ID_CHUYEN_MUC"]), PermissionOfResource.RES_PERMISSION_TYPE.UPDATE) == false) { HelpMsgBox.ShowNotificationMessage("Bạn không có quyền sửa bài viết thuộc chuyên mục \"" + row["C_MUC"] + "\" của nhóm diễn đàn \"" + row["DIEN_DAN"] + "\""); return; } frmBaiVietEtx frm = new frmBaiVietEtx(id); HelpProtocolForm.ShowModalDialog(this, frm); }
private void btnUpdate_Click(object sender, EventArgs e) { if (this.doBaiViet.ID_BAI_VIET_PARENT <= 0 && DienDanPermission.I._checkPermissionRes(doBaiViet.ID_CHUYEN_MUC, PermissionOfResource.RES_PERMISSION_TYPE.UPDATE) == false) { HelpMsgBox.ShowNotificationMessage("Bạn không có quyền sửa bài viết này!"); return; } if (this.doBaiViet.ID_BAI_VIET_PARENT<=0 && DABaiViet.Instance.Da_tra_loi(this.doBaiViet.ID)==false) { frmBaiVietEtx frm = new frmBaiVietEtx(doBaiViet,false); frm.AfterUpdateSuccesfully += new frmBaiVietEtx._AfterUpdateSuccesfully(frm_AfterUpdateSuccesfully); frm.AfterDeleteSuccesfully += new frmBaiVietEtx._AfterDeleteSuccesfully(frm_AfterDeleteSuccesfully); ProtocolForm.ShowModalDialog((XtraFormPL)parentForm, frm); } else { frmReplyForum frm = new frmReplyForum(doBaiViet, false); frm.AfterUpdateSuccesfully += new frmReplyForum._AfterUpdateSuccesfully(frm_AfterUpdateSuccesfully); frm.AfterDeleteSuccesfully += new frmReplyForum._AfterDeleteSuccesfully(frm_AfterDeleteSuccesfully); ProtocolForm.ShowModalDialog((XtraFormPL)this.parentForm, frm); } if (AfterUpdateSuccessfully != null) AfterUpdateSuccessfully(this); }
public override long[] ShowAddForm() { frmBaiVietEtx frm= new frmBaiVietEtx(); HelpProtocolForm.ShowModalDialog(this, frm); return null; }