Beispiel #1
0
        /// <summary>
        /// Propose
        /// </summary>
        /// <returns></returns>
        public List <ProposePo> propose()
        {
            //retrieve items that are low on stock
            List <Item> items = ctx.Item.Where(x => x.Stock < x.RoLvl).ToList();

            List <ProposePo> proposePoList = new List <ProposePo>();

            // format to ProposePo class
            foreach (Item i in items)
            {
                ProposePo po = new ProposePo();
                po.ItemID       = i.ItemID;
                po.ItemName     = i.ItemName;
                po.totalQty     = (int)i.RoQty;
                po.supplier1Qty = (int)i.RoQty;
                po.supplier2Qty = 0;
                po.supplier3Qty = 0;

                proposePoList.Add(po);
            }

            return(proposePoList);
        }
        /// <summary>
        /// Propose
        /// </summary>
        /// <returns></returns>
        public List<ProposePo> propose()
        {
            //retrieve items that are low on stock
            List<Item> items = ctx.Item.Where(x => x.Stock < x.RoLvl).ToList();

            List<ProposePo> proposePoList = new List<ProposePo>();

            // format to ProposePo class
            foreach (Item i in items)
            {
                ProposePo po = new ProposePo();
                po.ItemID = i.ItemID;
                po.ItemName = i.ItemName;
                po.totalQty = (int)i.RoQty;
                po.supplier1Qty = (int)i.RoQty;
                po.supplier2Qty = 0;
                po.supplier3Qty = 0;

                proposePoList.Add(po);
            }

            return proposePoList;
        }