private bool Validar() { MyErrorProvider.Clear(); bool paso = true; if (string.IsNullOrWhiteSpace(ProfesorComboBox.Text)) { MyErrorProvider.SetError(ProfesorComboBox, "Debe de seleccionar un profesor valido"); ProfesorComboBox.Focus(); paso = false; } if (SemestreIdNumericUpDown.Value == 0) { MyErrorProvider.SetError(SemestreIdNumericUpDown, "Debe de introducir un semestre id"); SemestreIdNumericUpDown.Focus(); paso = false; } if (this.Detalle.Count == 0) { MyErrorProvider.SetError(EstudiantesDataGridView, "Debe de seleccionar una asignatura con estudiantes"); EstudiantesDataGridView.Focus(); paso = false; } return(paso); }
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(); }