Beispiel #1
0
        public bool Validar()
        {
            if (string.IsNullOrEmpty(DescripcionrichTextBox.Text))
            {
                errorProvider1.SetError(DescripcionrichTextBox, "llena el campo de descripcion");
                return(false);
            }
            if (string.IsNullOrEmpty(CantidadnumericUpDown.ToString()))
            {
                errorProvider1.SetError(CantidadnumericUpDown, "llena el campo de cantidad");
                return(false);
            }
            if (string.IsNullOrEmpty(GrupoIdnumericUpDown.ToString()))
            {
                errorProvider1.SetError(GrupoIdnumericUpDown, "llenar el campo de grupos");
                return(false);
            }
            if (string.IsNullOrEmpty(gruposnumericUpDown.ToString()))
            {
                errorProvider1.SetError(gruposnumericUpDown, "llenar el campo de grupos");
                return(false);
            }

            return(true);
        }