Exemplo n.º 1
0
        internal void LoadProducts()
        {
            this.Products = new List <InventoryViewModel>();

            foreach (var item in IMDAL.GetAllProducts())
            {
                this.Products.Add(new InventoryViewModel(item));
            }
        }
Exemplo n.º 2
0
        public System.Collections.IEnumerable LoadProducts()
        {
            List <SelectListItem> ddl = new List <SelectListItem>();

            foreach (var item in IMDAL.GetAllProducts())
            {
                ddl.Add(new SelectListItem()
                {
                    Text = item.ProductName, Value = item.Id.ToString()
                });
            }

            return(ddl);
        }