本文整理汇总了C#中ObjectCriteria.Add方法的典型用法代码示例。如果您正苦于以下问题:C# ObjectCriteria.Add方法的具体用法?C# ObjectCriteria.Add怎么用?C# ObjectCriteria.Add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectCriteria
的用法示例。
在下文中一共展示了ObjectCriteria.Add方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Working
public override object Working()
{
IList productMasters = (IList)MainStockLogic.FetchAll(new LinqCriteria<MainStock>());
//IList productMasters = ProductMasterLogic.LoadAllProductMasterWithType("%%");
Flow.Session.Put(FlowConstants.PRODUCT_NAMES_LIST, productMasters);
ObjectCriteria<Department> objectCriteria = new ObjectCriteria<Department>();
objectCriteria.Add(x => x.DepartmentId > 0); // we don't get department 0 because department 0 is MAIN STOCK.
IList<Department> departments = DepartmentLogic.FindAll(objectCriteria);
Flow.Session.Put(FlowConstants.DEPARTMENTS, departments);
return null;
}
示例2: Working
public override object Working()
{
var stockOutCriteria = new ObjectCriteria<CoralPOS.Models.StockOut>();
stockOutCriteria.Add(x => x.ConfirmFlg == 1);
var confirmingStockOuts = (IList) StockOutLogic.FindAll(stockOutCriteria);
IList<CoralPOS.Models.StockOut> fetchedStockOuts = new List<CoralPOS.Models.StockOut>();
foreach (CoralPOS.Models.StockOut confirmingStockOut in confirmingStockOuts)
{
CoralPOS.Models.StockOut fetchedStockOut = StockOutLogic.Fetch(confirmingStockOut);
MainStockLogic.UpdateStockQuantity(fetchedStockOut.StockOutDetails);
fetchedStockOuts.Add(fetchedStockOut);
}
Flow.Session.Put(FlowConstants.CONFIRMING_STOCK_OUT_LIST,confirmingStockOuts);
return null;
}
示例3: Setup
public void Setup()
{
string productName = ProductName;
ObjectCriteria<Product> crit = new ObjectCriteria<Product>();
/*IList colors = ProductLogic.GetColorsWithProductName(productName);
IList sizes = ProductLogic.GetSizesWithProductName(productName);*/
crit.Add(p => p.ProductMaster.ProductName == productName);
IList<Product> products = ProductLogic.FindAll(crit);
IList<ExProductColor> extraColors = ProductColorLogic.FindAll(new ObjectCriteria<ExProductColor>());
IList<ExProductSize> extraSizes = ProductSizeLogic.FindAll(new ObjectCriteria<ExProductSize>());
IList colors = products.Select(s => s.ProductColor).Distinct().ToList();
IList sizes = products.Select(s => s.ProductSize).Distinct().ToList();
ProductColorList = colors;
ProductSizeList = sizes;
ExtraProductColorList = extraColors as IList;
ExtraProductSizeList = extraSizes as IList;
SelectedProductColors = new ArrayList();
SelectedProductSizes = new ArrayList();
ExtraSelectedProductColors = new ArrayList();
ExtraSelectedProductSizes = new ArrayList();
}
示例4: FindByProductId
public DepartmentStock FindByProductId(string key)
{
ObjectCriteria<DepartmentStock> objectCriteria = new ObjectCriteria<DepartmentStock>();
objectCriteria.Add(mstk => mstk.Product.ProductId == key);
return (DepartmentStock)DepartmentStockDao.FindFirst(objectCriteria);
}
示例5: OnActivate
protected override void OnActivate()
{
SelectedDepartment = new Department();
Departments = new ArrayList();
ObjectCriteria<Department> criteria = new ObjectCriteria<Department>();
criteria.Add(t => t.DepartmentId > 0);
IList<CoralPOS.Models.Department> departments = DepartmentLogic.FindAll(criteria);
Departments = ObjectConverter.ConvertFrom(departments);
}
示例6: OnInitialize
protected override void OnInitialize()
{
ObjectCriteria<Department> criteria = new ObjectCriteria<Department>();
criteria.Add(x => x.DepartmentId > 0);
IList<Department> list = DepartmentLogic.FindAll(criteria);
Departments = list;
}