当前位置: 首页>>代码示例>>C#>>正文


C# ObjectCriteria.Add方法代码示例

本文整理汇总了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;
 }
开发者ID:DelLitt,项目名称:opmscoral,代码行数:11,代码来源:StockOutPreLoadAction.cs

示例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;
        }
开发者ID:DelLitt,项目名称:opmscoral,代码行数:16,代码来源:StockOutConfirmPreLoadAction.cs

示例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();
 }
开发者ID:DelLitt,项目名称:opmscoral,代码行数:21,代码来源:ProductPropertiesViewModel.cs

示例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);
 }
开发者ID:DelLitt,项目名称:opmscoral,代码行数:6,代码来源:DepartmentStockLogic.cs

示例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);
 }
开发者ID:DelLitt,项目名称:opmscoral,代码行数:9,代码来源:CreateSyncUSBViewModel.cs

示例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;
 }
开发者ID:DelLitt,项目名称:opmscoral,代码行数:7,代码来源:SyncToDepartmentViewModel.cs


注:本文中的ObjectCriteria.Add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。