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


C# ObjectCriteria.AddEqCriteria方法代码示例

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


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

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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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);
     EventUtility.fireEvent(CompletedMainStockInSearchEvent,this,e);
 }
开发者ID:DelLitt,项目名称:opmscoral,代码行数:10,代码来源:MainStockInSearchController.cs

示例7: 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

示例8: goodsIOSearchView_DeleteBlockInDetailEvent

        public void goodsIOSearchView_DeleteBlockInDetailEvent(object sender, GoodsIOSearchEventArgs e)
        {
            // validate delete items

            // delete
            BlockInDetailLogic.DeleteList(e.DeleteList);

            // search again
            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,代码行数:21,代码来源:GoodsIOSearchController.cs

示例9: 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

示例10: 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

示例11: _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

示例12: universalMasterSaveView_SaveUniversalMasterEvent

 public void universalMasterSaveView_SaveUniversalMasterEvent(object sender, UniversalMasterSaveEventArgs e)
 {
     object obj = null;
     switch (e.MasterType)
     {
         case MasterType.PRODUCT_TYPE:
             if (e.Id != 0)
             {
                 obj = new ProductType{TypeId = e.Id, TypeName = e.Name, UpdateDate = DateTime.Now};
                 ProductTypeLogic.Update((ProductType)obj);
             }
             else
             {
                 var criteria = new ObjectCriteria();
                 criteria.AddEqCriteria("TypeName", e.Name).AddEqCriteria("DelFlg", CommonConstants.DEL_FLG_NO);
                 IList list = ProductTypeLogic.FindAll(criteria);
                 if (list.Count == 0)
                 {
                     obj = new ProductType { TypeName = e.Name, UpdateDate = DateTime.Now, CreateDate = DateTime.Now };
                     ProductTypeLogic.Add((ProductType)obj);
                 }
                 else
                 {
                     obj = list[0];
                 }
             }
             break;
         case MasterType.PRODUCT_SIZE:
             if (e.Id != 0)
             {
                 obj = new ProductSize { SizeId = e.Id, SizeName = e.Name };
                 ProductSizeLogic.Update((ProductSize)obj);
             }
             else
             {
                 var criteria = new ObjectCriteria();
                 criteria.AddEqCriteria("SizeName", e.Name).AddEqCriteria("DelFlg", CommonConstants.DEL_FLG_NO);
                 IList list = ProductSizeLogic.FindAll(criteria);
                 if (list.Count == 0)
                 {
                     obj = new ProductSize { SizeName = e.Name };
                     ProductSizeLogic.Add((ProductSize)obj);
                 }
                 else
                 {
                     obj = list[0];
                 }
             }
             break;
         case MasterType.PRODUCT_COLOR:
             if (e.Id != 0)
             {
                 obj = new ProductColor { ColorId = e.Id, ColorName = e.Name };
                 ProductColorLogic.Update((ProductColor)obj);
             }
             else
             {
                 var criteria = new ObjectCriteria();
                 criteria.AddEqCriteria("ColorName", e.Name).AddEqCriteria("DelFlg", CommonConstants.DEL_FLG_NO);
                 IList list = ProductColorLogic.FindAll(criteria);
                 if (list.Count == 0)
                 {
                     obj = new ProductColor { ColorName = e.Name };
                     ProductColorLogic.Add((ProductColor)obj);
                 }
                 else
                 {
                     obj = list[0];
                 }
             }
             break;
         case MasterType.COUNTRY:
             if (e.Id != 0)
             {
                 obj = new Country { CountryId = e.Id, CountryName = e.Name };
                 CountryLogic.Update((Country)obj);
             }
             else
             {
                 var criteria = new ObjectCriteria();
                 criteria.AddEqCriteria("CountryName", e.Name).AddEqCriteria("DelFlg", CommonConstants.DEL_FLG_NO);
                 IList list = CountryLogic.FindAll(criteria);
                 if (list.Count == 0)
                 {
                     obj = new Country { CountryName = e.Name };
                     CountryLogic.Add((Country)obj);
                 }
                 else
                 {
                     obj = list[0];
                 }
             }
             break;
         case MasterType.DISTRIBUTOR:
             if (e.Id != 0)
             {
                 obj = new Distributor { DistributorId = e.Id, DistributorName = e.Name };
                 DistributorLogic.Update((Distributor)obj);
             }
             else
//.........这里部分代码省略.........
开发者ID:DelLitt,项目名称:opmscoral,代码行数:101,代码来源:UniversalMasterSaveController.cs

示例13: stockSearchView_SearchStockEvent

        public void stockSearchView_SearchStockEvent(object sender, StockSearchEventArgs e)
        {
            /*            var subCriteria1 = new SubObjectCriteria("Product");
                        var subCriteria2 = new SubObjectCriteria("ProductMaster");
                        subCriteria2.AddLikeCriteria("ProductMasterId", e.ProductMasterId);
                        subCriteria2.AddLikeCriteria("ProductName", e.ProductMasterName);*/

            var criteria = new ObjectCriteria(true);
            criteria.AddEqCriteria("stock.DelFlg", CommonConstants.DEL_FLG_NO);
            criteria.AddLikeCriteria("pm.ProductMasterId", e.ProductMasterId + "%");
            criteria.AddLikeCriteria("pm.ProductName", "%" + e.ProductMasterName + "%");
            criteria.AddEqCriteria("pm.ProductType", e.ProductType);
            criteria.AddEqCriteria("pm.ProductSize", e.ProductSize);
            criteria.AddEqCriteria("pm.ProductColor", e.ProductColor);
            criteria.AddEqCriteria("pm.Country", e.Country);
            criteria.AddEqCriteria("pm.Manufacturer", e.Manufacturer);
            criteria.AddEqCriteria("pm.Packager", e.Packager);
            criteria.AddEqCriteria("pm.Distributor", e.Distributor);
            IList list = StockLogic.FindByQuery(criteria);
            if(!CheckUtility.IsNullOrEmpty(GlobalCache.Instance().WarningText))
            {
                MessageBox.Show(GlobalCache.Instance().WarningText);
                GlobalCache.Instance().WarningText = null;
            }
            e.StockList = list;
        }
开发者ID:DelLitt,项目名称:opmscoral,代码行数:26,代码来源:StockSearchController.cs

示例14: _departmentStockOutView_FillProductToComboEvent

        public void _departmentStockOutView_FillProductToComboEvent(object sender, DepartmentStockOutEventArgs e)
        {
            ComboBox comboBox = (ComboBox) sender;
            string originalText = comboBox.Text;
            if (e.IsFillToComboBox)
            {
                ProductMaster searchPM = e.SelectedDepartmentStockOutDetail.Product.ProductMaster;
                var criteria = new ObjectCriteria(true);
                criteria.AddEqCriteria("pm.DelFlg", CommonConstants.DEL_FLG_NO);
                criteria.AddEqCriteria("stock.DelFlg", CommonConstants.DEL_FLG_NO);
                criteria.AddLikeCriteria("pm.ProductName", "%" + searchPM.ProductName + "%");
                criteria.MaxResult = 50;
                IList list = DepartmentStockLogic.FindByQueryForDeptStock(criteria);

                if(list ==null || list.Count == 0)
                {
                    return;
                }
                IList result = new ArrayList();
                foreach (DepartmentStock stock in list)
                {
                    result.Add(stock.Product.ProductMaster);
                }
                IList retlist = RemoveDuplicateName(result);

                result = new ArrayList();
                int count = 0;
                foreach (var p in retlist)
                {
                    if (count == 50)
                    {
                        break;
                    }
                    result.Add(p);
                    count++;
                }

                var productMasters = new BindingList<ProductMaster>();
                foreach (ProductMaster master in result)
                {
                    productMasters.Add(master);
                }

                var bindingSource = new BindingSource();
                bindingSource.DataSource = productMasters;
                comboBox.DataSource = bindingSource;
                comboBox.DisplayMember = "TypeAndName";
                comboBox.ValueMember = e.ComboBoxDisplayMember;
                comboBox.DropDownWidth = 300;
                comboBox.DropDownHeight = 200;
                // keep the original text
                comboBox.Text = originalText;
                comboBox.MaxDropDownItems = 10;
            }
        }
开发者ID:DelLitt,项目名称:opmscoral,代码行数:55,代码来源:DepartmentStockOutController.cs

示例15: _departmentStockOutView_LoadGoodsByNameEvent

 public void _departmentStockOutView_LoadGoodsByNameEvent(object sender, DepartmentStockOutEventArgs e)
 {
     DepartmentStockOutDetail detail = e.SelectedDepartmentStockOutDetail;
     ObjectCriteria objectCriteria = new ObjectCriteria();
     objectCriteria.AddEqCriteria("DelFlg", CommonConstants.DEL_FLG_NO);
     objectCriteria.AddEqCriteria("ProductName", detail.Product.ProductMaster.ProductName);
     IList list = ProductMasterLogic.FindAll(objectCriteria);
     e.FoundProductMasterList = list;
     if (list == null || list.Count == 0)
     {
         return;
     }
     ProductMaster prodMaster = list[0] as ProductMaster;
     detail.Product.ProductMaster = prodMaster;
     e.SelectedDepartmentStockOutDetail = detail;
     IList detailList = new ArrayList();
     detailList.Add(detail);
     //            GetRemainStockNumber(detailList);
 }
开发者ID:DelLitt,项目名称:opmscoral,代码行数:19,代码来源:DepartmentStockOutController.cs


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