本文整理汇总了C#中AppFrame.ObjectCriteria.AddGreaterOrEqualsCriteria方法的典型用法代码示例。如果您正苦于以下问题:C# ObjectCriteria.AddGreaterOrEqualsCriteria方法的具体用法?C# ObjectCriteria.AddGreaterOrEqualsCriteria怎么用?C# ObjectCriteria.AddGreaterOrEqualsCriteria使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppFrame.ObjectCriteria
的用法示例。
在下文中一共展示了ObjectCriteria.AddGreaterOrEqualsCriteria方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: departmentStockInSearchView_SearchMainStockInEvent
public void departmentStockInSearchView_SearchMainStockInEvent(object sender, MainStockInSearchEventArgs e)
{
var criteria = new ObjectCriteria();
criteria.AddGreaterOrEqualsCriteria("StockInDate", e.StockInDateFrom);
criteria.AddLesserOrEqualsCriteria("StockInDate", e.StockInDateTo);
criteria.AddLikeCriteria("StockInId", e.StockInId + "%");
criteria.AddEqCriteria("DelFlg", (long)0);
e.StockInList = StockInLogic.FindAll(criteria);
}
示例2: departmentStockInSearchView_SearchDepartmentStockInEvent
public void departmentStockInSearchView_SearchDepartmentStockInEvent(object sender, DepartmentStockInSearchEventArgs e)
{
var criteria = new ObjectCriteria();
criteria.AddEqCriteria("DepartmentStockInPK.DepartmentId", CurrentDepartment.Get().DepartmentId);
criteria.AddGreaterOrEqualsCriteria("StockInDate", e.StockInDateFrom);
criteria.AddLesserOrEqualsCriteria("StockInDate", e.StockInDateTo);
criteria.AddLikeCriteria("DepartmentStockInPK.StockInId", e.StockInId + "%");
criteria.AddEqCriteria("DelFlg", (long)0);
e.DepartmeneStockInList = DepartmentStockInLogic.FindAll(criteria);
EventUtility.fireEvent(CompletedSearchDepartmentStockInEvent,this,e);
}
示例3: departmentStockDetailView_SearchDepartmentStockInDetailEvent
public void departmentStockDetailView_SearchDepartmentStockInDetailEvent(object sender, DepartmentStockDetailEventArgs e)
{
long deptId = CurrentDepartment.Get().DepartmentId;
var objectCriteria = new ObjectCriteria(true);
objectCriteria.AddEqCriteria("s.DelFlg", CommonConstants.DEL_FLG_NO);
objectCriteria.AddEqCriteria("pm.ProductMasterId", e.ProductMasterId);
objectCriteria.AddEqCriteria("s.DepartmentStockInDetailPK.DepartmentId", deptId);
objectCriteria.AddGreaterOrEqualsCriteria("deptStockIn.StockInDate", e.StockInDateFrom);
objectCriteria.AddLesserOrEqualsCriteria("deptStockIn.StockInDate", e.StockInDateTo);
e.DepartmentStockInDetailList = DepartmentStockInDetailLogic.FindByQuery(objectCriteria);
e.ProductPrice = DepartmentPriceLogic.FindById(new DepartmentPricePK { ProductMasterId = e.ProductMasterId, DepartmentId = deptId });
}
示例4: goodsIOSearchView_SearchBlockInDetailEvent
public void goodsIOSearchView_SearchBlockInDetailEvent(object sender, GoodsIOSearchEventArgs e)
{
var criteria = new ObjectCriteria();
if (!string.IsNullOrEmpty(e.BlockDetailId))
{
criteria.AddLikeCriteria("BlockInDetailPK.BlockDetailId", string.Format("{0}%", e.BlockDetailId));
}
criteria.AddGreaterOrEqualsCriteria("ImportDate", DateUtility.ZeroTime(e.ImportDateFrom));
criteria.AddLesserOrEqualsCriteria("ImportDate", DateUtility.MaxTime(e.ImportDateTo));
if (!e.IsNeedDelete)
{
criteria.AddEqCriteria("DelFlg", (Int64)0);
}
e.BlockDetailList = BlockInDetailLogic.FindAll(criteria);
}
示例5: posLogView_SearchPosLogEvent
private void posLogView_SearchPosLogEvent(object sender, PosLogEventArgs e)
{
var criteria = new ObjectCriteria();
if(!string.IsNullOrEmpty(e.Username))
{
criteria.AddLikeCriteria("PosUser", e.Username + "%");
}
if(!string.IsNullOrEmpty(e.Action))
{
criteria.AddLikeCriteria("PosAction", e.Action + "%");
}
criteria.AddGreaterOrEqualsCriteria("Date", DateUtility.ZeroTime(e.LogDateFrom));
criteria.AddLesserOrEqualsCriteria("Date", DateUtility.MaxTime(e.LogDateTo));
criteria.AddOrder("Date", false);
IList list = PosLogLogic.FindAll(criteria);
e.PosLogList = list;
}
示例6: stockSearchView_BarcodeSearchStockEvent
private void stockSearchView_BarcodeSearchStockEvent(object sender, StockSearchEventArgs e)
{
var subCriteria = new SubObjectCriteria("ProductMaster");
subCriteria.AddLikeCriteria("ProductName", "%" + e.ProductMasterName + "%");
subCriteria.AddEqCriteria("ProductType", e.ProductType);
subCriteria.AddEqCriteria("ProductSize", e.ProductSize);
subCriteria.AddEqCriteria("ProductColor", e.ProductColor);
subCriteria.AddEqCriteria("Country", e.Country);
subCriteria.AddEqCriteria("Manufacturer", e.Manufacturer);
subCriteria.AddEqCriteria("Packager", e.Packager);
subCriteria.AddEqCriteria("Distributor", e.Distributor);
var criteria = new ObjectCriteria(true);
criteria.AddEqCriteria("DelFlg", CommonConstants.DEL_FLG_NO);
criteria.AddLikeCriteria("Product.ProductId", e.ProductMasterId + "%");
criteria.AddSubCriteria("ProductMaster", subCriteria);
criteria.AddGreaterOrEqualsCriteria("CreateDate", DateUtility.ZeroTime(e.FromDate));
criteria.AddLesserOrEqualsCriteria("CreateDate", DateUtility.MaxTime(e.ToDate));
IList list = StockLogic.FindAll(criteria);
e.StockList = list;
}
示例7: SearchGoodsAndReturnsInRange
private void SearchGoodsAndReturnsInRange(object sender, GoodsSaleListEventArgs args)
{
IList list = PurchaseOrderLogic.FindAll(args.PurchaseOrderSearchCriteria);
IList collection = new ArrayList();
foreach (PurchaseOrder order in list)
{
PurchaseOrderView view = new PurchaseOrderView();
view.PurchaseOrder = order;
view.PurchaseOrderId = order.PurchaseOrderPK.PurchaseOrderId;
long SellAmount = 0;
long SellQuantity = 0;
string SellDescription = "";
long RetAmount = 0;
long RetQuantity = 0;
string RetDescription = "";
foreach (PurchaseOrderDetail detail in order.PurchaseOrderDetails)
{
SellDescription += detail.Product.ProductMaster.ProductName + " ";
SellAmount += detail.Quantity*detail.Price;
SellQuantity += detail.Quantity;
}
ObjectCriteria criteria = new ObjectCriteria();
criteria.AddEqCriteria("NextPurchaseOrderId", order.PurchaseOrderPK.PurchaseOrderId);
criteria.AddEqCriteria("ReturnPoPK.DepartmentId", order.PurchaseOrderPK.DepartmentId);
IList returnPOList = ReturnPoLogic.FindAll(criteria);
foreach (ReturnPo returnPo in returnPOList)
{
RetDescription += returnPo.Product.ProductMaster.ProductName + " ";
long retPrice = returnPo.Price;
if (retPrice == 0)
{
DepartmentPricePK deptPricePK = new DepartmentPricePK();
deptPricePK.DepartmentId = 0;
deptPricePK.ProductMasterId = returnPo.Product.ProductMaster.ProductMasterId;
DepartmentPrice price = DepartmentPriceLogic.FindById(deptPricePK);
if (price != null)
{
retPrice = price.Price;
}
}
RetAmount += returnPo.Quantity * retPrice;
RetQuantity += returnPo.Quantity;
}
view.ReturnPOList = returnPOList;
view.SellDescription = SellDescription;
view.SellAmount = SellAmount;
view.SellQuantity = SellQuantity;
view.ReturnAmount = RetAmount;
view.ReturnDescription = RetDescription;
view.ReturnQuantity = RetQuantity;
view.IssueDate = order.CreateDate;
collection.Add(view);
}
ObjectCriteria NAcriteria = new ObjectCriteria();
NAcriteria.AddEqCriteria("ReturnPoPK.DepartmentId", CurrentDepartment.Get().DepartmentId);
NAcriteria.AddGreaterOrEqualsCriteria("ReturnPoPK.CreateDate", args.FromDate)
.AddLesserOrEqualsCriteria("ReturnPoPK.CreateDate", args.ToDate);
IList allReturnPOList = ReturnPoLogic.FindAll(NAcriteria);
IList legalReturnPOList = new ArrayList();
if(allReturnPOList!= null)
{
foreach (ReturnPo returnPo in allReturnPOList)
{
if(string.IsNullOrEmpty(returnPo.NextPurchaseOrderId))
legalReturnPOList.Add(returnPo);
}
}
string retNAPOId = "";
PurchaseOrderView retNAView = new PurchaseOrderView();
retNAView.ReturnPOList = new ArrayList();
IList retNAList = new ArrayList();
foreach (ReturnPo returnPo in legalReturnPOList)
{
if (!retNAPOId.Equals(returnPo.ReturnPoPK.PurchaseOrderId))
{
if(!string.IsNullOrEmpty(retNAPOId))
{
collection.Add(retNAView);
retNAView = new PurchaseOrderView();
retNAView.ReturnPOList = new ArrayList();
}
retNAPOId = returnPo.ReturnPoPK.PurchaseOrderId;
retNAView.PurchaseOrderId = retNAPOId;
retNAView.IssueDate = returnPo.ReturnPoPK.CreateDate;
}
retNAView.ReturnDescription += returnPo.Product.ProductMaster.ProductName + " ";
long retPrice = returnPo.Price;
if (retPrice == 0)
{
DepartmentPricePK deptPricePK = new DepartmentPricePK();
deptPricePK.DepartmentId = 0;
deptPricePK.ProductMasterId = returnPo.Product.ProductMaster.ProductMasterId;
DepartmentPrice price = DepartmentPriceLogic.FindById(deptPricePK);
//.........这里部分代码省略.........
示例8: _departmentStockInView_LoadDepartemntStockInForExportEvent
public void _departmentStockInView_LoadDepartemntStockInForExportEvent(object sender, DepartmentStockInEventArgs e)
{
DateTime lastSyncTime = e.LastSyncTime;
e.SyncFromMainToDepartment = new SyncFromMainToDepartment();
var stockTempCri = new ObjectCriteria();
stockTempCri.AddEqCriteria("Fixed", CommonConstants.DEL_FLG_YES);
stockTempCri.AddEqCriteria("DelFlg", CommonConstants.DEL_FLG_NO);
IList processedStockTemps = DepartmentStockTempLogic.FindAll(stockTempCri);
e.SyncFromMainToDepartment.DepartmentStockTemps = processedStockTemps;
var criteria = new ObjectCriteria();
criteria.AddEqCriteria("DelFlg", CommonConstants.DEL_FLG_NO);
criteria.AddEqCriteria("DepartmentId", e.Department.DepartmentId);
criteria.AddGreaterOrEqualsCriteria("CreateDate", lastSyncTime);
e.SyncFromMainToDepartment.StockOutList = StockOutLogic.FindAll(criteria);
e.SyncFromMainToDepartment.Department = e.Department;
criteria = new ObjectCriteria();
criteria.AddEqCriteria("DelFlg", CommonConstants.DEL_FLG_NO);
//criteria.AddEqCriteria("EmployeePK.DepartmentId", e.Department.DepartmentId);
e.SyncFromMainToDepartment.Department.Employees = EmployeeLogic.FindAll(criteria);
//foreach (DepartmentStockIn departmentStockIn in e.DepartmentStockInList)
if (e.SyncFromMainToDepartment.StockOutList == null || e.SyncFromMainToDepartment.StockOutList.Count == 0)
{
return; // don't need to get detail
}
foreach (StockOut departmentStockIn in e.SyncFromMainToDepartment.StockOutList)
{
foreach (StockOutDetail detail in departmentStockIn.StockOutDetails)
{
DepartmentPrice price =
DepartmentPriceLogic.FindById(new DepartmentPricePK
{
DepartmentId = 0,
ProductMasterId =
detail.Product.ProductMaster.ProductMasterId
});
if (price != null)
{
detail.Price = price.Price;
}
}
}
}
示例9: departmentStockInExtraView_LoadMasterDataForExportEvent
void departmentStockInExtraView_LoadMasterDataForExportEvent(object sender, DepartmentStockInEventArgs e)
{
e.SyncFromMainToDepartment = new SyncFromMainToDepartment();
if (e.SyncProductMasters)
{
ObjectCriteria prdCrit = new ObjectCriteria();
prdCrit.AddGreaterOrEqualsCriteria("UpdateDate", e.LastSyncTime);
IList masterProductList1 = ProductLogic.FindAll(prdCrit);
SubObjectCriteria subCrit = new SubObjectCriteria("ProductMaster");
subCrit.AddGreaterOrEqualsCriteria("UpdateDate", e.LastSyncTime);
prdCrit = new ObjectCriteria();
prdCrit.AddSubCriteria("ProductMaster", subCrit);
IList masterProductList2 = ProductLogic.FindAll(prdCrit);
IList masterProductList = new ArrayList();
if (masterProductList1 != null)
{
foreach (Product product in masterProductList1)
{
masterProductList.Add(product);
}
}
if (masterProductList2 != null)
{
foreach (Product product in masterProductList2)
{
if (!ExistInList(masterProductList, product))
{
masterProductList.Add(product);
}
}
}
e.SyncFromMainToDepartment.ProductMasterList = masterProductList;
e.HasMasterDataToSync = true;
}
if (e.SyncPrice)
{
ObjectCriteria deptPriceCrit = new ObjectCriteria();
deptPriceCrit.AddGreaterOrEqualsCriteria("UpdateDate", e.LastSyncTime);
IList masterDeptPriceList = DepartmentPriceLogic.FindAll(deptPriceCrit);
e.SyncFromMainToDepartment.DepartmentPriceMasterList = masterDeptPriceList;
e.HasMasterDataToSync = true;
}
if (e.SyncDepartments)
{
e.SyncFromMainToDepartment.DepartmentList = DepartmentLogic.FindAll(null);
e.SyncFromMainToDepartment.EmployeeList = EmployeeLogic.FindAll(null);
e.HasMasterDataToSync = true;
}
}