public RemoveAisleErrorCodes RemoveAisle(int aisleNumber) { var newAisle = aisleManager.GetAisleByNumber(aisleNumber); if (newAisle.Shelf.Count > 0) { return(RemoveAisleErrorCodes.AisleHasShelfs); } aisleManager.RemoveAisle(newAisle.AisleID); return(RemoveAisleErrorCodes.OK); }
public RemoveAisleErrorCodes RemoveAisle(int aisleNumber) { var newAisle = aisleManager.GetAisleByAisleNumber(aisleNumber); if (newAisle == null) { return(RemoveAisleErrorCodes.NoSuchAisle); } if (newAisle.Shelfs.Count > 0) { return(RemoveAisleErrorCodes.AisleHasShelfs); } aisleManager.RemoveAisle(newAisle.AisleID); return(RemoveAisleErrorCodes.Ok); }