コード例 #1
0
        private bool Validar()
        {
            bool interruptor = true;

            if (string.IsNullOrEmpty(nombresTextBox.Text))
            {
                CamposVacioserrorProvider.SetError(nombresTextBox, "Llenar campo.");
                interruptor = false;
            }
            if (string.IsNullOrEmpty(sueldoMaskedTextBox.Text))
            {
                CamposVacioserrorProvider.SetError(sueldoMaskedTextBox, "Llenar campo.");
                interruptor = false;
            }
            if (RetencionesdataGridView.DataSource == null)
            {
                CamposVacioserrorProvider.SetError(RetencionesdataGridView, "Llenar campo.");
                interruptor = false;
            }
            if (TiposEmailsdataGridView.DataSource == null)
            {
                CamposVacioserrorProvider.SetError(TiposEmailsdataGridView, "Llenar campo.");
                interruptor = false;
            }

            return(interruptor);
        }
コード例 #2
0
        private bool Validar()
        {
            bool interruptor = true;

            if (string.IsNullOrEmpty(costoMaskedTextBox.Text))
            {
                CamposVacioserrorProvider.SetError(costoMaskedTextBox, "Por favor llenar el campo vacio.");
                interruptor = false;
            }
            if (string.IsNullOrEmpty(precioMaskedTextBox.Text))
            {
                CamposVacioserrorProvider.SetError(precioMaskedTextBox, "Por favor llenar el campo vacio.");
                interruptor = false;
            }
            if (string.IsNullOrEmpty(importeMaskedTextBox.Text))
            {
                CamposVacioserrorProvider.SetError(importeMaskedTextBox, "Por favor llenar el campo vacio.");
                interruptor = false;
            }
            if (string.IsNullOrEmpty(productosComboBox.Text))
            {
                CamposVacioserrorProvider.SetError(productosComboBox, "Por favor llenar el campo vacio.");
                interruptor = false;
            }

            return(interruptor);
        }
コード例 #3
0
        private bool Validar()
        {
            if (string.IsNullOrEmpty(descripcionTextBox.Text))
            {
                CamposVacioserrorProvider.SetError(descripcionTextBox, "El campo esta vacio.");
                return(false);
            }

            return(true);
        }
コード例 #4
0
        private bool Validar()
        {
            bool interruptor = true;

            if (string.IsNullOrEmpty(descripcionTextBox.Text))
            {
                CamposVacioserrorProvider.SetError(descripcionTextBox, "Llenar el campo vacio.");
                interruptor = false;
            }
            if (string.IsNullOrEmpty(valorMaskedTextBox.Text))
            {
                CamposVacioserrorProvider.SetError(valorMaskedTextBox, "Llenar el campo vacio.");
                interruptor = false;
            }

            return(interruptor);
        }
コード例 #5
0
        public bool Validar()
        {
            bool interruptor = true;

            if (string.IsNullOrEmpty(FiltrartextBox.Text))
            {
                CamposVacioserrorProvider.SetError(FiltrartextBox, "por favor llenar el campo.");
                interruptor = false;
            }
            if (string.IsNullOrEmpty(FiltrarcomboBox.Text))
            {
                CamposVacioserrorProvider.SetError(FiltrarcomboBox, "por favor seleccionar un campo.");
                interruptor = false;
            }

            return(interruptor);
        }