示例#1
0
        public IViewComponentResult Invoke(string shelfId = "")
        {
            int countPackageInShelf = 0;
            var cells = ctx.GetAllCellById(shelfId);

            cells.ForEach(cell =>
            {
                if (ctx.PackageInCell(cell.CellId))
                {
                    countPackageInShelf++;
                }
            });
            int         cellNumber = ctx.CellCount(shelfId);
            ShelfStatus ss         = new ShelfStatus
            {
                PackageCountInShelf = countPackageInShelf,
                CellNumber          = cellNumber
            };

            return(View(ss));
        }
示例#2
0
        public IViewComponentResult Invoke(string cellId = "")
        {
            bool   status      = ctx.PackageInCell(cellId);
            var    package     = ctx.PackageRFIDInCell(cellId);
            string packageRFID = "";

            if (package != null)
            {
                packageRFID = package.PackageRFID;
            }
            else
            {
                packageRFID = "Empty";
            }
            CellStatus cellStatus = new CellStatus
            {
                StatusCell  = status,
                PackageRFID = packageRFID
            };

            return(View(cellStatus));
        }