Ejemplo n.º 1
0
        private bool ValidaCampos()
        {
            if (TxtDenunciante.Text == string.Empty)
            {
                MessageBox.Show("o campo Denunciante deve ser preenchido", "Sistema Friend of the Owner", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                TxtDenunciante.Select();
                return(false);
            }
            if (TxtNomeLogradouro.Text == string.Empty)
            {
                MessageBox.Show("o campo logradouro deve ser preenchido", "Sistema Friend of the Owner", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                TxtNomeLogradouro.Select();
                return(false);
            }
            if (TxtEmail.Text == string.Empty)
            {
                MessageBox.Show("o campo Email deve ser preenchido", "Sistema Friend of the Owner", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                TxtEmail.Select();
                return(false);
            }
            if (TxtTestoDenuncia.Text == string.Empty)
            {
                MessageBox.Show("o campo Denuncia deve ser preenchido", "Sistema Friend of the Owner", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                TxtTestoDenuncia.Select();
                return(false);
            }
            if (TxtBairro.Text == string.Empty)
            {
                MessageBox.Show("o campo Bairro deve ser preenchido", "Sistema Friend of the Owner", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                TxtBairro.Select();
                return(false);
            }
            if (TxtCidade.Text == string.Empty)
            {
                MessageBox.Show("o campo Cidade deve ser preenchido", "Sistema Friend of the Owner", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                TxtCidade.Select();
                return(false);
            }

            return(true);
        }