public Curricula() { personaAlta = new Persona(); personaModificacion = new Persona(); asignatura = new Asignatura(); nivel = new Nivel(); orientacion = new Orientacion(); }
public Curso() { listaAlumnos = new List<Alumno>(); listaAsignaturas = new List<Asignatura>(); nivel = new Nivel(); preceptor = new Preceptor(); orientacion = new Orientacion(); cicloLectivo = new CicloLectivo(); }
/// <summary> /// Obteners the niveles BD transaccional. /// </summary> /// <param name="configuracion">The configuracion.</param> /// <returns></returns> public List<Nivel> obtenerNivelesBDTransaccional(Configuraciones configuracion) { List<Nivel> listaNiveles = null; try { using (MySqlCommand command = new MySqlCommand()) { conMySQL = new MySqlConnection(configuracion.valor); command.Connection = conMySQL; command.CommandText = @"SELECT * FROM nivel"; conMySQL.Open(); MySqlDataReader reader = command.ExecuteReader(); Nivel nivel; listaNiveles = new List<Nivel>(); while (reader.Read()) { nivel = new Nivel() { idNivelTransaccional = (int)reader["id"], nombre = reader["descripcion"].ToString() }; listaNiveles.Add(nivel); } command.Connection.Close(); return listaNiveles; } } catch (MySqlException ex) { throw new CustomizedException(String.Format("Fallo en {0} - obtenerNivelesBDTransaccional()", ClassName), ex, enuExceptionType.MySQLException); } catch (SqlException ex) { throw new CustomizedException(String.Format("Fallo en {0} - obtenerNivelesBDTransaccional()", ClassName), ex, enuExceptionType.SqlException); } catch (Exception ex) { throw new CustomizedException(String.Format("Fallo en {0} - obtenerNivelesBDTransaccional()", ClassName), ex, enuExceptionType.DataAccesException); } finally { //if (sqlConnectionConfig.State == ConnectionState.Open) // sqlConnectionConfig.Close(); } }
/// <summary> /// Initializes a new instance of the <see cref="AsignaturaNivel"/> class. /// </summary> public AsignaturaNivel() { asignatura = new Asignatura(); nivel = new Nivel(); orientacion = new Orientacion(); }