本文整理汇总了C#中AppFrame.ObjectCriteria类的典型用法代码示例。如果您正苦于以下问题:C# ObjectCriteria类的具体用法?C# ObjectCriteria怎么用?C# ObjectCriteria使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ObjectCriteria类属于AppFrame命名空间,在下文中一共展示了ObjectCriteria类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: stockInConfirmView_ConfirmStockInEvent
void stockInConfirmView_ConfirmStockInEvent(object sender, StockInConfirmEventArgs e)
{
try
{
ObjectCriteria objectCriteria = new ObjectCriteria();
objectCriteria.AddSearchInCriteria("StockInId", e.ConfirmStockInList);
objectCriteria.AddEqCriteria("DelFlg", CommonConstants.DEL_FLG_NO);
IList stockInList = StockInLogic.FindAll(objectCriteria);
if (stockInList != null && stockInList.Count > 0)
{
foreach (StockIn stockIn in stockInList)
{
if (stockIn.ConfirmFlg == 1)
{
stockIn.ConfirmFlg = 0;
StockInLogic.Update(stockIn);
}
}
}
else
{
throw new BusinessException("Khong co gi de luu");
}
}
catch (Exception exception)
{
e.EventResult = " Error !";
e.HasErrors = true;
}
}
开发者ID:DelLitt,项目名称:opmscoral,代码行数:31,代码来源:StockInConfirmController.cs
示例2: stockCreateView_SearchStockInDetailEvent
public void stockCreateView_SearchStockInDetailEvent(object sender, StockCreateEventArgs e)
{
// Search StockInDetail
var subCriteria = new SubObjectCriteria("StockIn");
subCriteria.AddGreaterOrEqualsCriteria("StockInDate", DateUtility.ZeroTime(e.ImportDateFrom));
subCriteria.AddLesserOrEqualsCriteria("StockInDate", DateUtility.MaxTime(e.ImportDateTo));
subCriteria.AddEqCriteria("DelFlg", (long)0);
var criteria = new ObjectCriteria();
criteria.AddEqCriteria("DelFlg", (long)0);
criteria.AddEqCriteria("StockInType", (Int64)e.StockInStatus);
criteria.AddSubCriteria("StockIn", subCriteria);
IList stockInDetailList = StockInDetailLogic.FindAll(criteria);
e.StockInDetailList = stockInDetailList;
// Search Stock
if (stockInDetailList.Count > 0)
{
// build the Product id list
IList productIdList = new ArrayList();
foreach (StockInDetail stockInDetail in stockInDetailList)
{
productIdList.Add(stockInDetail.Product.ProductId);
}
criteria = new ObjectCriteria();
criteria.AddSearchInCriteria("Product.ProductId", productIdList);
e.StockList = StockLogic.FindAll(criteria);
criteria = new ObjectCriteria();
criteria.AddSearchInCriteria("ProductId", productIdList);
e.ReturnProductList = ReturnProductLogic.FindAll(criteria);
}
}
开发者ID:DelLitt,项目名称:opmscoral,代码行数:33,代码来源:StockCreateController.cs
示例3: processPeriodMoneyView_LoadProcessPeriodMoneyEvent
void processPeriodMoneyView_LoadProcessPeriodMoneyEvent(object sender, ProcessPeriodMoneyEventArgs e)
{
DateTime toDay = DateUtility.DateOnly(DateTime.Now);
ObjectCriteria objectCriteria = new ObjectCriteria();
objectCriteria.AddEqCriteria("EmployeeMoneyPK.WorkingDay", toDay);
IList list = EmployeeMoneyLogic.FindAll(objectCriteria);
e.PeriodMoneyList = list;
}
开发者ID:DelLitt,项目名称:opmscoral,代码行数:8,代码来源:ProcessPeriodMoneyController.cs
示例4: closedPeriodView_LoadClosedPeriodEvent
void closedPeriodView_LoadClosedPeriodEvent(object sender, ClosedPeriodEventArgs e)
{
DateTime fromDay = DateUtility.DateOnly(e.FromDate);
DateTime toDay = DateUtility.DateOnly(e.ToDate);
ObjectCriteria objectCriteria = new ObjectCriteria();
objectCriteria.AddBetweenCriteria("EmployeeMoneyPK.WorkingDay", fromDay,toDay);
IList list = EmployeeMoneyLogic.FindAll(objectCriteria);
e.EmployeeMoneyList = list;
}
开发者ID:DelLitt,项目名称:opmscoral,代码行数:9,代码来源:ClosedPeriodLogic.cs
示例5: 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);
}
开发者ID:DelLitt,项目名称:opmscoral,代码行数:9,代码来源:MainStockInSearchController.cs
示例6: 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);
}
开发者ID:DelLitt,项目名称:opmscoral,代码行数:11,代码来源:DepartmentStockInSearchController.cs
示例7: 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 });
}
开发者ID:DelLitt,项目名称:opmscoral,代码行数:12,代码来源:DepartmentStockDetailController.cs
示例8: 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);
}
开发者ID:DelLitt,项目名称:opmscoral,代码行数:15,代码来源:GoodsIOSearchController.cs
示例9: 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;
}
开发者ID:DelLitt,项目名称:opmscoral,代码行数:17,代码来源:PosLogController.cs
示例10: employeeWorkingView_LoadEmployeesWorkingDay
void employeeWorkingView_LoadEmployeesWorkingDay(object sender, EmployeeWorkingsLogicEventArg e)
{
ObjectCriteria wDayCrit = new ObjectCriteria();
wDayCrit.AddEqCriteria("Department.DepartmentId", CurrentDepartment.Get().DepartmentId);
wDayCrit.AddBetweenCriteria("EmployeeWorkingDayPK.WorkingDay", DateUtility.ZeroTime(DateTime.Now),
DateUtility.MaxTime(DateTime.Now));
IList wDayResult = EmployeeWorkingDayLogic.FindAll(wDayCrit);
e.EmployeeWorkingList = wDayResult;
if(wDayResult!=null && wDayResult.Count > 0)
{
foreach (EmployeeWorkingDay workingDay in wDayResult)
{
ObjectCriteria criteria = new ObjectCriteria();
criteria.AddEqCriteria("EmployeePK.EmployeeId", workingDay.EmployeeWorkingDayPK.EmployeeId);
IList list = EmployeeLogic.FindAll(criteria);
workingDay.Employee = (Employee)list[0];
}
}
}
开发者ID:DelLitt,项目名称:opmscoral,代码行数:20,代码来源:EmployeeWorkingsLogicImpl.cs
示例11: FindAll
/// <summary>
/// Find all EmployeeMoney from database. No pagination.
/// </summary>
/// <param name="criteria"></param>
/// <returns></returns>
public IList FindAll(ObjectCriteria criteria)
{
ISession session = HibernateTemplate.SessionFactory.OpenSession();
try
{
ICriteria hibernateCriteria = session.CreateCriteria(typeof(EmployeeMoney));
if (criteria != null)
{
IDictionary<string, SubObjectCriteria> map = criteria.GetSubCriteria();
if (map.Count > 0)
{
foreach (string key in map.Keys)
{
hibernateCriteria.CreateAlias(key, key);
}
AddCriteriaAndOrder(hibernateCriteria, criteria.GetWhere(), criteria.GetOrder());
foreach (string key in map.Keys)
{
SubObjectCriteria subCriteria = null;
map.TryGetValue(key, out subCriteria);
AddCriteriaAndOrder(hibernateCriteria, subCriteria.GetWhere(), subCriteria.GetOrder());
}
}
else
{
AddCriteriaAndOrder(hibernateCriteria, criteria.GetWhere(), criteria.GetOrder());
}
}
return hibernateCriteria.List();
}
finally
{
if (session != null)
{
session.Disconnect();
}
}
}
开发者ID:DelLitt,项目名称:opmscoral,代码行数:44,代码来源:EmployeeMoneyDAOImpl.cs
示例12: productMasterView_InitProductMasterEvent
private void productMasterView_InitProductMasterEvent(object sender, ProductMasterEventArgs e)
{
var criteria = new ObjectCriteria();
criteria.AddEqCriteria("DelFlg", CommonConstants.DEL_FLG_NO);
e.ProductTypeList = ProductTypeLogic.FindAll(criteria);
e.ProductTypeList.Insert(0, new ProductType());
e.ProductSizeList = ProductSizeLogic.FindAll(criteria);
e.ProductSizeList.Insert(0, new ProductSize());
e.ProductColorList = ProductColorLogic.FindAll(criteria);
e.ProductColorList.Insert(0, new ProductColor());
e.CountryList = CountryLogic.FindAll(criteria);
e.CountryList.Insert(0, new Country());
e.ManufacturerList = ManufacturerLogic.FindAll(criteria);
e.ManufacturerList.Insert(0, new Manufacturer());
e.PackagerList = PackagerLogic.FindAll(criteria);
e.PackagerList.Insert(0, new Packager());
e.DistributorList = DistributorLogic.FindAll(criteria);
e.DistributorList.Insert(0, new Distributor());
if (e.ProductMasterForInit != null)
{
criteria = new ObjectCriteria();
criteria.AddEqCriteria("DelFlg", CommonConstants.DEL_FLG_NO);
criteria.AddEqCriteria("ProductName", e.ProductMasterForInit.ProductName);
criteria.AddEqCriteria("ProductType", e.ProductMasterForInit.ProductType);
criteria.AddEqCriteria("Manufacturer", e.ProductMasterForInit.Manufacturer);
criteria.AddEqCriteria("Distributor", e.ProductMasterForInit.Distributor);
criteria.AddEqCriteria("Packager", e.ProductMasterForInit.Packager);
criteria.AddEqCriteria("Country", e.ProductMasterForInit.Country);
e.SameProductMasterList = ProductMasterLogic.FindAll(criteria);
}
}
开发者ID:DelLitt,项目名称:opmscoral,代码行数:33,代码来源:ProductMasterController.cs
示例13: productMasterView_LoadProductMasterEvent
public void productMasterView_LoadProductMasterEvent(object sender, ProductMasterEventArgs e)
{
if (!string.IsNullOrEmpty(e.ProductMasterId))
{
e.ProductMaster = ProductMasterLogic.FindById(e.ProductMasterId);
if (e.ProductMaster != null)
{
// all the dept has same price
var criteria = new ObjectCriteria();
criteria.AddEqCriteria("DepartmentPricePK.ProductMasterId", e.ProductMasterId);
criteria.AddEqCriteria("DelFlg", CommonConstants.DEL_FLG_NO);
IList list = DepartmentPriceLogic.FindAll(criteria);
if (list.Count > 0)
{
e.DepartmentPrice = (DepartmentPrice)list[0];
}
}
}
}
开发者ID:DelLitt,项目名称:opmscoral,代码行数:20,代码来源:ProductMasterController.cs
示例14: _departmentStockAdhocProcessingView_LoadAdhocStocksEvent
void _departmentStockAdhocProcessingView_LoadAdhocStocksEvent(object sender, DepartmentStockAdhocProcessingEventArgs e)
{
ObjectCriteria criteria = new ObjectCriteria();
criteria.AddEqCriteria("DelFlg", CommonConstants.DEL_FLG_NO);
criteria.AddEqCriteria("Fixed", CommonConstants.DEL_FLG_NO);
criteria.AddOrder("ProductMaster.ProductMasterId", true);
IList list = DepartmentStockTempLogic.FindAll(criteria);
IList deptStockTempList = null;
if (list != null && list.Count > 0)
{
deptStockTempList = new ArrayList();
foreach (DepartmentStockTemp stockTemp in list)
{
int viewIndex = -1;
if(HasInList(stockTemp,deptStockTempList,out viewIndex))
{
DepartmentStockTempView view = (DepartmentStockTempView) deptStockTempList[viewIndex];
view.Quantity += stockTemp.Quantity;
view.GoodQuantity += stockTemp.GoodQuantity;
view.ErrorQuantity += stockTemp.ErrorQuantity;
view.DamageQuantity += stockTemp.DamageQuantity;
view.LostQuantity += stockTemp.LostQuantity;
view.UnconfirmQuantity += stockTemp.UnconfirmQuantity;
view.RealQuantity += stockTemp.GoodQuantity + stockTemp.ErrorQuantity + stockTemp.DamageQuantity +
stockTemp.LostQuantity + stockTemp.UnconfirmQuantity;
view.DepartmentStockTemps.Add(stockTemp);
}
else
{
DepartmentStockTempView view = new DepartmentStockTempView();
view.Quantity += stockTemp.Quantity;
view.GoodQuantity += stockTemp.GoodQuantity;
view.ErrorQuantity += stockTemp.ErrorQuantity;
view.DamageQuantity += stockTemp.DamageQuantity;
view.LostQuantity += stockTemp.LostQuantity;
view.UnconfirmQuantity += stockTemp.UnconfirmQuantity;
view.RealQuantity += stockTemp.GoodQuantity + stockTemp.ErrorQuantity + stockTemp.DamageQuantity +
stockTemp.LostQuantity + stockTemp.UnconfirmQuantity;
view.ProductMaster = stockTemp.ProductMaster;
view.DepartmentStockTemps = new ArrayList();
view.DepartmentStockTemps.Add(stockTemp);
deptStockTempList.Add(view);
}
}
}
e.DeptStockAdhocList = deptStockTempList;
}
开发者ID:DelLitt,项目名称:opmscoral,代码行数:52,代码来源:DepartmentStockAdhocProcessingController.cs
示例15: 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;
}
开发者ID:DelLitt,项目名称:opmscoral,代码行数:21,代码来源:StockSearchController.cs
示例16: _departmentStockOutView_LoadProductSizeEvent
public void _departmentStockOutView_LoadProductSizeEvent(object sender, DepartmentStockOutEventArgs e)
{
if (e.SelectedDepartmentStockOutDetail != null && e.SelectedDepartmentStockOutDetail.Product != null && !string.IsNullOrEmpty(e.SelectedDepartmentStockOutDetail.Product.ProductMaster.ProductName))
{
var subCriteria = new SubObjectCriteria("ProductMasters");
subCriteria.AddEqCriteria("DelFlg", CommonConstants.DEL_FLG_NO);
subCriteria.AddEqCriteria("ProductType", e.SelectedDepartmentStockOutDetail.Product.ProductMaster.ProductType);
subCriteria.AddEqCriteria("ProductName", e.SelectedDepartmentStockOutDetail.Product.ProductMaster.ProductName);
subCriteria.AddEqCriteria("ProductColor", e.SelectedDepartmentStockOutDetail.Product.ProductMaster.ProductColor);
subCriteria.AddEqCriteria("Country", e.SelectedDepartmentStockOutDetail.Product.ProductMaster.Country);
subCriteria.AddEqCriteria("Manufacturer", e.SelectedDepartmentStockOutDetail.Product.ProductMaster.Manufacturer);
subCriteria.AddEqCriteria("Distributor", e.SelectedDepartmentStockOutDetail.Product.ProductMaster.Distributor);
subCriteria.AddEqCriteria("Packager", e.SelectedDepartmentStockOutDetail.Product.ProductMaster.Packager);
var criteria = new ObjectCriteria();
criteria.AddSubCriteria("ProductMasters", subCriteria);
IList productSizes = ProductSizeLogic.FindAll(criteria);
e.ProductSizeList = productSizes;
}
}
开发者ID:DelLitt,项目名称:opmscoral,代码行数:19,代码来源:DepartmentStockOutController.cs
示例17: _departmentStockOutView_FindBarcodeEvent
public void _departmentStockOutView_FindBarcodeEvent(object sender, DepartmentStockOutEventArgs e)
{
var criteria = new ObjectCriteria();
criteria.AddEqCriteria("DelFlg", CommonConstants.DEL_FLG_NO);
criteria.AddEqCriteria("Product.ProductId", e.ProductId);
IList list = DepartmentStockLogic.FindAll(criteria);
if (list.Count == 0)
{
return;
}
Stock stock = list[0] as Stock;
e.SelectedDepartmentStockOutDetail = new DepartmentStockOutDetail();
e.SelectedDepartmentStockOutDetail.Product = stock.Product;
e.SelectedDepartmentStockOutDetail.Quantity = stock.Quantity;
e.SelectedDepartmentStockOutDetail.GoodQuantity = stock.Quantity;
e.SelectedDepartmentStockOutDetail.ErrorQuantity = stock.ErrorQuantity;
e.SelectedDepartmentStockOutDetail.LostQuantity = stock.LostQuantity;
e.SelectedDepartmentStockOutDetail.DamageQuantity = stock.DamageQuantity;
e.SelectedDepartmentStockOutDetail.UnconfirmQuantity = stock.UnconfirmQuantity;
e.EventResult = "Success";
}
开发者ID:DelLitt,项目名称:opmscoral,代码行数:22,代码来源:DepartmentStockOutController.cs
示例18: 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);
//.........这里部分代码省略.........
开发者ID:DelLitt,项目名称:opmscoral,代码行数:101,代码来源:GoodsSaleListController.cs
示例19: inventoryCheckingView_LoadGoodsByProductIdEvent
void inventoryCheckingView_LoadGoodsByProductIdEvent(object sender, InventoryCheckingEventArgs e)
{
ObjectCriteria objectCriteria = new ObjectCriteria();
objectCriteria.AddEqCriteria("Product.ProductId", e.InputBarcode);
objectCriteria.AddEqCriteria("DelFlg", (long)0);
IList stockList = StockLogic.FindAll(objectCriteria);
if(stockList != null && stockList.Count > 0)
{
e.ScannedStock = (Stock)stockList[0];
}
else
{
e.ScannedStock = null;
}
IList stockDefectList = StockLogic.FindAll(objectCriteria);
if(stockDefectList!=null && stockDefectList.Count > 0)
{
e.ScannedStock = (Stock)stockDefectList[0];
}
else
{
e.ScannedStock = null;
}
}
开发者ID:DelLitt,项目名称:opmscoral,代码行数:24,代码来源:InventoryCheckingController.cs
示例20: GetRemainStockNumber
private IList GetRemainStockNumber(IList departmentStockIns)
{
IList productLists = new ArrayList();
foreach (DepartmentStockOutDetail detail in departmentStockIns)
{
if (detail.Product != null)
productLists.Add(detail.Product.ProductId);
}
if (productLists.Count == 0)
{
return new ArrayList();
}
var criteria = new ObjectCriteria();
criteria.AddEqCriteria("DelFlg", CommonConstants.DEL_FLG_NO);
criteria.AddEqCriteria("DepartmentStockPK.DepartmentId", CurrentDepartment.Get().DepartmentId);
criteria.AddSearchInCriteria("DepartmentStockPK.ProductId", productLists);
IList stockList = DepartmentStockLogic.FindAll(criteria);
if (stockList != null && stockList.Count > 0)
{
foreach (DepartmentStockOutDetail detail in departmentStockIns)
{
foreach (DepartmentStock stock in stockList)
{
if (stock.DepartmentStockPK.ProductId.Equals(detail.Product.ProductId))
{
detail.Quantity = stock.Quantity;
break;
}
}
}
}
return stockList;
}
开发者ID:DelLitt,项目名称:opmscoral,代码行数:35,代码来源:DepartmentStockOutController.cs
注:本文中的AppFrame.ObjectCriteria类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论