基础资料过滤条件插件
1人赞赏了该文章
3,205次浏览
编辑于2014年07月16日 10:41:41
销售订单上有“客户” 及“详细收货地址”两个基础资料
详细收货地址基础资料中有“对应客户字段”,先做插件,实现客户输入完,详细收获地址中只显示对应客户是本客户的地址,但是现在显示都为空白,我直接写编号就能出来
public class seorderF7shdz:AbstractDynamicFormPlugIn
{
public override void BeforeF7Select(BeforeF7SelectEventArgs e)
{
if (e.FieldKey == "Fdetailadress")
{
//取客户字段的值
DynamicObject custObj = this.Model.GetValue("FCustId") as DynamicObject;
if (custObj == null)
{
return;
}
string filter = string.Format(" FCUSTID = {0} ", custObj["msterId"].ToString());
//详细地址信息过滤条件加上去
if (string.IsNullOrEmpty(e.ListFilterParameter.Filter))
{
e.ListFilterParameter.Filter = filter;
}
else
{
filter = " And " + filter;
e.ListFilterParameter.Filter += filter;
}
}
}
}
详细收货地址基础资料中有“对应客户字段”,先做插件,实现客户输入完,详细收获地址中只显示对应客户是本客户的地址,但是现在显示都为空白,我直接写编号就能出来
public class seorderF7shdz:AbstractDynamicFormPlugIn
{
public override void BeforeF7Select(BeforeF7SelectEventArgs e)
{
if (e.FieldKey == "Fdetailadress")
{
//取客户字段的值
DynamicObject custObj = this.Model.GetValue("FCustId") as DynamicObject;
if (custObj == null)
{
return;
}
string filter = string.Format(" FCUSTID = {0} ", custObj["msterId"].ToString());
//详细地址信息过滤条件加上去
if (string.IsNullOrEmpty(e.ListFilterParameter.Filter))
{
e.ListFilterParameter.Filter = filter;
}
else
{
filter = " And " + filter;
e.ListFilterParameter.Filter += filter;
}
}
}
}
推荐阅读