Ejemplo n.º 1
0
        public Clases_1280x1024.Grupos UnGrupos(String idgrupo)
        {
            Sql = "select * from GRUPO where GRUPO.ID_GRupo = '" + idgrupo + "'";

            Clases_1280x1024.Grupos t = null;
            try
            {
                conectar.AbrirConexion();
                ejecutar1 = new SqlCommand(Sql, conectar.GetConexion);
                leer      = ejecutar1.ExecuteReader();
                while (leer.Read())
                {
                    t                 = new Clases_1280x1024.Grupos();
                    t.Id_grupo        = leer[0].ToString();
                    t.Jornada         = leer[1].ToString();
                    t.Id_Programa     = leer[2].ToString();
                    t.TrimestreActual = leer[3].ToString();
                    t.Id_Ambiente     = leer[4].ToString();
                    t.Id_Estado       = leer[5].ToString();
                    t.FechaInicio     = leer[6].ToString();
                }
                leer.Close();
            }
            catch (SqlException) { }
            return(t);
        }
Ejemplo n.º 2
0
        public List <Clases_1280x1024.Grupos> TodasLosGrupos(String idambiente)
        {
            List <Clases_1280x1024.Grupos> ta = new List <Clases_1280x1024.Grupos>();

            Sql = "select * from GRUPO where GRUPO.ID_AMBIENTE = '" + idambiente + "'";
            try
            {
                conectar.AbrirConexion();
                ejecutar1 = new SqlCommand(Sql, conectar.GetConexion);
                leer      = ejecutar1.ExecuteReader();
                while (leer.Read())
                {
                    Clases_1280x1024.Grupos t = new Clases_1280x1024.Grupos();
                    t.Id_grupo        = leer[0].ToString();
                    t.Jornada         = leer[1].ToString();
                    t.Id_Programa     = leer[2].ToString();
                    t.TrimestreActual = leer[3].ToString();
                    t.Id_Ambiente     = leer[4].ToString();
                    t.Id_Estado       = leer[5].ToString();
                    ta.Add(t);
                }
                leer.Close();
            }
            catch (SqlException) { }
            return(ta);
        }