예제 #1
0
        private bool validar()
        {
            bool paso = true;

            if (EstudiantetextBox.Text == string.Empty)
            {
                MyerrorProvider1.SetError(EstudiantetextBox, "Llenar espacio en blanco ");
                EstudiantetextBox.Focus();
                paso = false;
            }
            if (ValortextBox.Text == string.Empty)
            {
                MyerrorProvider1.SetError(ValortextBox, "Llenar espacio en blanco ");
                ValortextBox.Focus();
                paso = false;
            }
            if (LogradotextBox.Text == string.Empty)
            {
                MyerrorProvider1.SetError(LogradotextBox, "Llenar espacio en blanco ");
                LogradotextBox.Focus();
                paso = false;
            }
            if (ValortextBox.Text == string.Empty)
            {
                MyerrorProvider1.SetError(ValortextBox, "Llenar espacio en blanco ");
                ValortextBox.Focus();
                paso = false;
            }
            return(paso);
        }
예제 #2
0
        private bool Validar()
        {
            bool realizado = true;

            if (string.IsNullOrWhiteSpace(EstudiantetextBox.Text))
            {
                errorProvider.SetError(EstudiantetextBox, "El campo Estudiante no debe estar vacio");
                EstudiantetextBox.Focus();
                realizado = false;
            }
            if (string.IsNullOrWhiteSpace(ValortextBox.Text) || Convert.ToDecimal(ValortextBox.Text) < 0)
            {
                errorProvider.SetError(ValortextBox, "El campo Valor no debe estar vacio \n El campo Logrado no debe ser menor que 0");
                ValortextBox.Focus();
                realizado = false;
            }
            if (string.IsNullOrWhiteSpace(LogradotextBox.Text) || Convert.ToDecimal(LogradotextBox.Text) < 0)
            {
                errorProvider.SetError(LogradotextBox, "El campo Logrado no debe estar vacio \n El campo Logrado no debe ser menor que 0");
                LogradotextBox.Focus();
                realizado = false;
            }

            return(realizado);
        }
예제 #3
0
        private bool Validar()
        {
            bool paso = true;

            if (string.IsNullOrWhiteSpace(Convert.ToString(FechadateTimePicker.Value)))
            {
                MyerrorProvider.SetError(FechadateTimePicker, "El campo Fecha no puede estar vacio");
                FechadateTimePicker.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(EstudiantetextBox.Text))
            {
                MyerrorProvider.SetError(EstudiantetextBox, "El campo Estudiante no puede estar vacio");
                EstudiantetextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(ValortextBox.Text))
            {
                MyerrorProvider.SetError(ValortextBox, "El campo Valor no puede estar vacio");
                ValortextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(LogradotextBox.Text))
            {
                MyerrorProvider.SetError(LogradotextBox, "El campo Logrado no puede estar vacio");
                LogradotextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(Convert.ToString(PronosticocomboBox.SelectedIndex)))
            {
                MyerrorProvider.SetError(PronosticocomboBox, "El campo Pronostico no puede estar vacio");
                PronosticocomboBox.Focus();
                paso = false;
            }


            if (Convert.ToDecimal(ValortextBox.Text) < 0 || Convert.ToDecimal(ValortextBox.Text) > 100)
            {
                MyerrorProvider.SetError(ValortextBox, "El campo Valor no puede tener un valor menor que 0 ni mayor que 100");
                ValortextBox.Focus();
                paso = false;
            }

            if (Convert.ToDecimal(LogradotextBox.Text) < 0 || Convert.ToDecimal(LogradotextBox.Text) > 100)
            {
                MyerrorProvider.SetError(LogradotextBox, "El campo Logrado no puede tener un valor menor que 0 ni mayor que 100");
                LogradotextBox.Focus();
                paso = false;
            }

            return(paso);
        }
        private bool Validar()
        {
            bool paso = true;

            if (string.IsNullOrWhiteSpace(EstudiantetextBox.Text))
            {
                MyerrorProvider.SetError(EstudiantetextBox, "El campo Estudiante no puede estar vacio");
                EstudiantetextBox.Focus();
                paso = false;
            }

            return(paso);
        }
예제 #5
0
        private bool Validar()
        {
            bool paso = true;

            MyerrorProvider.Clear();

            if (string.IsNullOrWhiteSpace(Convert.ToString(FechadateTimePicker.Value)))
            {
                MyerrorProvider.SetError(FechadateTimePicker, "El campo Fecha no puede estar vacio");
                FechadateTimePicker.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(EstudiantetextBox.Text))
            {
                MyerrorProvider.SetError(EstudiantetextBox, "El campo Estudiante no puede estar vacio");
                EstudiantetextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(ValortextBox.Text))
            {
                MyerrorProvider.SetError(ValortextBox, "El campo Valor no puede estar vacio");
                ValortextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(LogradotextBox.Text))
            {
                MyerrorProvider.SetError(LogradotextBox, "El campo Logrado no puede estar vacio");
                LogradotextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(Convert.ToString(PronosticocomboBox.Text)))
            {
                MyerrorProvider.SetError(PronosticocomboBox, "El campo Pronostico no puede estar vacio");
                PronosticocomboBox.Focus();
                paso = false;
            }

            return(paso);
        }
예제 #6
0
        private bool Validar()
        {
            MyerrorProvider.Clear();
            bool paso = true;

            if (EstudiantetextBox.Text == String.Empty)
            {
                MyerrorProvider.SetError(EstudiantetextBox, "No debe quedarse vacio");
                EstudiantetextBox.Focus();
                paso = false;
            }


            if (Convert.ToDecimal(ValortextBox.Text) < 0)
            {
                MyerrorProvider.SetError(ValortextBox, "Campo llenado incorrectamente");
                ValortextBox.Focus();
                paso = false;
            }

            if (Convert.ToDecimal(LogradotextBox.Text) < 0)
            {
                MyerrorProvider.SetError(LogradotextBox, "Campo llenado incorrectamente");
                LogradotextBox.Focus();
                paso = false;
            }

            if (Convert.ToDecimal(LogradotextBox.Text) > Convert.ToDecimal(ValortextBox.Text))
            {
                MyerrorProvider.SetError(LogradotextBox, "Campo llenado incorrectamente");
                MyerrorProvider.SetError(ValortextBox, "Campo llenado incorrectamente");
                LogradotextBox.Focus();
                ValortextBox.Focus();

                paso = false;
            }



            return(paso);
        }
예제 #7
0
        private bool Validar()
        {
            errorProvider1.Clear();
            bool paso = true;

            if (string.IsNullOrWhiteSpace(EstudiantetextBox.Text))
            {
                errorProvider1.SetError(EstudiantetextBox, "El campo estudiante no puede estar vacio");
                EstudiantetextBox.Focus();
                paso = false;
            }

            if (this.Detalle.Count == 0)
            {
                errorProvider1.SetError(DetalledataGridView, "Debe de agregar una categoria al detalle");
                DetalledataGridView.Focus();
                paso = false;
            }

            return(paso);
        }
예제 #8
0
        private bool Validar()
        {
            MyerrorProvider.Clear();
            bool paso = true;


            if (this.DetalleFac.Count == 0)
            {
                MyerrorProvider.SetError(FacturadataGridView, "El campo no puede estar vacio");
                ServicioscomboBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(EstudiantetextBox.Text))
            {
                MyerrorProvider.SetError(EstudiantetextBox, "Debe agregar algun estudiante");
                EstudiantetextBox.Focus();
                paso = false;
            }

            return(paso);
        }