protected InfReporte ObtenerInforme()
    {
        String reg = Session["userId"].ToString();

        DataRow    fila;
        DataTable  informacion = new DataTable();
        InfReporte datos       = new InfReporte();

        informacion = datos.Tables["Estudiante"]; // nombre de la tabla que cree en crystal en el InfReporte.xsd


        DaoUser estudiante = new DaoUser();

        DataTable Intermedio = estudiante.obtenerCertificadoEst(reg);


        for (int i = 0; i < Intermedio.Rows.Count; i++)
        {
            fila = informacion.NewRow();
            ///El primero [""]  es como se llama el campo de la tabla de crystal y el segundo [""] el campo de la tabla en postgres
            fila["Apellido"]  = Intermedio.Rows[i]["apellido_usua"].ToString();
            fila["Nombre"]    = Intermedio.Rows[i]["nombre_usua"].ToString();
            fila["Documento"] = int.Parse(Intermedio.Rows[i]["num_documento"].ToString());


            informacion.Rows.Add(fila);
        }
        return(datos);
    }
Ejemplo n.º 2
0
        //**************REPORTES**************REPORTES**************REPORTES**************REPORTES**************REPORTES**************REPORTES

        public InfReporte reporteAdmin(String urlCarpeta)
        {
            DataRow fila;

            DataTable  informacion = new DataTable();
            InfReporte datos       = new InfReporte();

            informacion = datos.Tables["Administrador"];

            DUser     administrador = new DUser();
            DataTable Intermedio    = administrador.obtenerAdministradores();

            for (int i = 0; i < Intermedio.Rows.Count; i++)
            {
                fila = informacion.NewRow();
                string foto = Path.GetFileName(Intermedio.Rows[i]["foto_usua"].ToString());
                ///El primero [""]  es como se llama el campo de la tabla de crystal y el segundo [""] el campo de la tabla en postgres
                fila["Apellido"]  = Intermedio.Rows[i]["apellido_usua"].ToString();
                fila["Nombre"]    = Intermedio.Rows[i]["nombre_usua"].ToString();
                fila["Documento"] = int.Parse(Intermedio.Rows[i]["num_documento"].ToString());
                fila["Telefono"]  = Intermedio.Rows[i]["telefono"].ToString();
                fila["Correo"]    = Intermedio.Rows[i]["correo"].ToString();
                fila["Foto"]      = streamFile(urlCarpeta + foto);

                informacion.Rows.Add(fila);
            }
            return(datos);
        }
Ejemplo n.º 3
0
        public InfReporte reporteDiploma(string urlCarpeta, UUser documento)
        {
            DataRow fila;

            DataTable  informacion = new DataTable();
            InfReporte datos       = new InfReporte();

            informacion = datos.Tables["EstudianteDiploma"];

            DUser     diploma    = new DUser();
            DataTable Intermedio = diploma.obtenerUsuarioMod(documento);

            for (int i = 0; i < Intermedio.Rows.Count; i++) // for para llenar la lista con cada usurario
            //// si es solo un dato como con el certificado de estudio, no se hace el for
            {
                fila = informacion.NewRow();
                string foto = Path.GetFileName(Intermedio.Rows[i]["foto_usua"].ToString());
                ///El primero [""]  es como se llama el campo de la tabla de crystal y el segundo [""] el campo de la tabla en postgres
                fila["Apellido"]  = Intermedio.Rows[i]["apellido_usua"].ToString();
                fila["Nombre"]    = Intermedio.Rows[i]["nombre_usua"].ToString();
                fila["Documento"] = int.Parse(Intermedio.Rows[i]["num_documento"].ToString());
                fila["Foto"]      = streamFile(urlCarpeta + foto);
                informacion.Rows.Add(fila);
            }
            return(datos);
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetNoStore();
        LLogin logica = new LLogin();
        UUser  usua   = new UUser();

        try
        {
            usua = logica.logAdminSecillo(Session["userId"].ToString());
            try
            {
                InfReporte reporte = ObtenerInforme();
                CRS_certificado.ReportDocument.SetDataSource(reporte);
                CRV_certificado.ReportSource = CRS_certificado;
            }
            catch (Exception)
            {
                throw;
            }
            Response.Redirect(usua.Url);
        }
        catch
        {
            try
            {
                usua.Session = Session["userId"].ToString();
            }
            catch
            {
                Response.Redirect("~/View/Estudiante/AccesoDenegado.aspx");
            }
        }
    }
    protected InfReporte ObtenerInforme()
    {
        DataRow    fila;
        DataTable  informacion = new DataTable();
        InfReporte datos       = new InfReporte();

        informacion = datos.Tables["Profesor"]; // nombre de la tabla que cree en crystal en el InfReporte.xsd


        DaoUser profesor = new DaoUser();

        DataTable Intermedio = profesor.obtenerprofesores();


        for (int i = 0; i < Intermedio.Rows.Count; i++) // for para llenar la lista con cada usurario
        //// si es solo un dato como con el certificado de estudio, no se hace el for
        {
            fila = informacion.NewRow();
            ///El primero [""]  es como se llama el campo de la tabla de crystal y el segundo [""] el campo de la tabla en postgres
            fila["Apellido"]  = Intermedio.Rows[i]["apellido_usua"].ToString();
            fila["Nombre"]    = Intermedio.Rows[i]["nombre_usua"].ToString();
            fila["Documento"] = int.Parse(Intermedio.Rows[i]["num_documento"].ToString());
            fila["Telefono"]  = Intermedio.Rows[i]["telefono"].ToString();
            fila["Correo"]    = Intermedio.Rows[i]["correo"].ToString();
            fila["Foto"]      = streamFile(Intermedio.Rows[i]["foto_usua"].ToString());

            informacion.Rows.Add(fila);
        }
        return(datos);
    }
    protected InfReporte ObtenerInforme()
    {
        DataRow    fila;
        DataTable  informacion = new DataTable();
        InfReporte datos       = new InfReporte();

        informacion = datos.Tables["Administrador"]; // nombre de la tabla que cree en crystal en el InfReporte.xsd


        DaoUser administrador = new DaoUser();

        DataTable Intermedio = administrador.obtenerAdministradores();


        for (int i = 0; i < Intermedio.Rows.Count; i++)
        {
            fila = informacion.NewRow();
            ///El primero [""]  es como se llama el campo de la tabla de crystal y el segundo [""] el campo de la tabla en postgres
            fila["Apellido"]  = Intermedio.Rows[i]["apellido_usua"].ToString();
            fila["Nombre"]    = Intermedio.Rows[i]["nombre_usua"].ToString();
            fila["Documento"] = int.Parse(Intermedio.Rows[i]["num_documento"].ToString());
            fila["Telefono"]  = Intermedio.Rows[i]["telefono"].ToString();
            fila["Correo"]    = Intermedio.Rows[i]["correo"].ToString();
            fila["Foto"]      = streamFile(Intermedio.Rows[i]["foto_usua"].ToString());

            informacion.Rows.Add(fila);
        }
        return(datos);
    }
    protected InfReporte ObtenerInforme()
    {
        DataRow    fila;
        DataTable  informacion = new DataTable();
        InfReporte datos       = new InfReporte();

        int curs;

        curs = Convert.ToInt16(Session["Cursoestu"]);

        informacion = datos.Tables["EstudianteCurso"]; // nombre de la tabla que cree en crystal en el InfReporte.xsd

        DaoUser profesor = new DaoUser();

        DataTable Intermedio = profesor.gEstudiante(curs);


        for (int i = 0; i < Intermedio.Rows.Count; i++) // for para llenar la lista con cada usurario
        //// si es solo un dato como con el certificado de estudio, no se hace el for
        {
            fila = informacion.NewRow();
            ///El primero [""]  es como se llama el campo de la tabla de crystal y el segundo [""] el campo de la tabla en postgres
            fila["Apellido"] = Intermedio.Rows[i]["apellido_usua"].ToString();
            fila["Nombre"]   = Intermedio.Rows[i]["nombre_usua"].ToString();


            informacion.Rows.Add(fila);
        }
        return(datos);
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         InfReporte reporte = ObtenerInforme();
         CRS_desdiploma.ReportDocument.SetDataSource(reporte);
         CrystalReportViewer1.ReportSource = CRS_desdiploma;
     }
     catch (Exception)
     {
         throw;
     }
 }
    protected InfReporte ObtenerInforme()
    {
        DataTable  informacion = new DataTable();
        InfReporte datos       = new InfReporte();

        informacion = datos.Tables["Administrador"]; // nombre de la tabla que cree en crystal en el InfReporte.xsd


        LUser administrador = new LUser();

        administrador.reporteAdmin(informacion);

        return(datos);
    }
    protected InfReporte ObtenerInforme()
    {
        DataTable  informacion = new DataTable();
        InfReporte datos       = new InfReporte();

        informacion = datos.Tables["Acudiente"]; // nombre de la tabla que cree en crystal en el InfReporte.xsd


        //LUser administrador = new LUser();
        LMUser logica = new LMUser();

        //administrador.reporteAcudiente(informacion);
        logica.reporteAcudiente(informacion);
        return(datos);
    }
    protected InfReporte ObtenerInforme()
    {
        DataTable  informacion = new DataTable();
        InfReporte datos       = new InfReporte();

        informacion = datos.Tables["Estudiante"]; // nombre de la tabla que cree en crystal en el InfReporte.xsd

        string documento = Session["userId"].ToString();;

        LMUser reporte = new LMUser();

        reporte.reporteCertidicadoEstudiante(informacion, documento);

        return(datos);
    }
    protected InfReporte ObtenerInforme()
    {
        DataTable  informacion = new DataTable();
        InfReporte datos       = new InfReporte();

        informacion = datos.Tables["EstudianteDiploma"]; // nombre de la tabla que cree en crystal en el InfReporte.xsd

        UUser usua = new UUser();

        usua.Documento = Session["documentoe"].ToString();

        LUser diploma = new LUser();

        diploma.reporteDiploma(informacion, usua);

        return(datos);
    }
    protected InfReporte ObtenerInforme()
    {
        DataTable  informacion = new DataTable();
        InfReporte datos       = new InfReporte();

        int curs;

        curs = Convert.ToInt16(Session["Cursoestu"]);

        informacion = datos.Tables["EstudianteCurso"]; // nombre de la tabla que cree en crystal en el InfReporte.xsd

        LUser estudiante = new LUser();

        estudiante.reporteEstudiante(informacion, curs);

        return(datos);
    }
Ejemplo n.º 14
0
    protected InfReporte ObtenerInforme()
    {
        //String reg =

        DataTable  informacion = new DataTable();
        InfReporte datos       = new InfReporte();

        informacion = datos.Tables["ProfesorCert"]; // nombre de la tabla que cree en crystal en el InfReporte.xsd

        string documento = Session["userId"].ToString();

        LUser logica = new LUser();

        logica.reporteCertificadoTrabajoProfe(informacion, documento);

        return(datos);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetNoStore();
        LLogin logica = new LLogin();
        UUser  usua   = new UUser();

        try
        {
            usua = logica.logAdminSecillo(Session["userId"].ToString());
            try
            {
                InfReporte reporte = ObtenerInforme();
                CRS_listaestcur.ReportDocument.SetDataSource(reporte);
                CrystalReportViewer1.ReportSource = CRS_listaestcur;
            }
            catch (Exception)
            {
                throw;
            }
            Response.Redirect(usua.Url);
        }
        catch
        {
            try
            {
                usua.Session = Session["userId"].ToString();
            }
            catch
            {
                Response.Redirect("~/View/Admin/AccesoDenegado.aspx");
            }
        }


        UIdioma  encId      = new UIdioma();
        LMIdioma idioma     = new LMIdioma();
        Int32    FORMULARIO = 45;
        LMUser   logicaper  = new LMUser();

        encId = idioma.obtIdioma(FORMULARIO, int.Parse(Session["idioma"].ToString()));

        Page.Title = encId.CompIdioma["Title"].ToString();
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     Response.Cache.SetNoStore();
     if (Session["userId"] != null)
     {
         try
         {
             InfReporte reporte = ObtenerInforme();
             CRS_certificado.ReportDocument.SetDataSource(reporte);
             CRV_certificado.ReportSource = CRS_certificado;
         }
         catch (Exception)
         {
             throw;
         }
     }
     else
     {
         Response.Redirect("AccesoDenegado.aspx");
     }
 }