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));
            }
        }
Esempio n. 2
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);
     }
 }
Esempio n. 3
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);
     }
 }
Esempio n. 4
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);
     }
 }
Esempio n. 5
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);
     }
 }
Esempio n. 6
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);
     }
 }
Esempio n. 7
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);
     }
 }