销售订单,选择客户时过滤掉不满足条件的客户怎么写?
比如:客户中有一时间字段,当该字段日期小于当前日期时,不能先择该客户,插件怎么写, 我在示例中找到一个类似的但不知道怎么改,在哪里写这个过滤这个日期的条件 大神求帮忙
下面是示例,应该怎么改呢
他这个是“选择组织时排除已选中的组织,选择用户时排除管理员用户"
[code]using Kingdee.BOS.Core;
using Kingdee.BOS.Core.DynamicForm.PlugIn.WizardForm;
using Kingdee.BOS.Orm.DataEntity;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using Kingdee.Core.DynamicForm.PlugIn.Args;
namespace Kingdee.BOS.Business.PlugIn.Implementation
{
[Description("ERP项目实施向导插件")]
public class BAS_ERPImplProjectEditPlugin : AbstractWizardFormPlugIn
{
public override void BeforeF7Select(BeforeF7SelectEventArgs e)
{
switch (e.FieldKey)
{
case "FOrgId":
//过滤掉已选中的组织
string strFilter = string.Empty;
List
DynamicObjectCollection orgObjs = this.Model.GetEntityDataObject(this.Model.BusinessInfo.GetEntity("FChooseOrgEntry")) as DynamicObjectCollection;
foreach (DynamicObject orgObj in orgObjs)
{
long orgId = Convert.ToInt64(orgObj["OrgId_Id"]);
if (orgId > 0) orgIds.Add(orgId);
}
if (orgIds.Count > 0)
strFilter = string.Format(" FORGID not in ({0}) ", string.Join(", ", orgIds));
e.ListFilterParameter.Filter = strFilter;
break;
case "FUserId":
//过滤出非管理员的用户
e.ListFilterParameter.Filter = " FUserID <> " + FormConst.AdministratorID;
break;
}
}
}
}
[/code]
推荐阅读