public MoveShelfCodes MoveShelf(int shelfNumber, int sectionNumber) { var newSection = sectionManager.GetSectionBySectionNumber(sectionNumber); if (newSection == null) { return(MoveShelfCodes.NoSuchSection); } var newShelf = shelfManager.GetShelfByShelfNumber(shelfNumber); if (newShelf == null) { return(MoveShelfCodes.NoSuchShelf); } shelfManager.MoveShelf(newShelf.ShelfID, newSection.SectionID); return(MoveShelfCodes.Ok); }
public ShelfStatusCodes MoveShelf(int shelfNumber, int aisleNumber) { var newAisle = aisleManager.GetAisleByAisleNumber(aisleNumber); var shelf = shelfManager.GetShelfByShelfNumber(shelfNumber, aisleNumber); if (newAisle == null) { return(ShelfStatusCodes.NoSuchAisle); } if (shelf == null) { return(ShelfStatusCodes.NoSuchShelf); } if (shelf.Aisle.AisleNumber == aisleNumber) { return(ShelfStatusCodes.ShelfAlreadyExistInAisle); } shelfManager.MoveShelf(shelf.ShelfID, newAisle.AisleID); return(ShelfStatusCodes.Ok); }
public ErrorCodesMoveShelf MoveShelf(int shelfNumber, int pathID) { var newPath = pathManager.GetPathByPathID(pathID); if (newPath == null) { return(ErrorCodesMoveShelf.NoSuchShelf); } var shelf = shelfManager.GetShelfByShelfNumber(shelfNumber, pathID); if (shelf == null) { return(ErrorCodesMoveShelf.NoSuchShelf); } if (shelf.Path.PathID == pathID) { return(ErrorCodesMoveShelf.ShelfIsAlreadyAtThatPath); } shelfManager.MoveShelf(shelf.ShelfID, newPath.PathID); return(ErrorCodesMoveShelf.Ok); }
public MoveShelfErrorCodes MoveShelf(int shelfNumber, int aisleNumber) { var newAisle = aisleManager.GetAisleByAisleNumber(aisleNumber); if (newAisle == null) { return(MoveShelfErrorCodes.NoSuchAisle); } var shelf = shelfManager.GetShelfByShelfNumber(shelfNumber); if (shelf == null) { return(MoveShelfErrorCodes.NoSuchShelf); } if (shelf.Aisle.AisleNumber == aisleNumber) { return(MoveShelfErrorCodes.ShelfAlreadyInThatAisle); } shelfManager.MoveShelf(shelf.ShelfID, newAisle.AisleID); return(MoveShelfErrorCodes.Ok); }