예제 #1
0
        public static void DescargarRAR(string ARuta, string ANombre, bool AEliminar)
        {
            string FRAR = Rutas.RutaTemporales() + "\\" + Archivos.ObtenerNombreTemporal() + ".rar";

            sgwNucleo.RAR.Funciones.Comprimir(ARuta, FRAR, "");
            sgwNucleo.Pagina.Descargar(FRAR, ANombre, AEliminar);
        }
예제 #2
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");
 }
예제 #3
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);
        }