Exemple #1
0
 private void LimpiarCajas()
 {
     DireccionTextBox.Text = string.Empty;
     EmailTextBox.Text     = string.Empty;
     EmpresaTextBox.Text   = string.Empty;
     RucTextBox.Text       = string.Empty;
     TelefonoTextBox.Text  = string.Empty;
     RucTextBox.Focus();
 }
Exemple #2
0
        private bool ValidarCampos()
        {
            if (RucTextBox.Text == string.Empty)
            {
                errorProvider1.SetError(RucTextBox, "Ingrese el Número RUC");
                RucTextBox.Focus();
                return(false);
            }
            errorProvider1.Clear();

            if (EmpresaTextBox.Text == string.Empty)
            {
                errorProvider1.SetError(EmpresaTextBox, "Ingrese el Nombre de la Empresa");
                EmpresaTextBox.Focus();
                return(false);
            }
            errorProvider1.Clear();

            if (DireccionTextBox.Text == string.Empty)
            {
                errorProvider1.SetError(DireccionTextBox, "Ingrese la Dirección de la Empresa");
                DireccionTextBox.Focus();
                return(false);
            }
            errorProvider1.Clear();

            if (TelefonoTextBox.Text == string.Empty)
            {
                errorProvider1.SetError(TelefonoTextBox, "Ingrese el Teléfono de la Empresa");
                TelefonoTextBox.Focus();
                return(false);
            }
            errorProvider1.Clear();

            if (EmailTextBox.Text == string.Empty)
            {
                errorProvider1.SetError(EmailTextBox, "Ingrese el Correo de la Empresa");
                EmailTextBox.Focus();
                return(false);
            }
            errorProvider1.Clear();

            return(true);
        }