Exemplo n.º 1
0
 private void ValidaNome(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results)
 {
     if (Nome != null && Nome.Length > 50)
     {
         Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult result =
               new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(Resource.Mensagem.Perfil_NomeTamanho, this, "Nome", null, null);
         results.AddResult(result);
     }
 }
Exemplo n.º 2
0
 private void ValidaCorpo(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results)
 {
     if (Corpo != null && Corpo.Length > 1000)
     {
         Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult result =
               new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(Resource.Mensagem.Email_CorpoTamanho, this, "Corpo", null, null);
         results.AddResult(result);
     }
 }
Exemplo n.º 3
0
 private void ValidaAssunto(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results)
 {
     if (Assunto != null && Assunto.Length > 50)
     {
         Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult result =
               new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(Resource.Mensagem.Email_AssuntoTamanho, this, "Assunto", null, null);
         results.AddResult(result);
     }
 }
Exemplo n.º 4
0
 private void ValidaDestinatario(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results)
 {
     if (Destinatario  != null && Destinatario.Length > 100)
     {
         Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult result =
               new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(Resource.Mensagem.Email_DestinatarioTamanho, this, "Destinatario", null, null);
         results.AddResult(result);
     }
 }
Exemplo n.º 5
0
 private void ValidaSenha(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results)
 {
     if (Senha != null && Senha.Length > 300)
     {
         Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult result =
               new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(Resource.Mensagem.Usuario_SenhaTamanho, this, "Senha", null, null);
         results.AddResult(result);
     }
 }
Exemplo n.º 6
0
 private void ValidaEmail(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results)
 {
     if (Email != null && Email.Length > 100)
     {
         Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult result =
               new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(Resource.Mensagem.Usuario_EmailTamanho, this, "Email", null, null);
         results.AddResult(result);
     }
 }
Exemplo n.º 7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ValidationFaultElement"/> class with data from <see cref="ValidationResult"/> object.
        /// </summary>
        /// <param name="result">The <see cref="ValidationResult"/> object to copy data from.</param>
        public ValidationFaultElement(
            ValidationResult result)
        {
            NestedValidationElements = new List <ValidationFaultElement>();

            if (result != null)
            {
                result.CopyTo(this);
            }
        }
 public void HandleValidationResult(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult result)
 {
 }