Пример #1
0
        public override void GetError()
        {
            StringBuilder builder = new StringBuilder();

            foreach (PartToImport partToImport in m_importList)
            {
                OnItemProcessing(new ProcessingImportPartEventArgs(partToImport));
                Part part = PartService.GetPartByPartNumber
                                (m_purchaseOrder.Session, partToImport.PartNumber);

                if (part == null)
                {
                    string msg = string.Format("{0} is not a valid part number",
                                               partToImport.PartNumber);
                    builder.AppendLine(msg);
                    partToImport.Error = msg;
                }
                else
                {
                    partToImport.Part = part;
                }
            }

            if (builder.Length > 0)
            {
                m_error = "The import contains invalid line items please view the roll up for details.";
            }

            OnFinishedValidation();
        }
Пример #2
0
        public ICollection <OrderAllocationDetails> SearchOrders(string partNumber)
        {
            Part part = PartService.GetPartByPartNumber(m_uow, partNumber);

            return(CurrentConfiguration.ShipmentAllocationInstance
                   .GetOrdersByPartNumber(m_uow, CurrentShopfloorline, part));
        }
Пример #3
0
 void newPartNumberEdit_Validated(object sender, EventArgs e)
 {
     if (newPartNumberEdit.Text.Length == 0)
     {
         return;
     }
     m_newPart = PartService.GetPartByPartNumber(m_session, newPartNumberEdit.Text);
 }
Пример #4
0
        private string CheckInputForWarnings(string ppid)
        {
            StringBuilder msg = new StringBuilder();

            if (new PPIDValidator(ppid).Validate())
            {
                PPIDParser parser = new PPIDParser(ppid);
                if (!parser.PN.Equals(m_inventoryItem.PartNumber))
                {
                    msg.AppendLine(
                        "The part number contained in the PPID does not match the part number of the associated inventory item");
                    msg.AppendLine();
                }

                Part part = PartService.GetPartByPartNumber(m_session, parser.PN);
                if (part == null)
                {
                    msg.AppendLine("The part number extracted from the PPID is not a valid part number.");
                    msg.AppendLine();
                }

                if (m_inventoryItem.PurchaseOrder == null)
                {
                    msg.AppendLine("This inventory item is not associated with a purchase order.");
                    msg.AppendLine();
                }
                else
                {
                    if (m_inventoryItem.PurchaseOrder.LineItemByPart(part) == null)
                    {
                        msg.AppendLine("The part number extracted from the PPID does not match a part number from the purchase order.");
                        msg.AppendLine();
                    }
                }

                if (Scout.Core.Service <IInventoryService>()
                    .GetNSLotBySerialNumber(Scout.Core.Data.GetUnitOfWork(), ppid) != null)
                {
                    msg.AppendLine("This PPID is a multi-return");
                    msg.AppendLine();
                }
            }

            if (revText.Text.Contains("X"))
            {
                msg.AppendLine("This unit is a X revision");
                msg.AppendLine();
            }

            return(msg.ToString());
        }
Пример #5
0
        private void partText_Validated(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(partText.Text))
            {
                return;
            }

            Part part = PartService.GetPartByPartNumber(m_session, partText.Text);

            if (part != null)
            {
                LoadWarehouseItemsNeedingPutAway(part);
            }
        }
Пример #6
0
        public static ReplacementComponentFacts CreateNoPartComponent(RouteStationRepair repair)
        {
            ReplacementComponentFacts facts = new ReplacementComponentFacts(repair);
            Part noPart = PartService.GetPartByPartNumber(repair.Session,
                                                          "NoPart");

            facts.PartIn          = noPart;
            facts.PartOut         = noPart;
            facts.Component       = null;
            facts.Repair          = repair;
            facts.SerialNumberIn  = "";
            facts.SerialNumberOut = "";

            return(facts);
        }
        void partOutText_Validated(object sender, EventArgs e)
        {
            if (partOutText.Text.Length == 0)
            {
                return;
            }

            ToUpper(partOutText);

            m_facts.PartOut =
                PartService.GetPartByPartNumber(m_session, partOutText.Text);

            if (m_facts.PartOut == null)
            {
                ShowInvalidPartMessage(partOutText.Text);
            }
        }
Пример #8
0
        private void AddPart()
        {
            if (partText.Text.Length == 0)
            {
                return;
            }

            Part part = PartService.GetPartByPartNumber(m_session, partText.Text);

            if (!ValidPart(part))
            {
                return;
            }

            m_family.AddMember(part);

            Reset();
        }
Пример #9
0
        private void partText_Validated(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(partText.Text))
            {
                return;
            }


            if (inventoryTypeSelList.EditValue == null)
            {
                return;
            }

            Part part = PartService.GetPartByPartNumber(m_session, partText.Text);

            if (part != null)
            {
                LoadItemsByInventoryType(inventoryTypeSelList.EditValue.ToString(), part);
            }
        }
Пример #10
0
        // TODO: Move to service layer
        private void UpdatePartInfo()
        {
            m_part = PartService.GetPartByPartNumber(m_order.Session, partNumberText.Text);

            if (!ValidPart(m_part))
            {
                return;
            }

            if (!ReceivablePart(m_part))
            {
                return;
            }

            EnableReceiptEditors(true);
            LoadIdentTypeOptions(m_part);

            if (m_multiFieldScatterPostponed)
            {
                ScatterMultiIdentifierFields(m_multiFieldIdentifier);
            }
        }
Пример #11
0
        private void partText_Validated(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(partText.Text))
            {
                ClearFields();
                return;
            }

            if (inventoryTypeSelList.EditValue == null)
            {
                return;
            }

            m_part = PartService.GetPartByPartNumber(m_session, partText.Text);
            if (m_part != null)
            {
                detailsGroup.Visibility = LayoutVisibility.Always;
            }
            else
            {
                detailsGroup.Visibility = LayoutVisibility.Never;
            }
        }