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); }
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"); }
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"); } }
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.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"); }
protected override void ValidateRules(BrokenRules Verify) { Verify.IsNotNull(m_failCode, "FailCodeRequired", "Fail code is required", "FailCode"); }
protected override void ValidateRules(BrokenRules Verify) { //throw new NotImplementedException(); }
protected override void ValidateRules(BrokenRules Verify) { Verify.IsNotNull(m_part, "ValidPartReq", "Part number is not valid", "PartNumber"); }
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"); }
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.IsNotNull(m_category, "CategoryRequired", "Category is required.", "Category"); }
protected override void ValidateRules(BrokenRules Verify) { Verify.IsNotEmpty(m_component, "CompReq", "Component is required.", "Component"); }
protected override void ValidateRules(BrokenRules Verify) { base.ValidateRules(Verify); Verify.IsFalse(Name == "", "ContactNameRequired", "Name"); }
protected override void ValidateRules(BrokenRules Verify) { //Verify.IsTrue(m_step.Required && m_result.Length > 0,"ResultRequired", m_step.DisplayPrompt + " is required.","Result"); }
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"); }
/// <summary> /// Validates any business logic rules. /// </summary> protected virtual void ValidateRules(BrokenRules Verify) { }
protected override void ValidateRules(BrokenRules Verify) { Verify.IsTrue(FailuresListIsValid, "FailuresMustBeValid", "There are invalid failures. Please correct before saving.", "FailuresListIsValid"); }
protected override void ValidateRules(BrokenRules Verify) { }
/// <summary> /// Validates any business logic rules. /// </summary> protected abstract void ValidateRules(BrokenRules Verify);