Ejemplo n.º 1
0
        public IQueryable estudiantesPorCarrera([FromBody] IdPrograma data)
        {
            var query =
                from carrera in context.CARRERA_ESTUDIANTE
                join programa in context.TBL_PROGRAMA_ACADEMICO on carrera.strCodCarrera equals programa.strCodCarrera
                join persona in context.TBL_PERSONA on carrera.strCodEstudiante equals persona.strCodEstudiante
                where persona.strCodEstudiante != null && programa.intIdPrograma == data.idPrograma &&
                carrera.strEstadoCarrEstud == "A" &&
                persona.strEstadoPersona == "A"
                select new
            {
                idPersona = persona.intIdPersona,
                nombres   = persona.strNombres,
                apellidos = persona.strApellidos,
                email     = persona.strEmail
            };

            return(query.Distinct().OrderBy(x => x.nombres + " " + x.apellidos));
        }
Ejemplo n.º 2
0
        public void MetodoActualizarFicha(string IdFicha)
        {
            try
            {
                ConnectionBD  Puente;
                SqlCommand    Comando;
                SqlDataReader Lector;
                Puente  = new ConnectionBD();
                Comando = new SqlCommand("select * from Ficha where IdFicha='" + IdFicha + "'", Puente.RetornarConnexion());
                Lector  = Comando.ExecuteReader();


                while (Lector.Read())
                {
                    DocumentoInstructor = Lector.GetString(1);
                    IdPrograma          = Lector.GetString(2);
                    Jornada             = Lector.GetString(3);
                    FechaInicio         = Lector.GetDateTime(4);
                    FechaFin            = Lector.GetDateTime(5);
                    Estado = Lector.GetString(6);
                }
                a = IdPrograma.ToString();
                if (a == "")
                {
                    existe = 1;
                }
                Lector.Close();
                Comando.Dispose();
                Puente.CerrarConnexion();
            }

            catch (Exception ex)
            {
                MessageBox.Show("la ficha no existe");
            }
        }