Ejemplo n.º 1
0
        public ActionResult LoadIngredient(string StoreId, string businessId)
        {
            StockCountModels model  = new StockCountModels();
            var listIng             = _InventoryFactory.LoadIngredientForStockCount(StoreId, businessId);
            var lstStockCountDetail = _factory.GetIngredientFromStockCount(StoreId, businessId);

            foreach (var item in listIng)
            {
                item.Id       = lstStockCountDetail.Where(ww => ww.IngredientId == item.IngredientId).Select(ss => ss.Id).FirstOrDefault();
                item.CloseBal = lstStockCountDetail.Where(ww => ww.IngredientId == item.IngredientId).Select(ss => ss.CloseBal).FirstOrDefault();
                //model.ListItem.Add(new StockCountDetailModels
                //{
                //    IngredientId = item.Id,
                //    IngredientName = item.Name,
                //    IngredientCode = item.Code,
                //    CloseBal = 0
                //});
            }
            model.ListItem = listIng;
            return(PartialView("_ListItemNew", model));
        }