コード例 #1
0
        protected override void ValidateRules(BrokenRules Verify)
        {
            base.ValidateRules(Verify);

            Verify.IsNotEmpty(Label,
                              "AddrLabelRequired",
                              "Addresses require a label.",
                              "Label");

            Verify.IsNotEmpty(Street,
                              "AddrLineRequired",
                              "No street information on address.",
                              "Street");

            Verify.IsNotEmpty(City,
                              "AddrCityRequired",
                              "Address city is required.",
                              "City");

            //Verify.IsNotEmpty(State,
            //    "AddrStateRequired",
            //    "Address state/provence is required.",
            //    "State");

            Verify.IsNotNull(Country,
                             "AddrCountryRequired",
                             "Address country is required.",
                             "Country");
        }
コード例 #2
0
        protected override void ValidateRules(BrokenRules Verify)
        {
            if (!IsDeleted)
            {
                if (Verify.Count > 0)
                {
                    Verify.Clear();
                }
                return;
            }

            Verify.IsNotNull(m_taskType, "TaskTypeReq", "Task type is required", "TaskType");
            Verify.IsNotEmpty(m_displayPrompt, "DisplayPromptReq", "Display prompt is required", "DisplayPrompt");
        }
コード例 #3
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");
                }
            }
        }
コード例 #4
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");
 }
コード例 #5
0
 protected override void ValidateRules(BrokenRules Verify)
 {
     Verify.IsNotEmpty(m_component, "CompReq", "Component is required.", "Component");
 }