示例#1
0
        public IActionResult DeactiveConfirmed(string id)
        {
            var shelf = ctx.FindShelf(id);

            ctx.DeactiveShelf(shelf);
            for (int i = 1; i <= shelf.FloorNumber; i++)
            {
                var floorId = $"{id}-{i}";
                var floor   = ctx.FindFloor(floorId);
                ctx.DeactiveFloor(floor);
            }
            ;
            for (int i = 1; i <= shelf.FloorNumber; i++)
            {
                for (int j = 1; j <= shelf.CellNumber; j++)
                {
                    var cellId = $"{id}-{i}-{j}";
                    var cell   = ctx.FindCell(cellId);
                    ctx.DeactiveCell(cell);
                }
            }
            ;
            return(RedirectToAction(nameof(ListAllShelf)));
        }