示例#1
0
 public Curricula()
 {
     personaAlta = new Persona();
     personaModificacion = new Persona();
     asignatura = new Asignatura();
     nivel = new Nivel();
     orientacion = new Orientacion();
 }
示例#2
0
文件: Curso.cs 项目: martinherr3/blpm
 public Curso()
 {
     listaAlumnos = new List<Alumno>();
     listaAsignaturas = new List<Asignatura>();
     nivel = new Nivel();
     preceptor = new Preceptor();
     orientacion = new Orientacion();
     cicloLectivo = new CicloLectivo();
 }
示例#3
0
        /// <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();
            }
        }
示例#4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AsignaturaNivel"/> class.
 /// </summary>
 public AsignaturaNivel()
 {
     asignatura = new Asignatura();
     nivel = new Nivel();
     orientacion = new Orientacion();
 }