private assignPositionResults AssignBays(iIsle isle, int shelfid) { assignPositionResults result = assignPositionResults.assignedSkuToPosition; List <iBay> assignBays = new List <iBay>(isle.Bays); if (frontBay) { assignBays = assignBays.OrderBy(b => b.BayID).ToList(); } else { assignBays = assignBays.OrderByDescending(b => b.BayID).ToList(); } foreach (iBay b in assignBays) { if (b.HasOpenSpace(shelfid)) { result = AssignPosition(b, shelfid); return(result); } } return(result); }
/// <summary> /// Assigns the correct type of shelf based on warehouse WMS system. Lettered Shelves in Snap, Numbered Shelves in Gen2 /// </summary> /// <param name="inisle">Inisle.</param> /// <param name="bayid">Bayid.</param> public Bay(iIsle inisle, int bayid) { inIsle = inisle; bayID = bayid; for (int i = 1; i <= 5; i++) { if (this.inIsle.InWarehouse.WmsBrand == wmsBrand.NextWMS) { shelves.Add(new Shelf(this, i)); } else { shelves.Add(new currentShelf(this, i)); } } }