コード例 #1
0
ファイル: LotSplitForm.cs プロジェクト: ewin66/SCOUT_NS
        private bool ValidSplit()
        {
            SCOUT.Core.Data.BrokenRules br = m_lotSplit.GetBrokenRules();

            if (br.Count > 0)
            {
                InfoBox ib = new InfoBox();

                StringBuilder sb = new StringBuilder();

                for (int i = 0; i < br.Count; ++i)
                {
                    sb.Append("- ");
                    sb.Append(br[i].Description);
                    sb.Append(Environment.NewLine);
                }

                ib.Show("Invalid split:\r{0}",
                        sb.ToString());

                return(false);
            }

            return(true);
        }
コード例 #2
0
ファイル: Part.cs プロジェクト: ewin66/SCOUT_NS
        protected override void ValidateRules(BrokenRules Verify)
        {
            Verify.IsNotNull(
                PartNumber,
                "BADPARTNO",
                "Invalid or no part number specified.",
                "PartNumber");

            Verify.IsNotNull(
                Type,
                "BADPARTTYPE",
                "Invalid or no type selected.",
                "Type");

            Verify.IsNotNull(
                IdentType,
                "BADPARTIDENT",
                "Invalid or no part identifier type selected.",
                "IdentType");
        }
コード例 #3
0
        protected override void ValidateRules(BrokenRules Verify)
        {
            base.ValidateRules(Verify);

            Verify.IsTrue(m_stockLot != null,
                          "INVSTKLOT", "Invalid LOT", "StockLot");

            Verify.IsTrue(m_part != null,
                          "INVSTKITEM", "Invalid Part Number", "Part");

            if ((m_part != null) && (m_stockLot != null))
            {
                Part p = Part.GetPart(m_stockLot.PartId);

                Verify.IsTrue(m_stockLot.PartId != m_part.Id,
                              "CPNA_SameStkRefID",
                              "The part number must be different than that of the lot.",
                              "Part");
            }
        }
コード例 #4
0
ファイル: SalesOrder.cs プロジェクト: ewin66/SCOUT_NS
        protected override void ValidateRules(BrokenRules Verify)
        {
            Verify.IsNotNull(m_organization,
                             "SONoCustomer", "No customer selected.", "Organization");

            Verify.IsFalse(
                HasDuplicateSOItems(),
                "SODupCartItems",
                "There are duplicate items in the cart.",
                "CartItems");

            Verify.IsNotEmpty(SalesRep,
                              "SONoSalesRep", "No sales rep selected.", "SalesRep");

            Verify.IsNotNull(m_shopfloorline,
                             "SflReq", "Sales Order shopfloorline is required.", "Shopfloorline");

            Verify.IsNotEmpty(m_shipToAddress, "ShipToReq", "Ship To Address is required", "ShipToAddress");


            if (this.Order.OrderType == OrderType.ReturnNReplace && !Order.IsTemplate)
            {
                Verify.IsTrue(CartItems.Count > 0, "RnRLineItemsReq", "Sales order line items are required for a return n replace order.", "CartItems");
            }


            foreach (SalesLineItem salesLineItem in CartItems)
            {
                if (!salesLineItem.IsDeleted)
                {
                    Verify.IsTrue(salesLineItem.Error.Length == 0,
                                  Guid.NewGuid().ToString(),
                                  salesLineItem.Error,
                                  "PartId");
                }
            }
        }
コード例 #5
0
 protected override void ValidateRules(BrokenRules Verify)
 {
     Verify.IsNotNull(m_shopfloorline, "ShopfloorlineReq", "Shopfloorline Required.", "Shopfloorline");
     Verify.IsNotNull(m_partModel, "PartModelReq", "Part Model is required.", "PartModel");
     Verify.IsFalse(string.IsNullOrEmpty(m_description), "ConfigurationDescriptionReq", "Configuration Description is required", "ConfigurationDescription");
 }
コード例 #6
0
 protected override void ValidateRules(BrokenRules Verify)
 {
     Verify.IsNotNull(m_failCode, "FailCodeRequired",
                      "Fail code is required", "FailCode");
 }
コード例 #7
0
ファイル: InventoryCapture.cs プロジェクト: ewin66/SCOUT_NS
 protected override void ValidateRules(BrokenRules Verify)
 {
     //throw new NotImplementedException();
 }
コード例 #8
0
 protected override void ValidateRules(BrokenRules Verify)
 {
     Verify.IsNotNull(m_part, "ValidPartReq", "Part number is not valid", "PartNumber");
 }
コード例 #9
0
 protected override void ValidateRules(BrokenRules Verify)
 {
     Verify.IsNotNull(m_part, "PartIsRequired", "A valid part number is required", "Part");
     Verify.IsTrue(m_qty > 0, "QtyGreaterThanZero", "Qty must be greater than zero", "Qty");
 }
コード例 #10
0
 protected override void ValidateRules(BrokenRules Verify)
 {
     Verify.IsNotEmpty(m_code, "CodeReq", "Code is required.", "Code");
     Verify.IsNotNull(m_category, "CatReq", "Category is required.", "Category");
 }
コード例 #11
0
 protected override void ValidateRules(BrokenRules Verify)
 {
     Verify.IsNotNull(m_category, "CategoryRequired", "Category is required.", "Category");
 }
コード例 #12
0
 protected override void ValidateRules(BrokenRules Verify)
 {
     Verify.IsNotEmpty(m_component, "CompReq", "Component is required.", "Component");
 }
コード例 #13
0
ファイル: Contact.cs プロジェクト: ewin66/SCOUT_NS
        protected override void ValidateRules(BrokenRules Verify)
        {
            base.ValidateRules(Verify);

            Verify.IsFalse(Name == "", "ContactNameRequired", "Name");
        }
コード例 #14
0
ファイル: RouteStationResult.cs プロジェクト: ewin66/SCOUT_NS
 protected override void ValidateRules(BrokenRules Verify)
 {
     //Verify.IsTrue(m_step.Required && m_result.Length > 0,"ResultRequired", m_step.DisplayPrompt + " is required.","Result");
 }
コード例 #15
0
ファイル: RouteStation.cs プロジェクト: ewin66/SCOUT_NS
 protected override void ValidateRules(BrokenRules Verify)
 {
     //Verify.IsTrue(Steps.Count >= 1, "StepsReq", "At least one step is required", "Steps");
     //Verify.IsTrue(FailCategories.Count >=1,"FailCatsReq","At least one fail category is required", "FailCategories");
     //Verify.IsTrue(Outcomes.Count >= 1, "OutcomesReq", "At least one station outcome is required", "Outcomes");
 }
コード例 #16
0
 /// <summary>
 /// Validates any business logic rules.
 /// </summary>
 protected virtual void ValidateRules(BrokenRules Verify)
 {
 }
コード例 #17
0
 protected override void ValidateRules(BrokenRules Verify)
 {
     Verify.IsTrue(FailuresListIsValid, "FailuresMustBeValid",
                   "There are invalid failures. Please correct before saving.",
                   "FailuresListIsValid");
 }
コード例 #18
0
 protected override void ValidateRules(BrokenRules Verify)
 {
 }
コード例 #19
0
 /// <summary>
 /// Validates any business logic rules.
 /// </summary>
 protected abstract void ValidateRules(BrokenRules Verify);