예제 #1
0
        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);
            }
        }
예제 #2
0
        public ManufacturerPartName GetManufacturerPartName(int idx)
        {
            ManufacturerPartName oRet = null;

            if (idx < manufacturerParts.Count)
            {
                oRet = manufacturerParts[idx];
            }

            return(oRet);
        }
예제 #3
0
 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);
     }
 }