示例#1
0
        public DataTable ListarVersion(int Codigo)
        {
            Conexion repo     = new Conexion();
            string   consulta = "select distinct T.Version from TareaVersion T where Codigo = " + Codigo;

            return(repo.Listar(consulta));
        }
示例#2
0
        public DataTable ListarTodosListado()
        {
            Conexion repo     = new Conexion();
            string   consulta = "select C.Codigo, C.Descripcion, C.Responsable from Curso C where C.Codigo <> 0 order by Codigo asc";

            return(repo.Listar(consulta));
        }
示例#3
0
        public DataTable ListarTodos()
        {
            Conexion repo     = new Conexion();
            string   consulta = "select * from Sector order by Codigo asc";

            return(repo.Listar(consulta));
        }
示例#4
0
        public DataTable ListarTemas()
        {
            Conexion repo     = new Conexion();
            string   consulta = "select * from Tema order by Tema asc";

            return(repo.Listar(consulta));
        }
示例#5
0
        public DataTable ListarTodos()
        {
            Conexion repo     = new Conexion();
            string   consulta = "select * from ResponsableSac order by Codigo";

            return(repo.Listar(consulta));
        }
示例#6
0
        public DataTable ListarCursos(int Codigo)
        {
            Conexion repo     = new Conexion();
            string   consulta = "select C.codigo, C.descripcion, T.NecesariaCurso, T.DeseableCurso from Tarea T inner join Curso C on C.codigo = T.Curso where T.Codigo = " + Codigo;

            return(repo.Listar(consulta));
        }
示例#7
0
        public DataTable ListarLegajosPorPerfil(int Desde, int Hasta)
        {
            Conexion repo     = new Conexion();
            string   consulta = "SELECT distinct L.Perfil, L.ImprePerfil, L.Codigo, L.Descripcion, L.Version,  L.FechaVersion  FROM Legajo L where L.perfil between " + Desde + " and " + Hasta + " order by L.Perfil, L.Codigo desc";

            return(repo.Listar(consulta));
        }
示例#8
0
        public DataTable ListarCursadaCons(int Desde, int Hasta)
        {
            Conexion repo     = new Conexion();
            string   consulta = "SELECT  C.curso, C.Legajo, C.Horas, C.Fecha, C.Clave, C.Tema, C.Ano FROM Cursadas C where C.Ano>= " + Desde + " and C.Ano <= " + Hasta + " order by Clave";

            return(repo.Listar(consulta));
        }
示例#9
0
        public DataTable ListarTodos()
        {
            Conexion repo     = new Conexion();
            string   consulta = "SELECT * FROM Curso WHERE Codigo > 0 ORDER BY Codigo";

            return(repo.Listar(consulta));
        }
示例#10
0
        public DataTable ListarTodosPrincipal()
        {
            Conexion repo     = new Conexion();
            string   consulta = "SELECT Codigo, Descripcion, TemaI, TemaII, TemaIII, Responsable, Horas, Tipo, ResponsableII, ResponsableIII, ResponsableIV FROM Curso WHERE Codigo > 0 ORDER BY Codigo";

            return(repo.Listar(consulta));
        }
示例#11
0
        public DataTable ListarPorLegajo(int LegajoDesd, int legajoHast)
        {
            Conexion repo     = new Conexion();
            string   consulta = "select Cu.Legajo, Cu.DesLegajo, Cu.Curso, Cu.DesCurso, Cu.Tema, Cu.DesTema, Cu.Horas, Cu.Codigo, Cu.Fecha, cu.Observaciones ,  CASE WHEN Cu.TipoCursada = 0 THEN 'Si' ELSE 'No' END as Planificada, cu.OrdFecha  from Cursadas Cu where Cu.Legajo >= " + LegajoDesd + " and Cu.Legajo <= " + legajoHast;

            return(repo.Listar(consulta));
        }
示例#12
0
        public DataTable ListarTemasPlani()
        {
            Conexion repo     = new Conexion();
            string   consulta = "Select C.codigo, C.Descripcion from Curso C order by Codigo";

            return(repo.Listar(consulta));
        }
示例#13
0
        public DataTable ListarHorasRealizadas()
        {
            Conexion repo     = new Conexion();
            string   consulta = "select C.DesLegajo, C.Legajo, C.Realizado  from Cronograma C";

            return(repo.Listar(consulta));
        }
示例#14
0
        public DataTable ListaPorTema(int Curso)
        {
            Conexion repo     = new Conexion();
            string   consulta = "select * from Tema where Curso = " + Curso;


            return(repo.Listar(consulta));
        }
示例#15
0
        public DataTable ListarTodos()
        {
            Conexion repo = new Conexion();
            //string consulta = "SELECT T.Clave, T.Tema, C.Descripcion as CursoDesc, T.Descripcion, T.Curso, T.Horas FROM Tema T INNER JOIN Curso C ON C.Codigo = T.Curso WHERE T.Curso > 0 ORDER BY T.Clave";
            string consulta = "SELECT Codigo as Tema, LTRIM(RTRIM(Descripcion)) as Descripcion FROM Curso WHERE Descripcion <> '' Order by Codigo";

            return(repo.Listar(consulta));
        }
示例#16
0
        public DataTable _BuscarLegajo(object Legajo, string Columnas = "*")
        {
            Conexion  repo     = new Conexion();
            string    consulta = "select " + Columnas + " FROM Legajo WHERE Codigo = '" + Legajo + "' ORDER BY Renglon";
            DataTable Dt       = repo.Listar(consulta);

            return(Dt);
        }
示例#17
0
        public DataTable ListarTodos()
        {
            Conexion  repo     = new Conexion();
            string    consulta = "select * from Legajo where Renglon = 1 order by Descripcion, Codigo, VigenciaOrd";
            DataTable Dt       = repo.Listar(consulta);

            return(Dt);
        }
示例#18
0
        public DataTable ListarTodosParaGrilla()
        {
            Conexion  repo     = new Conexion();
            string    consulta = "SELECT Clave, Codigo, Descripcion, FechaVersion, Perfil = Perfil * 1, Sector = Sector * 1, Dni, FEgreso, Actualizado, VigenciaOrd = VigenciaOrd * 1 FROM Legajo WHERE Renglon = 1 ORDER BY Descripcion, Codigo, VigenciaOrd";
            DataTable Dt       = repo.Listar(consulta);

            return(Dt);
        }
示例#19
0
        public DataTable ListarLegajosDiscriminado(string WNombrePersonal)
        {
            Conexion  repo     = new Conexion();
            string    consulta = "SELECT Legajo.Codigo, Legajo.Descripcion, Legajo.FechaVersion as Vigencia, Legajo.Perfil, Perfil.Sector, Grisar = CASE Legajo.FEgreso WHEN '  /  /    ' THEN 'N' WHEN '00/00/0000' THEN 'N' WHEN NULL THEN 'N' ELSE 'S' END FROM Legajo, Tarea as Perfil WHERE Legajo.Perfil = Perfil.Codigo AND Perfil.Renglon = 1 AND Legajo.Renglon = 1 AND Legajo.Descripcion = '" + WNombrePersonal.Trim() + "' ORDER BY Legajo.Descripcion, Legajo.Codigo, Legajo.VigenciaOrd";
            DataTable Dt       = repo.Listar(consulta);

            return(Dt);
        }
示例#20
0
        public DataTable ListarPorResponsable(string Resp)
        {
            Conexion repo     = new Conexion();
            string   consulta = "select C.Codigo, C.Descripcion, C.Responsable from Curso C where C.Codigo <> 0 and C.Responsable = '" + Resp + "' order by Codigo asc";


            return(repo.Listar(consulta));
        }
示例#21
0
        public DataTable ListarCursadaCons3(string Desde, string Hasta, int Curso)
        {
            Conexion repo = new Conexion();
            //string consulta = "SELECT  C.curso, C.Legajo, C.Clave, C.Ano FROM Cursadas C where C.Ano>= " + Desde + " and C.Ano <= " + Hasta + " order by Clave";
            string consulta = "SELECT  C.curso, C.Legajo, C.Clave, Ano = RIGHT(C.Fecha, 4), C.Fecha FROM Cursadas C where C.OrdFecha >= '" + Desde + "' and C.OrdFecha <= '" + Hasta + "' And Curso = '" + Curso + "' order by Clave";

            return(repo.Listar(consulta));
        }
示例#22
0
        public DataTable ListarCursoporSector(int SectorDesd, int SectorHast, int FechaDesde, int FechaHasta)
        {
            Conexion repo     = new Conexion();
            string   consulta = "select C.Sector, S.Descripcion, C.Legajo, C.DesLegajo, C.Curso, C.DesCurso, C.Tema, C.DesTema, C.Horas, C.Codigo, C.Fecha, C.Observaciones,  CASE WHEN C.TipoCursada = 0 THEN 'Si' ELSE 'No' END as Planificada  from Cursadas C inner join Sector S on S.Codigo = C.Sector where C.Sector >= " + SectorDesd + " and C.Sector <= " + SectorHast + " and OrdFecha > = " + FechaDesde + " and OrdFecha < = " + FechaHasta + "Order by Curso desc";


            return(repo.Listar(consulta));
        }
示例#23
0
        public DataTable ListarCursoporTema(int TemaDesd, int TemajoHast, int FechaDesde, int FechaHasta)
        {
            Conexion repo     = new Conexion();
            string   consulta = "select C.Curso, Cu.Descripcion, C.Tema, T.Descripcion, C.Legajo, l.Descripcion, C.Horas, C.Codigo, C.Fecha, C.Observaciones,  CASE WHEN C.TipoCursada = 0 THEN 'Si' ELSE 'No' END as Planificada from Cursadas C LEFT OUTER JOIN Legajo l ON l.Codigo = C.Legajo AND l.Renglon = 1 LEFT OUTER JOIN Tema Cu ON Cu.Curso = c.Tema AND Cu.Tema = C.Curso LEFT OUTER JOIN Curso T ON T.Codigo = C.Curso where C.Curso >= " + TemaDesd + " and C.Curso <= " + TemajoHast + " and C.OrdFecha > = " + FechaDesde + " and C.OrdFecha < = " + FechaHasta;


            return(repo.Listar(consulta));
        }
示例#24
0
        public DataTable ListarInformeCons(string DesdeFecha, string HastaFecha, int DesdeTipo, int HastaTipo, string CondicionesExtras = "")
        {
            Conexion repo     = new Conexion();
            string   consulta = "SELECT C.Codigo, C.Curso, C.Fecha, C.OrdFecha, C.Horas, C.Legajo, RTRIM(L.Descripcion) As DesLegajo, C.Observaciones, C.TipoCursada, C.Tema, T.Descripcion, Cur.Descripcion, L.Dni from Cursadas C LEFT OUTER JOIN Tema Cur ON Cur.Curso = c.Curso AND Cur.Tema = C.Tema LEFT OUTER JOIN Curso T ON T.Codigo = C.Curso LEFT OUTER JOIN Legajo L ON L.Codigo = C.Legajo AND L.Renglon = 1 where C.OrdFecha >= '"
                                + DesdeFecha + "' and C.OrdFecha <= '" + HastaFecha + "' and C.Legajo >= 0 and C.Legajo <= 999999 and C.TipoCursada >= " +
                                DesdeTipo + " and C.TipoCursada <= " + HastaTipo + CondicionesExtras;

            return(repo.Listar(consulta));
        }
示例#25
0
        public DataTable ListarTodosInicio()
        {
            Conexion repo     = new Conexion();
            string   consulta = "SELECT T.Codigo, T.Descripcion as Perfil,T.Vigencia,T.Version, " +
                                "S.Descripcion as Sector, T.TareasI as Descripcion " +
                                "FROM Tarea T LEFT OUTER JOIN Sector S on S.Codigo = T.Sector " +
                                "where T.Renglon = 1   order by T.Codigo asc";

            return(repo.Listar(consulta));
        }
示例#26
0
        public DataTable BuscarPorLegajo(int Legajo)
        {
            Conexion Repo     = new Conexion();
            string   consulta = "select Curso, DesCurso, Horas, TipoII, Ano, DesTema " +
                                "from cursadas where Legajo = " + Legajo + "  order by ordfecha desc";

            DataTable DT = Repo.Listar(consulta);

            return(DT);
        }
示例#27
0
        public DataTable ListarPorLegajo(int LegajoDesd, int legajoHast, int FechaDesde, int FechaHasta, string WTipoCursada)
        {
            if (WTipoCursada.Trim() != "")
            {
                WTipoCursada = " AND Cu.TipoCursada = '" + WTipoCursada + "'";
            }

            Conexion repo     = new Conexion();
            string   consulta = "select Cu.Legajo, Cu.DesLegajo, Cu.Curso, Cu.DesCurso, Cu.Tema, Cu.DesTema, Cu.Horas, Cu.Codigo, Cu.Fecha, cu.Observaciones ,  CASE WHEN Cu.TipoCursada = 0 THEN 'Si' ELSE 'No' END as Planificada, cu.OrdFecha  from Cursadas Cu where Cu.OrdFecha BETWEEN '" + FechaDesde + "' And '" + FechaHasta + "' And Cu.Legajo >= " + LegajoDesd + " and Cu.Legajo <= " + legajoHast + WTipoCursada;

            return(repo.Listar(consulta));
        }
示例#28
0
        public DataTable ListarCursoporSector(int SectorDesd, int SectorHast, int FechaDesde, int FechaHasta, string WTipoCursada)
        {
            Conexion repo = new Conexion();

            if (WTipoCursada.Trim() != "")
            {
                WTipoCursada = " AND C.TipoCursada = '" + WTipoCursada + "'";
            }

            string consulta = "select L.Sector, S.Descripcion, C.Legajo, DesLegajo = RTRIM(L.Descripcion), C.Curso, C.DesCurso, C.Tema, C.DesTema, C.Horas, C.Codigo, C.Fecha, C.Observaciones,  CASE WHEN C.TipoCursada = 0 THEN 'Si' ELSE 'No' END as Planificada  from Cursadas C INNER JOIN Legajo L ON L.Codigo = C.Legajo And L.Renglon = 1 inner join Sector S on S.Codigo = L.Sector where L.Sector >= " + SectorDesd + " and L.Sector <= " + SectorHast + " and C.OrdFecha > = " + FechaDesde + " and C.OrdFecha < = " + FechaHasta + "" + WTipoCursada + " Order by C.Curso desc";

            return(repo.Listar(consulta));
        }
示例#29
0
        public DataTable ListarCursoNoRealizadosporTema(int TemaDesd, int TemajoHast, int FechaDesde, int FechaHasta, bool WExcluir99)
        {
            Conexion repo = new Conexion();
            //string consulta = "select Cr.Curso, Cu.Descripcion, Cr.Tema, T.Descripcion, Cr.Legajo, l.Descripcion, Cr.Horas, Codigo = 0, Fecha = '  /  /    ', Cr.Observaciones,  Planificada = '' from Cronograma Cr LEFT JOIN Cursadas C ON C.Legajo = Cr.Legajo AND C.Curso = Cr.Curso AND C.Tema = Cr.Tema LEFT JOIN Legajo l ON l.Codigo = Cr.Legajo AND l.Renglon = 1 LEFT OUTER JOIN Tema Cu ON Cu.Curso = cr.Curso AND Cu.Tema = Cr.Tema LEFT OUTER JOIN Curso T ON T.Codigo = Cr.Curso where (C.Curso IS NULL OR C.Tema IS NULL) And  Cr.Curso >= " + TemaDesd + " and Cr.Curso <= " + TemajoHast + " and C.OrdFecha > = " + FechaDesde + " and C.OrdFecha < = " + FechaHasta;
            string consulta = "select distinct Cr.Curso, Cu.Descripcion, Cr.Tema, T.Descripcion, Cr.Legajo, l.Descripcion, Cr.Horas, Codigo = 0, Fecha = '  /  /    ', Cr.Observaciones,  Planificada = '' from Cronograma Cr LEFT JOIN Legajo l ON l.Codigo = Cr.Legajo AND l.Renglon = 1 LEFT OUTER JOIN Tema Cu ON Cu.Curso = cr.Curso AND Cu.Tema = Cr.Tema LEFT OUTER JOIN Curso T ON T.Codigo = Cr.Curso  LEFT JOIN Cursadas C ON C.Legajo = Cr.Legajo AND C.Curso = Cr.Curso And c.Tema = cr.Tema And C.OrdFecha >= '" + FechaDesde + "' and C.OrdFecha <= '" + FechaHasta + "'  where (c.Curso IS NULL Or c.Tema IS NULL or c.Legajo IS NULL) And Cr.Curso >= '" + TemaDesd + "' and Cr.Curso <= '" + TemajoHast + "' and cr.tema > 0 And cr.Ano BETWEEN '" + FechaDesde.ToString().Substring(0, 4) + "' And '" + FechaHasta.ToString().Substring(0, 4) + "' order by cr.legajo , cr.curso, cr.tema";

            if (WExcluir99)
            {
                consulta = "select distinct Cr.Curso, Cu.Descripcion, Cr.Tema, T.Descripcion, Cr.Legajo, l.Descripcion, Cr.Horas, Codigo = 0, Fecha = '  /  /    ', Cr.Observaciones,  Planificada = '' from Cronograma Cr LEFT JOIN Legajo l ON l.Codigo = Cr.Legajo AND l.Renglon = 1 LEFT OUTER JOIN Tema Cu ON Cu.Curso = cr.Curso AND Cu.Tema = Cr.Tema LEFT OUTER JOIN Curso T ON T.Codigo = Cr.Curso  LEFT JOIN Cursadas C ON C.Legajo = Cr.Legajo AND C.Curso = Cr.Curso And c.Tema = cr.Tema And C.OrdFecha >= '" + FechaDesde + "' and C.OrdFecha <= '" + FechaHasta + "'  where (c.Curso IS NULL Or c.Tema IS NULL or c.Legajo IS NULL) And Cr.Curso >= '" + TemaDesd + "' and Cr.Curso <= '" + TemajoHast + "' and cr.tema > 0 And cr.Ano BETWEEN '" + FechaDesde.ToString().Substring(0, 4) + "' And '" + FechaHasta.ToString().Substring(0, 4) + "' and cr.tema <> 99 order by cr.legajo , cr.curso, cr.tema";
            }

            return(repo.Listar(consulta));
        }
示例#30
0
        public DataTable BuscarUnoGrilla(string IdAModificar)
        {
            Conexion repo = new Conexion();
            //string consulta = "select cur.Curso as Tema, DesCurso = ISNULL(c.Descripcion, ''), cur.Horas, " +
            //" CASE WHEN cur.TipoII = 0 THEN 'Progra' ELSE 'No Progr' END as " +
            //" TipoII,  SUBSTRING(cur.ordFecha,0,5) as Ano,DesTema = ISNULL(t.Descripcion, '') " +
            //" from cursadas cur LEFT OUTER JOIN Curso c ON c.Codigo = cur.Curso LEFT OUTER JOIN Tema t ON t.Tema = cur.Tema AND t.Curso = c.Codigo where cur.legajo = " + IdAModificar +
            //" order by cur.Curso asc";

            string consulta = "select cur.Curso as TemaI, cur.DesCurso, sum(cur.Horas) Horas, CASE WHEN cur.TipoII = 0 THEN 'Progra' ELSE 'No Progr' END as TipoII, cur.Anoii as Ano, cur.DesTema from cursadas cur where cur.legajo = '" + IdAModificar + "' group by Curso, DesCurso, Anoii, tema, DesTema, tipoii order by Curso, anoii, tema";


            return(repo.Listar(consulta));
        }