销售订单保存时设置需求分类为销售订单号
BE插件
/// <summary>
/// 设置需求分类
/// </summary>
/// <param name="so"></param>
private void SetDemandType(SO so)
{
if (so.DemandType == DemandCodeEnum.Empty)
{
int EValue = EnumUtil.QueryOrAddExtEnumValue(DemandCodeEnum.EnumRes.Enum_FullName, so.DocNo, so.DescFlexField.PrivateDescSeg1);
using (ISession session = Session.Open())
{
so.DemandType = DemandCodeEnum.GetFromValue(EValue);
session.Modify(so);
session.Commit();
}
}
}
网友评论