region << 版 本 注 释 >>
/*===================================================
- 类名称: PUR_Requisition_listFilter
- 类描述: 列表数据隔离--采购申请单只能看当前用户的单据信息 过滤,PrepareFilterParameter
- 创建人: luohong
- 创建时间: 2024/11/15 16:18:04
- 电子邮箱:[email protected]
- 修改人:
- 修改时间:
- 版本: @version 1.0
=====================================================*/
endregion << 版 本 注 释 >>
using Kingdee.BOS;
using Kingdee.BOS.App.Data;
using Kingdee.BOS.Core.Bill;
using Kingdee.BOS.Core.Bill.PlugIn;
using Kingdee.BOS.Core.DependencyRules;
using Kingdee.BOS.Core.DynamicForm;
using Kingdee.BOS.Core.DynamicForm.PlugIn;
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
using Kingdee.BOS.Core.DynamicForm.PlugIn.ControlModel;
using Kingdee.BOS.Core.List;
using Kingdee.BOS.Core.List.PlugIn;
using Kingdee.BOS.Core.List.PlugIn.Args;
using Kingdee.BOS.Core.Metadata;
using Kingdee.BOS.Core.Metadata.ConvertElement;
using Kingdee.BOS.Core.Metadata.FieldElement;
using Kingdee.BOS.JSON;
using Kingdee.BOS.Orm;
using Kingdee.BOS.Orm.DataEntity;
using Kingdee.BOS.ServiceHelper;
using Kingdee.BOS.Util;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
namespace Lyh.Kingdee.Demo.Develop.Plugin.CGGL
{
///
/// Description: 列表数据隔离--采购申请单只能看当前用户的单据信息--过滤,PrepareFilterParameter
/// 1.在BOS中设置单据发布中,设置“自定义参数”---参数名:listfilter 参数值 : my
///
[Description("241115列表数据隔离--采购申请单只能看当前用户的单据信息--过滤,PrepareFilterParameter"), HotUpdate]
public class PUR_Requisition_listFilter:AbstractListPlugIn
{
//列表数据过滤 过滤,PrepareFilterParameter
public override void PrepareFilterParameter(FilterArgs e)
{
base.PrepareFilterParameter(e);
string filter = "";
/// 1.在BOS中设置单据发布中,设置“自定义参数”---参数名:listfilter 参数值 : my
//2.加载时,获取发布主控台设置的参数
string listtype = this.View.OpenParameter.GetCustomParameter("listfilter").ToString();
if (listtype.Equals("my", StringComparison.OrdinalIgnoreCase))
{
//3.获取指定条件的数值
string FCREATORID = this.Context.UserId.ToString();
filter = string.Format(" FCREATORID='{0}'", FCREATORID);
}
//原过滤条件非空时,则一起合并过滤条件
if (!string.IsNullOrWhiteSpace(e.FilterString) && !string.IsNullOrWhiteSpace(filter))
{
e.FilterString = e.FilterString +" and " +filter;
}
else
{
e.FilterString = filter;
}
}
}
}
标签:Core,2024.11,15,--,BOS,Kingdee,PrepareFilterParameter,using,申请单 From: https://www.cnblogs.com/lyh1719/p/18548294