本文整理汇总了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;
}