单据体双击行弹出窗体(调用系统权限)

public override void EntityRowDoubleClick(EntityRowClickEventArgs e)
{
base.EntityRowDoubleClick(e);
if (e.Key.ToUpper() == "F_DOCBASE_GLXXENTRY")//设备档案.关联信息
{
//EntryEntity entry = this.View.BillBusinessInfo.GetEntryEntity("F_DocBase_GLXXEntry");
//int i = this.View.Model.GetEntryCurrentRowIndex(entry.Key);
//DynamicObjectCollection sad = this.View.Model.GetEntityDataObject(entry);
string formID = this.Model.GetValue("F_FormID", e.Row) != null ? this.Model.GetValue("F_FormID", e.Row).ToString() : string.Empty;//单据标识 FormID
string formBillFId = this.Model.GetValue("F_BillID", e.Row) != null ? this.Model.GetValue("F_BillID", e.Row).ToString() : string.Empty;//单据内码 FID
bool isAuth = IsAuthority(this.Context, formID);
// 判断验权结果,只有验权通过,才继续
if (!isAuth)
{
// 验权失败,提示验权结果
this.View.ShowMessage("没有查看权限,请联系管理员。");
}
else
{
// 验权通过(双击行跳转页面)
string FID = formBillFId; //单据内码 FID
BillShowParameter showParam = new BillShowParameter();
showParam.FormId = formID;//"CRM_Contract";
showParam.Status = OperationStatus.VIEW;
showParam.PKey = FID;//listSelectedRow.PrimaryKeyValue
this.View.ShowForm(showParam);
}
}
}
#region 调用系统权限配置
public bool IsAuthority(Context ctx, string formId)
{
bool result = false;//返回结果,true=有权限
try
{
// 创建验权参数对象
BusinessObject businessObject = new BusinessObject();
// 单据FormId:必须的参数
businessObject.Id = formId;//this.View.BillBusinessInfo.GetForm().Id;
// 单据内码:只有在权限项绑定
单据体双击行弹出窗体(调用系统权限)
声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。如若本站内容侵犯了原著者的合法权益,可联系本站删除。



