Beispiel #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        tools             _tools = new tools();
        SecureQueryString QueryStringSeguro;

        QueryStringSeguro = new SecureQueryString(_tools.byteParaQueryStringSeguro(), Request["data"]);

        Decimal ID_HISTORIAL = Convert.ToDecimal(QueryStringSeguro["id_historial"]);

        Programa _prog = new Programa(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());

        DataTable tablaInfoHistorial = _prog.ObtenerRegistroHistorialReprogramacionActividad(ID_HISTORIAL);

        DataRow filaInfoHist = tablaInfoHistorial.Rows[0];

        Response.Clear();

        Response.AddHeader("content-disposition", string.Format("attachment;filename={0}", "ARCHIVO_REPROGRAMACION_" + ID_HISTORIAL.ToString() + filaInfoHist["ARCHIVO_EXTENSION"]));
        Response.ContentType = filaInfoHist["ARCHIVO_TYPE"].ToString().Trim();
        Response.BinaryWrite((byte[])filaInfoHist["ARCHIVO"]);
        Response.End();
    }