本文整理汇总了C#中XPCollection.Where方法的典型用法代码示例。如果您正苦于以下问题:C# XPCollection.Where方法的具体用法?C# XPCollection.Where怎么用?C# XPCollection.Where使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XPCollection
的用法示例。
在下文中一共展示了XPCollection.Where方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SynchronizeTypes
public void SynchronizeTypes(string connectionString) {
using (var session = new Session { ConnectionString = connectionString }) {
using (var types = new XPCollection<XPObjectType>(session)) {
IEnumerable<XPObjectType> xpObjectTypes = types.Where(objectType => ReflectionHelper.FindType(objectType.TypeName) != null).ToList();
var sqlMultiDataStoreProxy = new MultiDataStoreProxy(connectionString);
foreach (var connstring in GetConnectionStrings(sqlMultiDataStoreProxy.DataStoreManager, xpObjectTypes, connectionString)) {
if (connstring != connectionString) {
SynchronizeTypes(connstring, xpObjectTypes);
}
}
}
}
}
示例2: GetMembers
public IEnumerable<IExtendedMemberInfo> GetMembers(Session session, Type infoType) {
IEnumerable<IExtendedMemberInfo> extendedMemberInfos = new XPCollection(session, infoType).Cast<IExtendedMemberInfo>();
return extendedMemberInfos.Where(info => !MemberExists(info));
}
示例3: LoadOpenBalance
public static List<SubSalesOrderLine> LoadOpenBalance(UnitOfWork uow, SubItem SubItem)
{
XPCollection<SubSalesOrderLine> soLines = new XPCollection<SubSalesOrderLine>(uow);
var SoList = soLines.Where(So => So.Item.ItemNo == SubItem.ItemNo &&
So.OrderStatus == SalesOrderLine.SalesOrderStatus.Active)
.OrderBy(So => So.NeedDate);
return SoList.ToList();
}
示例4: GetAll
public List<Absence> GetAll(Int64 planningId, DateTime date)
{
try
{
List<Absence> result = new List<Absence>();
result = new XPCollection<Absence>(this.Session).Where(x => x.Planning == planningId).ToList();
result = result.Where(x => x.Date == date).ToList();
return result;
}
catch (Exception exception1)
{
Exception innerException = exception1;
throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
}
}
示例5: LoadOpenBalance
public static List<SubPurchOrderLine> LoadOpenBalance(UnitOfWork uow, SubItem SubItem,
SubPurchOrderLine.OrderType PoType)
{
XPCollection<SubPurchOrderLine> PoLines = new XPCollection<SubPurchOrderLine>(uow);
var PoList = PoLines.Where(Po => Po.SubItem.ItemNo == SubItem.ItemNo &&
Po.OrderStatus == PurchOrderStatus.Active &&
Po.PurchOrderLineType == PoType).OrderBy(Po => Po.NeedDate);
return PoList.ToList();
}