コード例 #1
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();
 }
コード例 #2
0
 public PlanificacionAnual()
 {
     pendienteAprobacion = false;
     curricula = new Curricula();
     creador = new Persona();
     cicloLectivo = new CicloLectivo();
     listaTemasPlanificacion = new List<TemaPlanificacionAnual>();
     listaCursos = new List<CursoCicloLectivo>();
 }
コード例 #3
0
ファイル: DAObtenerDatos.cs プロジェクト: martinherr3/blpm
        /// <summary>
        /// Obteners the ciclo lectivo BD transaccional.
        /// </summary>
        /// <param name="configuracion">The configuracion.</param>
        /// <returns></returns>
        public List<CicloLectivo> obtenerCicloLectivoBDTransaccional(Configuraciones configuracion)
        {
            List<CicloLectivo> listaCicloLectivo = null;
            try
            {
                using (MySqlCommand command = new MySqlCommand())
                {
                    conMySQL = new MySqlConnection(configuracion.valor);
                    command.Connection = conMySQL;

                    command.CommandText = @"SELECT  *
                                            FROM ciclolectivo";
                    conMySQL.Open();

                    MySqlDataReader reader = command.ExecuteReader();
                    CicloLectivo cicloLectivo;
                    listaCicloLectivo = new List<CicloLectivo>();
                    while (reader.Read())
                    {
                        cicloLectivo = new CicloLectivo()
                        {
                            idCicloLectivoTransaccional = (int)reader["id"],
                            nombre = reader["descripcion"].ToString(),
                            fechaInicio = (DateTime)reader["fecha_inicio"],
                            fechaFin = (DateTime)reader["fecha_fin"],
                            activo = Convert.ToBoolean(reader["actual"])
                        };
                        listaCicloLectivo.Add(cicloLectivo);
                    }
                    command.Connection.Close();
                    return listaCicloLectivo;
                }
            }
            catch (MySqlException ex)
            {
                throw new CustomizedException(String.Format("Fallo en {0} - obtenerCicloLectivoBDTransaccional()", ClassName),
                                        ex, enuExceptionType.MySQLException);
            }
            catch (SqlException ex)
            {
                throw new CustomizedException(String.Format("Fallo en {0} - obtenerCicloLectivoBDTransaccional()", ClassName),
                                    ex, enuExceptionType.SqlException);
            }
            catch (Exception ex)
            {
                throw new CustomizedException(String.Format("Fallo en {0} - obtenerCicloLectivoBDTransaccional()", ClassName),
                                    ex, enuExceptionType.DataAccesException);
            }
            finally
            {
                //if (sqlConnectionConfig.State == ConnectionState.Open)
                //    sqlConnectionConfig.Close();
            }
        }
コード例 #4
0
ファイル: CursoCicloLectivo.cs プロジェクト: martinherr3/blpm
 /// <summary>
 /// Initializes a new instance of the <see cref="CursoCicloLectivo"/> class.
 /// </summary>
 public CursoCicloLectivo()
 {
     curso = new Curso();
     cicloLectivo = new CicloLectivo();
 }