using BWP.B3ClientService;
|
|
using BWP.B3ClientService.BO;
|
|
using Forks.EnterpriseServices.DomainObjects2;
|
|
using Forks.EnterpriseServices.DomainObjects2.DQuery;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using TSingSoft.WebControls2;
|
|
using TSingSoft.WebPluginFramework;
|
|
|
|
namespace BWP.Web.Utils
|
|
{
|
|
public static class B3ClientServiceChoiceBoxDataProvider
|
|
{
|
|
public static void Register()
|
|
{
|
|
ChoiceBoxSettings.Register(B3ClientServiceConsts.DataSources.生产批次, argu =>
|
|
{
|
|
var dom = new DQueryDom(new JoinAlias(typeof(ProductBatch)));
|
|
dom.Columns.Add(DQSelectColumn.Field("Name"));
|
|
|
|
if (!string.IsNullOrWhiteSpace(argu.InputArgument))
|
|
{
|
|
dom.Where.Conditions.Add(DQCondition.Like("Name", argu.InputArgument));
|
|
}
|
|
dom.OrderBy.Expressions.Add(DQOrderByExpression.Create("Date", true));
|
|
return dom.EExecuteList<string>().Select(x => new TSingSoft.WebControls2.WordPair(x));
|
|
});
|
|
}
|
|
}
|
|
}
|