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"); }
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"); }
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"); } } }
protected override void ValidateRules(BrokenRules Verify) { Verify.IsNotEmpty(m_code, "CodeReq", "Code is required.", "Code"); Verify.IsNotNull(m_category, "CatReq", "Category is required.", "Category"); }
protected override void ValidateRules(BrokenRules Verify) { Verify.IsNotEmpty(m_component, "CompReq", "Component is required.", "Component"); }