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


C# ObjectCriteria.AddGreaterOrEqualsCriteria方法代码示例

本文整理汇总了C#中ObjectCriteria.AddGreaterOrEqualsCriteria方法的典型用法代码示例。如果您正苦于以下问题:C# ObjectCriteria.AddGreaterOrEqualsCriteria方法的具体用法?C# ObjectCriteria.AddGreaterOrEqualsCriteria怎么用?C# ObjectCriteria.AddGreaterOrEqualsCriteria使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ObjectCriteria的用法示例。


在下文中一共展示了ObjectCriteria.AddGreaterOrEqualsCriteria方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetSyncData

        public SyncFromDepartmentToMain GetSyncData(bool IsSubmitPeriod,DateTime lastSyncTime)
        {
            // Save the end of period
            // select 5 day nearest

            var sync = new SyncFromDepartmentToMain();

            // find unconfirm department stock
            ObjectCriteria deptTempCrit = new ObjectCriteria();
            //deptTempCrit.AddEqCriteria("DelFlg", CommonConstants.DEL_FLG_NO);

            IList deptTempList = DepartmentStockTempDAO.FindAll(null);
            sync.DepartmentStockTempList = deptTempList;

            // find timeline
            IList departmentTimelineList = DepartmentTimelineDAO.FindAll(null);

            // find po
            IList poList = PurchaseOrderDAO.FindAll(null);

            // find po detail
            foreach (PurchaseOrder po in poList)
            {
                var criteria = new ObjectCriteria();
                criteria.AddEqCriteria("PurchaseOrderDetailPK.PurchaseOrderId", po.PurchaseOrderPK.PurchaseOrderId);
                po.PurchaseOrderDetails = PurchaseOrderDetailDAO.FindAll(criteria);
            }

            // find stock history
            ObjectCriteria incrementalCrit = new ObjectCriteria();
            incrementalCrit.AddGreaterOrEqualsCriteria("CreateDate", lastSyncTime);
            IList stockHistoryList = DepartmentStockHistoryDAO.FindAll(incrementalCrit);

            // find dept stock out
            IList deptStockOutList = DepartmentStockOutDAO.FindAll(incrementalCrit);

            // find dept stock out detail
            foreach (DepartmentStockOut so in deptStockOutList)
            {
                var criteria = new ObjectCriteria();
                criteria.AddEqCriteria("DepartmentStockOut.DepartmentStockOutPK.StockOutId", so.DepartmentStockOutPK.StockOutId);
                so.DepartmentStockOutDetails = DepartmentStockOutDetailDAO.FindAll(criteria);
            }

            // find dept stock
            IList deptStock = DepartmentStockDAO.FindAll(null);

            // find return PO
            IList returnPoList = ReturnPoDAO.FindAll(null);

            // dept restock in
            /*var crit = new ObjectCriteria();
            crit.AddEqCriteria("StockInType", (long) 1);*/
            //IList deptReStockInList = DepartmentStockInDAO.FindAll(crit);
            IList deptStockInList = DepartmentStockInDAO.FindAll(incrementalCrit);
            foreach (DepartmentStockIn si in deptStockInList)
            {
                var criteria = new ObjectCriteria();
                criteria.AddEqCriteria("DepartmentStockIn.DepartmentStockInPK.StockInId", si.DepartmentStockInPK.StockInId);
                si.DepartmentStockInDetails = DepartmentStockInDetailDAO.FindAll(criteria);
            }

            sync.DepartmentStockOutList = deptStockOutList;
            sync.DepartmentStockHistoryList = stockHistoryList;
            sync.DepartmentStockList = deptStock;
            sync.PurchaseOrderList = poList;
            sync.ReturnPoList = returnPoList;
            sync.DepartmentStockInList = deptStockInList;
            sync.DepartmentTimelineList = departmentTimelineList;

            // get money info
            sync.EmployeeMoneyList = EmployeeMoneyDAO.FindAll(null);
            sync.DepartmentCostList = DepartmentCostDAO.FindAll(null);
            // end period confirmation
            //DepartmentTimeline timeline = new DepartmentTimeline();

            return sync;
        }
开发者ID:DelLitt,项目名称:opmscoral,代码行数:78,代码来源:DepartmentStockOutLogicImpl.cs


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