Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string nombreDocto     = Request.QueryString["NombreDocumento"];
                int    tipoInformacion = Convert.ToInt32(Request.QueryString["TipoDocumento"]);
                string directorio      = Server.MapPath("~/Users/General/");
                if (!IsPostBack)
                {
                    switch (tipoInformacion)
                    {
                    case (int)BusinessVariables.EnumTiposDocumento.Word:
                        Documentos.MostrarDocumento(nombreDocto, this, directorio);
                        break;

                    case (int)BusinessVariables.EnumTiposDocumento.PowerPoint:
                        Documentos.MostrarDocumento(nombreDocto, this, directorio);
                        break;

                    case (int)BusinessVariables.EnumTiposDocumento.Excel:
                        Documentos.MostrarDocumento(nombreDocto, this, directorio);
                        break;
                    }
                }
            }
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                string nombreDocto     = Request.QueryString["NombreDocumento"];
                int    tipoInformacion = Convert.ToInt32(Request.QueryString["TipoDocumento"]);
                string directorio      = Server.MapPath("~/General");
                if (!IsPostBack)
                {
                    switch (tipoInformacion)
                    {
                    case (int)BusinessVariables.EnumTiposDocumento.Word:
                        Documentos.MostrarDocumento(nombreDocto, Page, directorio);
                        break;

                    case (int)BusinessVariables.EnumTiposDocumento.PowerPoint:
                        Documentos.MostrarDocumento(nombreDocto, Page, directorio);
                        break;

                    case (int)BusinessVariables.EnumTiposDocumento.Excel:
                        Documentos.MostrarDocumento(nombreDocto, Page, directorio);
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                if (_lstError == null)
                {
                    _lstError = new List <string>();
                }
                _lstError.Add(ex.Message);
                AlertaGeneral = _lstError;
            }
        }