public bool AddProduct(SProduct sp) { if (CurrentVolume + sp.Volume > MaxVolume) { return(false); } else { CurrentVolume += sp.Volume; stock.Add(sp); update(); return(true); } }
public bool IsPlace(SProduct sp) { return(CurrentVolume + sp.Volume <= MaxVolume); }