示例#1
0
        private void Limpiar()
        {
            MyErrorProvider.Clear();
            FechaDateTimePicker.Value        = DateTime.Now;
            InscripcionIdNumericUpDown.Value = 0;
            SemestreIdNumericUpDown.Value    = 0;
            AsignaturasComboBox.ResetText();
            EstudianteIdMaskedTextBox.Text = string.Empty;
            NombreTextBox.Text             = string.Empty;
            CantidadEstudiantesLabel.Text  = "0";

            this.Detalle = new List <EstudiantesDetalles>();
            CargarGrid();
        }
示例#2
0
        private void Limpiar()
        {
            MyErrorProvider.Clear();
            AsistenciaIdNumericUpDown.Value = 0;
            SemestreIdNumericUpDown.Value   = 0;
            FechaDateTimePicker.Value       = DateTime.Now;
            ProfesorComboBox.ResetText();
            AsignaturasComboBox.ResetText();
            Presenteslabel.Text = "0";
            Ausenteslabel.Text  = "0";
            TotalLabel.Text     = "0";

            this.Detalle = new List <EstudiantesAsistenciasDetalles>();
            CargarGrid();
        }
示例#3
0
        private bool Validar()
        {
            MyErrorProvider.Clear();
            bool paso = true;

            if (string.IsNullOrWhiteSpace(AsignaturasComboBox.Text))
            {
                MyErrorProvider.SetError(AsignaturasComboBox, "Debe de seleccionar una asignatura");
                AsignaturasComboBox.Focus();
                paso = false;
            }

            if (this.Detalle.Count == 0)
            {
                MyErrorProvider.SetError(EstudiantesDataGridView, "Debe agregar algun estudiante");
                EstudiantesDataGridView.Focus();
                paso = false;
            }


            SemestreRepositorio repositorio = new SemestreRepositorio();

            Semestres semestre = repositorio.Buscar((int)SemestreIdNumericUpDown.Value);

            if (semestre == null)
            {
                MyErrorProvider.SetError(SemestreIdNumericUpDown, "Debe de insertar un id de un semestre valido");
                SemestreIdNumericUpDown.Focus();
                return(false);
            }

            if (!semestre.Activo)
            {
                MyErrorProvider.SetError(SemestreIdNumericUpDown, "Debe de insertar un id de un semestre activo");
                SemestreIdNumericUpDown.Focus();
                paso = false;
            }

            return(paso);
        }