public DocentesCursosForm(ModoForm modo) : this() { this.ModoFormulario = modo; EspecialidadLogic oEspecialidad = new EspecialidadLogic(); Especialidades listaEspecialidades = oEspecialidad.GetAll(); this.cbEspecialidad.DataSource = listaEspecialidades; this.cbEspecialidad.SelectedValue = 0; PersonaLogic oProfesor = new PersonaLogic(); Personas listaProfesores = oProfesor.GetAll((int)Persona.TiposPersonas.Profesor); this.cbDocente.DataSource = listaProfesores; this.cbDocente.SelectedValue = 0; }
public void Listar(string tipo) { try { PersonaLogic pl = new PersonaLogic(); if (tipo == "Todos") this.dgvSeleccionarPersona.DataSource = pl.GetAll(); else if (tipo == "Alumnos") this.dgvSeleccionarPersona.DataSource = pl.GetAlumnos(); else if (tipo == "Docentes") this.dgvSeleccionarPersona.DataSource = pl.GetDocentes(); else if (tipo == "No docentes") this.dgvSeleccionarPersona.DataSource = pl.GetNoDocentes(); } catch (Exception ex) { this.Notificar("Error", ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public void Listar() { EspecialidadLogic e = new EspecialidadLogic(); this.dgvEspecialidades.DataSource = e.GetAll(); PlanLogic p = new PlanLogic(); this.dgvPlanes.DataSource = p.GetAll(); MateriaLogic m = new MateriaLogic(); this.dgvMaterias.DataSource = m.GetAll(); ComisionLogic co = new ComisionLogic(); this.dgvComisiones.DataSource = co.GetAll(); CursoLogic cu = new CursoLogic(); this.dgvCursos.DataSource = cu.GetAll(); PersonaLogic alu = new PersonaLogic(); this.dgvAlumnos.DataSource = alu.GetAll(0); PersonaLogic pro = new PersonaLogic(); this.dgvProfesores.DataSource = pro.GetAll(1); DocenteCursoLogic dc = new DocenteCursoLogic(); this.dgvDesignaciones.DataSource = dc.GetAll(); UsuarioLogic u = new UsuarioLogic(); this.dgvUsuarios.DataSource = u.GetAll(); }
public void Listar() { PersonaLogic pl = new PersonaLogic(); this.dgvPersonas.DataSource = pl.GetAll(); }
public override void MapearDeDatos() { //Muestro especialidad, plan, materia, comision segun la designacion EspecialidadLogic oEspecialidad = new EspecialidadLogic(); Especialidades listaEspecialidades = oEspecialidad.GetAll(); this.cbEspecialidad.DataSource = listaEspecialidades; PersonaLogic oProfesor = new PersonaLogic(); Personas listaProfesores = oProfesor.GetAll((int)Persona.TiposPersonas.Profesor); Persona profesor = oProfesor.GetOne(this.DocenteCursoActual.IDDocente, (int)Persona.TiposPersonas.Profesor)[0]; this.cbDocente.DataSource = listaProfesores; PlanLogic oPlan = new PlanLogic(); MateriaLogic oMateria = new MateriaLogic(); ComisionLogic oComision = new ComisionLogic(); CursoLogic oCurso = new CursoLogic(); Curso curso = oCurso.GetOne(this.DocenteCursoActual.IDCurso)[0]; Comision comision = oComision.GetOne(curso.IDComision)[0]; Materia materia = oMateria.GetOne(curso.IDMateria)[0]; Plan plan = oPlan.GetOne(materia.IDPlan)[0]; Especialidad esp = oEspecialidad.GetOne(plan.IDEspecialidad)[0]; Planes listaPlanes = oPlan.GetAllPorEspecialidad(esp.ID); Materias listaMaterias = oMateria.GetAllPorPlan(plan.ID); Comisiones listaComisiones = oComision.GetAllPorPlan(plan.ID); Cursos listaCursos = oCurso.GetAllPorMateriaComision(materia.ID, comision.ID); this.cbPlan.DataSource = listaPlanes; this.cbMateria.DataSource = listaMaterias; this.cbComision.DataSource = listaComisiones; this.cbCurso.DataSource = listaCursos; this.cbEspecialidad.SelectedValue = esp.ID; this.cbPlan.SelectedValue = plan.ID; this.cbMateria.SelectedValue = materia.ID; this.cbComision.SelectedValue = comision.ID; //Muestro demás datos this.txtId.Text = this.DocenteCursoActual.ID.ToString(); this.cbCurso.SelectedValue = this.DocenteCursoActual.IDCurso; this.cbDocente.SelectedValue = this.DocenteCursoActual.IDDocente; this.txtNombreDocente.Text = profesor.Apellido + ", " + profesor.Nombre; if(DocenteCursoActual.Cargo == DocenteCurso.TiposCargos.Profesor) this.rbTitular.Checked = true; else if(DocenteCursoActual.Cargo == DocenteCurso.TiposCargos.Auxiliar) this.rbAuxiliar.Checked = true; this.txtId.Text = this.DocenteCursoActual.ID.ToString(); if (ModoFormulario == ModoForm.Alta || ModoFormulario == ModoForm.Modificacion) { this.btnAsignar.Text = "Asignar"; } else if (ModoFormulario == ModoForm.Baja) { this.btnAsignar.Text = "Eliminar"; } else { this.btnAsignar.Text = "Aceptar"; } }