private void AddManufacturerPart(string itemNumber, string manufacturerPartItemNumber, string manufacturerName) { if (PartExists(itemNumber)) { if (manufacturerPartItemNumber.Length > 0) { Part part = Parts.Find(x => x.ItemNumber.Contains(itemNumber)); ManufacturerPartName manufacturerPart = new ManufacturerPartName(); manufacturerPart.ItemNumber = manufacturerPartItemNumber; manufacturerPart.Manufacturer = manufacturerName; part.AddManufacturerPart(manufacturerPart); } else { Log.Write("manufacturer part ItemNumber too short "); } } else { Log.Write("part does not exist " + itemNumber); } }
public ManufacturerPartName GetManufacturerPartName(int idx) { ManufacturerPartName oRet = null; if (idx < manufacturerParts.Count) { oRet = manufacturerParts[idx]; } return(oRet); }
public void AddManufacturerPart(ManufacturerPartName manufacturerPart) { if (!ManufacturerPartExists(manufacturerPart.ItemNumber)) { manufacturerParts.Add(manufacturerPart); Log.Write("manufacturer part " + manufacturerPart.ItemNumber + " from " + manufacturerPart.Manufacturer + " added to " + ItemNumber); } else { Log.Write("manufacturer part " + manufacturerPart.ItemNumber + " from " + manufacturerPart.Manufacturer + " already exists in " + ItemNumber); } }