private bool ValidaCampos()
 {
     if (CboFuncao.Text == string.Empty)
     {
         MessageBox.Show("o campo deve ser preenchido", "Sistema Friend of the Owner", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         CboFuncao.Select();
         return(false);
     }
     if (TxtSenha.Text == string.Empty)
     {
         MessageBox.Show("o campo deve ser preenchido", "Sistema Friend of the Owner", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         TxtSenha.Select();
         return(false);
     }
     if (TxtNome.Text == string.Empty)
     {
         MessageBox.Show("o campo deve ser preenchido", "Sistema Friend of the Owner", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         TxtNome.Select();
         return(false);
     }
     if (TxtEmail.Text == string.Empty)
     {
         MessageBox.Show("o campo deve ser preenchido", "Sistema Friend of the Ownero", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         TxtEmail.Select();
         return(false);
     }
     //if (MskCelular.MaskCompleted)
     //{
     //    MessageBox.Show("o campo deve ser preenchido", "Sistema Friend of the Owner", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     //    MskCelular.Select();
     //    return false;
     //}
     return(true);
 }
Beispiel #2
0
 private bool ValidaCampos()
 {
     if (CboSituacao.Text == string.Empty)
     {
         MessageBox.Show("o campo deve ser preenchido", "Sistema Friend of the Owner", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         CboSituacao.Select();
         return(false);
     }
     if (TxtNome.Text == string.Empty)
     {
         MessageBox.Show("o campo deve ser preenchido", "Sistema Friend of the Owner", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         TxtNome.Select();
         return(false);
     }
     if (CboIdade.Text == string.Empty)
     {
         MessageBox.Show("o campo deve ser preenchido", "Sistema Friend of the Owner", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         CboIdade.Select();
         return(false);
     }
     if (CboTipoPet.Text == string.Empty)
     {
         MessageBox.Show("o campo deve ser preenchido", "Sistema Friend of the Owner", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         CboTipoPet.Select();
         return(false);
     }
     if (CboRaca.Text == string.Empty)
     {
         MessageBox.Show("o campo deve ser preenchido", "Sistema Friend of the Owner", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         CboRaca.Select();
         return(false);
     }
     if (CboSexo.Text == string.Empty)
     {
         MessageBox.Show("o campo deve ser preenchido", "Sistema Friend of the Owner", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         CboSexo.Select();
         return(false);
     }
     if (CboPorte.Text == string.Empty)
     {
         MessageBox.Show("o campo deve ser preenchido", "Sistema Friend of the Owner", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         CboPorte.Select();
         return(false);
     }
     if (CboCastrado.Text == string.Empty)
     {
         MessageBox.Show("o campo deve ser preenchido", "Sistema Friend of the Owner", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         CboCastrado.Select();
         return(false);
     }
     return(true);
 }