public override object Working() { IList productMasters = (IList)MainStockLogic.FetchAll(new LinqCriteria<MainStock>()); //IList productMasters = ProductMasterLogic.LoadAllProductMasterWithType("%%"); Flow.Session.Put(FlowConstants.PRODUCT_NAMES_LIST, productMasters); ObjectCriteria<Department> objectCriteria = new ObjectCriteria<Department>(); objectCriteria.Add(x => x.DepartmentId > 0); // we don't get department 0 because department 0 is MAIN STOCK. IList<Department> departments = DepartmentLogic.FindAll(objectCriteria); Flow.Session.Put(FlowConstants.DEPARTMENTS, departments); return null; }
public override object Working() { var stockOutCriteria = new ObjectCriteria<CoralPOS.Models.StockOut>(); stockOutCriteria.Add(x => x.ConfirmFlg == 1); var confirmingStockOuts = (IList) StockOutLogic.FindAll(stockOutCriteria); IList<CoralPOS.Models.StockOut> fetchedStockOuts = new List<CoralPOS.Models.StockOut>(); foreach (CoralPOS.Models.StockOut confirmingStockOut in confirmingStockOuts) { CoralPOS.Models.StockOut fetchedStockOut = StockOutLogic.Fetch(confirmingStockOut); MainStockLogic.UpdateStockQuantity(fetchedStockOut.StockOutDetails); fetchedStockOuts.Add(fetchedStockOut); } Flow.Session.Put(FlowConstants.CONFIRMING_STOCK_OUT_LIST,confirmingStockOuts); return null; }
public void Setup() { string productName = ProductName; ObjectCriteria<Product> crit = new ObjectCriteria<Product>(); /*IList colors = ProductLogic.GetColorsWithProductName(productName); IList sizes = ProductLogic.GetSizesWithProductName(productName);*/ crit.Add(p => p.ProductMaster.ProductName == productName); IList<Product> products = ProductLogic.FindAll(crit); IList<ExProductColor> extraColors = ProductColorLogic.FindAll(new ObjectCriteria<ExProductColor>()); IList<ExProductSize> extraSizes = ProductSizeLogic.FindAll(new ObjectCriteria<ExProductSize>()); IList colors = products.Select(s => s.ProductColor).Distinct().ToList(); IList sizes = products.Select(s => s.ProductSize).Distinct().ToList(); ProductColorList = colors; ProductSizeList = sizes; ExtraProductColorList = extraColors as IList; ExtraProductSizeList = extraSizes as IList; SelectedProductColors = new ArrayList(); SelectedProductSizes = new ArrayList(); ExtraSelectedProductColors = new ArrayList(); ExtraSelectedProductSizes = new ArrayList(); }
public DepartmentStock FindByProductId(string key) { ObjectCriteria<DepartmentStock> objectCriteria = new ObjectCriteria<DepartmentStock>(); objectCriteria.Add(mstk => mstk.Product.ProductId == key); return (DepartmentStock)DepartmentStockDao.FindFirst(objectCriteria); }
protected override void OnActivate() { SelectedDepartment = new Department(); Departments = new ArrayList(); ObjectCriteria<Department> criteria = new ObjectCriteria<Department>(); criteria.Add(t => t.DepartmentId > 0); IList<CoralPOS.Models.Department> departments = DepartmentLogic.FindAll(criteria); Departments = ObjectConverter.ConvertFrom(departments); }
protected override void OnInitialize() { ObjectCriteria<Department> criteria = new ObjectCriteria<Department>(); criteria.Add(x => x.DepartmentId > 0); IList<Department> list = DepartmentLogic.FindAll(criteria); Departments = list; }