コード例 #1
0
        //public JsonResult ReporteEscenario(EscenarioRptBE entidad)
        //{
        //    ResponseEntity itemRespuesta = new ResponseEntity();
        //    string Archivo = Guid.NewGuid().ToString();
        //    entidad.ID_MEDMIT = 0;
        //    string NombreRpt = WebConfigurationManager.AppSettings["RutaTemp"] + "\\" + Archivo + ".pdf";
        //    if (new Reporte().GenerarPDFReporte(entidad, NombreRpt))
        //    {
        //        itemRespuesta.success = true;
        //        itemRespuesta.extra = NombreRpt;
        //    }
        //    else
        //    {
        //        itemRespuesta.success = false;
        //        itemRespuesta.extra = "";
        //    }
        //    return Respuesta(itemRespuesta);
        //}


        private void ReporteMedidaMitigacion()
        {
            string      rutatarget = ConfigurationManager.AppSettings["RutaReportes"].ToString();
            MedMitRptBE entidad    = new MedMitRptBE()
            {
                ID_MEDMIT = 0
            };

            ConfigurarReporte();
            rvReporte.LocalReport.ReportPath = string.Format("{0}\\rptMedMit.rdlc", rutatarget);
            List <MedMitRptBE> lbeReporte = ReporteLN.ListaMedMitRpt(entidad);

            ReportDataSource dataSource = new ReportDataSource("DtMedMit", lbeReporte);

            rvReporte.LocalReport.DataSources.Clear();
            rvReporte.LocalReport.DataSources.Add(dataSource);
            rvReporte.ServerReport.Refresh();
        }
コード例 #2
0
        public List <MedMitRptBE> ListaMedMitRpt(MedMitRptBE entidad)
        {
            List <MedMitRptBE> Lista = null;

            try
            {
                using (IDbConnection db = new OracleConnection(CadenaConexion))
                {
                    string sp = sPackage + "SP_SEL_MEDMIT_RPT";
                    var    p  = new OracleDynamicParameters();
                    p.Add("pIdMedMit", entidad.ID_MEDMIT);
                    p.Add("pCursor", dbType: OracleDbType.RefCursor, direction: ParameterDirection.Output);
                    Lista = db.Query <MedMitRptBE>(sp, p, commandType: CommandType.StoredProcedure).ToList();
                }
            }
            catch (Exception ex)
            {
                Log.Error(ex);
            }

            return(Lista);
        }
コード例 #3
0
 public static List <MedMitRptBE> ListaMedMitRpt(MedMitRptBE entidad)
 {
     return(reporteDA.ListaMedMitRpt(entidad));
 }