示例#1
0
        protected void ibExcel_Click(object sender, ImageClickEventArgs e)
        {
            var dt = GetOperaciones(Convert.ToInt32(hdnBusqueda.Value));

            if (dt == null)
            {
                FuncionGlobal.alerta_updatepanel("Debe hacer una busqueda anteriormente para exportar.", Page, udp);
                return;
            }
            //creo el informe y obtengo su nombre
            var informe = new MatrizExcelBC().GetReporteHipotecario(Session["usrname"].ToString(), dt);

            //llamo al informe para ser abierto o guardado.
            var strAlerta = "window.open('http://sistema.agpsa.cl/Reportes_Excel/" + informe.Trim() + "');";

            ScriptManager.RegisterStartupScript(this.UpdatePanel1, UpdatePanel1.GetType(), "", strAlerta, true);
        }
示例#2
0
        protected void ibExcel_Click(object sender, ImageClickEventArgs e)
        {
            try
            {
                var usuario = dlUsuario.SelectedValue;
                var dt      = GetOperacion(usuario);

                if (dt == null)
                {
                    FuncionGlobal.alerta_updatepanel("Ups! Debes hacer una busqueda anteriormente para exportar.", Page, udp);
                    return;
                }
                //creo el informe y obtengo su nombre
                var informe = new MatrizExcelBC().GetReporteCertificados(Session["usrname"].ToString(), dt);

                //llamo al informe para ser abierto o guardado.
                var strAlerta = "window.open('http://sistema.agpsa.cl/Reportes_Excel/" + informe.Trim() + "');";
                ScriptManager.RegisterStartupScript(UpdatePanel1, UpdatePanel1.GetType(), "", strAlerta, true);
            }
            catch (Exception ex)
            {
                Mensajes("Rayos! Se generó el siguiente error: " + ex.Message, Enums.TiposMensajes.Error);
            }
        }