void cargarMatricula() { try { NMatricula n = new NMatricula(); List <EMatricula> lista = n.ListaMatriculas(); var nuevaLista = (from i in lista select new { i.MatriculaId, i.FechaMatricula, i.Alumnos.AlumnoId, i.Alumnos.Nombres, i.Ciclo.ciclo, i.Grados.Grado, i.seccion, i.Turno.Turno, i.Colegio, i.Repitente }).ToList(); gridControl1.DataSource = nuevaLista; gridView1.Columns[1].Group(); gridView1.BestFitColumns(); } catch (Exception ex) { throw ex; } }
public override int GetHashCode() { int hashCode = -1279667324; hashCode = hashCode * -1521134295 + NMatricula.GetHashCode(); return(hashCode); }
private void btningresar_Click(object sender, EventArgs e) { try { if (modificar == 0) { if (txtNombre.Text != "" || txtApellido.Text != "") { DialogResult mensaje = MessageBox.Show("¿Estas seguro de Matricular a " + txtNombre.Text + " en el " + cbmGrados.Text, " SGA", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (mensaje == DialogResult.OK) { EMatricula matricula = new EMatricula(); matricula.Alumnos.AlumnoId = Convert.ToInt32(txtNombre.Tag); matricula.Grados.GradoId = Convert.ToInt32(cbmGrados.SelectedValue.ToString()); matricula.seccion = comboBox1.SelectedValue.ToString(); matricula.Repitente = chkrepitente.Checked ? "SI" : "NO"; matricula.Turno.TurnoId = Convert.ToInt32(cbmTurnos.SelectedValue.ToString()); //if (cbmColegio.SelectedItem != null) // matricula.ColegioId = Convert.ToInt32(cbmColegio.SelectedValue.ToString()); //else // matricula.ColegioId = null; matricula.ColegioId = chkPrimerIngreso.Checked ? Convert.ToInt32(cbmColegio.SelectedValue.ToString()) : 0; NMatricula n = new NMatricula(); n.IngresarMatricula(matricula); MessageBox.Show("Matricula ingresada con exito", "SGA", MessageBoxButtons.OK, MessageBoxIcon.Information); Limpiar(); } } else { MessageBox.Show("No hay registro que guardar", "SGA", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } if (modificar == 1) { } } catch (Exception ex) { MessageBox.Show(ex.Message, "SGA", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void button1_Click(object sender, EventArgs e) { if (cbmTurnos.SelectedValue.ToString() != null) { int TurnoID = Convert.ToInt32(cbmTurnos.SelectedValue.ToString()); int GradoId = Convert.ToInt32(cbmGrados.SelectedValue.ToString()); NMatricula m = new NMatricula(); List <EAulas> lista = m.MostraVacantesLibres(TurnoID, GradoId); if (lista.Count > 0) { comboBox1.DataSource = lista; comboBox1.DisplayMember = "Capacidad"; comboBox1.ValueMember = "Aula"; } else { comboBox1.DataSource = null; } lblCapacidad.Text = ""; } }
public override int GetHashCode() { return(1687765875 + NMatricula.GetHashCode()); }