Ejemplo n.º 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);
            }
        }
Ejemplo n.º 2
0
        public ManufacturerPartName GetManufacturerPartName(int idx)
        {
            ManufacturerPartName oRet = null;

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

            return(oRet);
        }
Ejemplo n.º 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);
     }
 }