public void InquiryOnTransactionsWithMunicipalPropertiesValidation(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results) { string msg; if (!this.ServiceApplicantReceiptDataSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections._0009_000141, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.ElectronicAdministrativeServiceHeaderSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections.R1234, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.ElectronicAdministrativeServiceFooterSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections._0009_000153, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.ServiceTermTypeSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Fields._0008_000143, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.StateAndMunicipalPropertyIdentifyingDataSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections._0009_000202, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } }
public void FindingOfHousingNeedsValidation(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results) { string msg; if (!this.ServiceApplicantReceiptDataSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections._0009_000141, Resources.Sections.R9097); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.ElectronicAdministrativeServiceHeaderSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections.R1234, Resources.Sections.R9097); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.ElectronicAdministrativeServiceFooterSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections._0009_000153, Resources.Sections.R9097); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.ServiceTermTypeSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Fields._0008_000143, Resources.Sections.R9097); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } }
public void DocumentProcessingForThePurchaseOwnershipOfNaturalAndLegalPersonsOfLandWithEstablishedConstructionRightValidation(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results) { string msg; if (!this.ServiceApplicantReceiptDataSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections._0009_000141, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.ElectronicAdministrativeServiceHeaderSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections.R1234, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.ElectronicAdministrativeServiceFooterSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections._0009_000153, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.ServiceTermTypeSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Fields._0008_000143, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.StateAndMunicipalPropertyIdentifyingDataSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections._0009_000202, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } }
public void IssuanceOfCertifiedCopiesOfContractsOrdersAndOtherDocumentsOfInterestToNaturalAndLegalPersonsFromStatePropertyArchiveValidation(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results) { string msg; if (!this.ServiceApplicantReceiptDataSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections._0009_000141, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.ElectronicAdministrativeServiceHeaderSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections.R1234, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.ElectronicAdministrativeServiceFooterSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections._0009_000153, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.ServiceTermTypeSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Fields._0008_000143, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.StateAndMunicipalPropertyIdentifyingDataSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections._0009_000202, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } }
public void RemovalFromTheActBookOfPropertyOwnershipOfWhichIsRefundableUnderTheRestitutionLawsValidation(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results) { string msg; if (!this.ServiceApplicantReceiptDataSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections._0009_000141, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.ElectronicAdministrativeServiceHeaderSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections.R1234, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.ElectronicAdministrativeServiceFooterSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections._0009_000153, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.ServiceTermTypeSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Fields._0008_000143, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.StateAndMunicipalPropertyIdentifyingDataSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections._0009_000202, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } }
public void ExpertReportsToAssessTheCompensationDueUnderTheActToCompensateOwnersOfNationalizedPropertiesValidation(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results) { string msg; if (!this.ServiceApplicantReceiptDataSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections._0009_000141, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.ElectronicAdministrativeServiceHeaderSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections.R1234, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.ElectronicAdministrativeServiceFooterSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections._0009_000153, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.ServiceTermTypeSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Fields._0008_000143, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.StateAndMunicipalPropertyIdentifyingDataSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections._0009_000202, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } }
public void IssueOfActsOnPrivateStatePropertyOfAgenciesMinistriesAndOthersInOrOutsideTheRegulationPlansValidation(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results) { string msg; if (!this.ServiceApplicantReceiptDataSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections._0009_000141, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.ElectronicAdministrativeServiceHeaderSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections.R1234, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.ElectronicAdministrativeServiceFooterSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections._0009_000153, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.ServiceTermTypeSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Fields._0008_000143, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } if (!this.StateAndMunicipalPropertyIdentifyingDataSpecified) { msg = string.Format(Resources.Terms._0006_000015, Resources.Sections._0009_000202, Resources.Sections.R9101); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(msg, this, "", "0006-000015", null)); } }
protected override void DoValidateCollectionItem(ThePropertyClass objectToValidate, object currentTarget, string key, Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults validationResults) { if (String.Compare(objectToValidate.Property, _badPropertyValue) == 0) { validationResults.AddResult(new ValidationResult("bad value", objectToValidate, String.Empty, String.Empty, this)); } }
public void ServiceApplicantReceiptDataValidation(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results) { string message; ValidationResults valResults = null; Microsoft.Practices.EnterpriseLibrary.Validation.Validator validator = null; if (!this.ServiceResultReceiptMethodSpecified) { message = string.Format(Resources.Terms._0006_000015, Resources.Fields._0008_000197, Resources.Sections._0009_000141); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(message, this, "", "0006-000015", null)); } //Задължителни полета, ако получаването е на гише в администрация if (this.ServiceResultReceiptMethod.Equals(ServiceResultReceiptMethod.PerCounterInMunicipality)) { if (MunicipalityAdministrationAddress != null) { validator = ValidationFactory.CreateValidator <ServiceApplicantReceiptDataMunicipalityAdministrationAdress>(); } } //Задължителни полета, ако получаването е по поща else if (this.ServiceResultReceiptMethod.Equals(ServiceResultReceiptMethod.PerPostOfficeBox)) { if (string.IsNullOrEmpty(PostOfficeBox)) { message = string.Format(Resources.Terms._0006_000015, Resources.Fields._0008_000136, Resources.Sections._0009_000141); results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(message, this, "", "0006-000015", null)); } } //Задължителни полета, ако получаването е на друг адрес else if (this.ServiceResultReceiptMethod.Equals(ServiceResultReceiptMethod.PerCourierOthers)) { if (ApplicantAddress != null) { validator = ValidationFactory.CreateValidator <ServiceApplicantReceiptDataApplicantAdress>(); } } if (validator != null) { valResults = validator.Validate(Item); results.AddAllResults(valResults); } }
public override void Validate(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results) { base.ValidateBase(results); string msg = string.Empty; if (String.IsNullOrEmpty(BuildingCode)) { msg = "BuildingCode cannot be empty"; results.AddResult(new ValidationResult(msg, this, "BuildingCodeSelfValidation", "", null)); } if (String.IsNullOrEmpty(FloorCode)) { msg = "FloorCode cannot be empty"; results.AddResult(new ValidationResult(msg, this, "FloorCodeSelfValidation", "", null)); } }
public void ForeignEntityBasicDataValidation(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results) { //Проверка дали е попълно или OtherData //или Register и Identifier if (!(!string.IsNullOrEmpty(OtherData) ^ ( !string.IsNullOrEmpty(Register) && !string.IsNullOrEmpty(Identifier) ))) { results.AddResult(new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(Resources.Terms._0006_000072, this, "", "0006-000072", null)); } }
protected override void DoValidate(IEnumerable <MessageBase> objectToValidate, object currentTarget, string key, Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults validationResults) { ServiceContractModel scm = currentTarget as ServiceContractModel; if (scm == null) { return; } if (scm.ImplementationTechnology != null && !scm.ImplementationTechnology.Name.Equals(WCFExtension, StringComparison.OrdinalIgnoreCase) || scm.SerializerType != SerializerType.XmlSerializer) { return; } List <PrimitiveMessagePart> parts = new List <PrimitiveMessagePart>(); foreach (MessageBase message in objectToValidate) { if (message is XsdMessage) { continue; } if (!GetIsWrapped(message)) { foreach (MessagePart part in message.MessageParts) { PrimitiveMessagePart primitivePart = part as PrimitiveMessagePart; if (primitivePart != null) { if (parts.Count == 0) { parts.Add(primitivePart); } else { if (!IsValidPart(primitivePart, parts)) { validationResults.AddResult( new ValidationResult(this.MessageTemplate, objectToValidate, key, String.Empty, this) ); return; } } } } } } }