Пример #1
0
 public static void MostrarPDF(string ARuta)
 {
     if (!Archivos.Existe(ARuta))
     {
         return;
     }
     HttpContext.Current.Session["SGW_ARCHIVO_RUTA"] = ARuta;
     AbrirFrame("/coneauglobal/mainframe/funciones/mostrar-pdf.aspx");
 }
Пример #2
0
        public static void Descargar(string ARuta, string ANombre, bool AEliminar)
        {
            if (!Archivos.Existe(ARuta))
            {
                return;
            }
            HttpContext.Current.Session["SGW_ARCHIVO_RUTA"]   = ARuta;
            HttpContext.Current.Session["SGW_ARCHIVO_NOMBRE"] = ANombre;
            if (AEliminar)
            {
                HttpContext.Current.Session["SGW_ARCHIVO_ELIMINAR"] = true;
            }
            else
            {
                HttpContext.Current.Session.Remove("SGW_ARCHIVO_ELIMINAR");
            }

            ScriptManager.RegisterStartupScript((System.Web.UI.Page)System.Web.HttpContext.Current.Handler, typeof(Page),
                                                "downloadFile",
                                                "<script language='javascript'>var elemIF = document.createElement('iframe'); " +
                                                "elemIF.src = '/coneauglobal/mainframe/funciones/descargar.aspx'; " +
                                                "elemIF.style.display = 'none'; " +
                                                "document.body.appendChild(elemIF);</script>", false);
        }