Ejemplo n.º 1
0
        public MODResultado Modificar(MODReporte reporte)
        {
            MODResultado resultado = new MODResultado();

            try
            {
                var data = FabricaDatos.CrearReporteDatos;
                resultado = data.Actualizar(reporte);
                ConfiguracionNegocio.RefrescarConfiguracion(EnumTipoConfiguracion.reportes);
                /*********************auditoria*****************************/
                MODReporte        anterior = ConfiguracionNegocio.Reportes.Where(x => x.Id == reporte.Id).FirstOrDefault();
                IAuditoriaNegocio audit    = FabricaNegocio.CrearAuditoriaNegocio;
                audit.CrearRastroAuditoria(EnumTipoAccionAuditoria.actualizar, reporte.Id.ToString(), "Reporte", anterior, reporte, reporte.Usuario, reporte.Ip);
                /**********************fin auditoria***********************/
            }
            catch (Exception e)
            {
                Log.WriteLog(e, "SIR.Negocio.Concretos.Reportes - Modificar",
                             String.Format(@"reporte:{0}", System.Text.Json.JsonSerializer.Serialize(reporte)),
                             ErrorType.Error);
                resultado.Errores.Add("COMUNES.ERRORSERVICIO");
            }

            return(resultado);
        }
Ejemplo n.º 2
0
        public MODResultado Registrar(MODReporte reporte)
        {
            MODResultado resultado = new MODResultado();

            try
            {
                var data = FabricaDatos.CrearReporteDatos;
                resultado = data.Registrar(reporte);

                ConfiguracionNegocio.RefrescarConfiguracion(EnumTipoConfiguracion.reportes);
                /*********************auditoria*****************************/
                IAuditoriaNegocio audit = FabricaNegocio.CrearAuditoriaNegocio;
                audit.CrearRastroAuditoria(EnumTipoAccionAuditoria.crear, reporte.Nombre, "Reporte", new MODReporte(), reporte, reporte.Usuario, reporte.Ip);
                /**********************fin auditoria***********************/
            }
            catch (Exception e)
            {
                Log.WriteLog(e, "SIR.Negocio.Concretos.Reportes - Registrar",
                             String.Format(@"reporte:{0}", System.Text.Json.JsonSerializer.Serialize(reporte)),
                             ErrorType.Error);
                resultado.Errores.Add("COMUNES.ERRORSERVICIO");
            }

            return(resultado);
        }
Ejemplo n.º 3
0
        public List <IDictionary <string, object> > Ejecutar(MODOrigenDatos origen, MODReporte reporte, ref MODResultado resultado)
        {
            List <IDictionary <string, object> > result = null;

            try
            {
                using (var coneccion = ObtenerConexion(origen.cadenaConexion, origen.TipoOrigen))
                {
                    origen.consulta = (origen.TipoOrigen == Comun.Enumeradores.EnumBaseDatosOrigen.Oracle)?origen.consulta.Replace("@periodo", ":periodo"):origen.consulta;
                    var lector = coneccion.ExecuteReader(origen.consulta,
                                                         ObtenerParametros(origen),
                                                         commandType: origen.tipoMando);
                    result = ConvertirADiccionario(ref lector, reporte.campos);
                    coneccion.Close();
                }
            }
            catch (Exception e)
            {
                Log.WriteLog(e, "SIR.Datos.Concretos.ConfiguracionOrigenDatos - Ejecutar",
                             String.Format(@"Origen:{0} - reporte:{1}", System.Text.Json.JsonSerializer.Serialize(origen),
                                           System.Text.Json.JsonSerializer.Serialize(reporte)),
                             ErrorType.Error);
                resultado.Errores.Add("COMUNES.ERRORSERVICIO");
            }
            return(result);
        }
Ejemplo n.º 4
0
        public override MODResultado Ejecutar(ref LinkedListNode <MODTarea> tarea, MODReporte reporte, MODArchivo archivo)
        {
            MODResultado resultado      = new MODResultado();
            var          _configuraicon = FabricaDatos.CrearConfiguracionOrigenDatos;
            var          _flujoTrabajo  = FabricaDatos.CrearFlujoTrabajoDatos;
            List <IDictionary <string, object> > error = null;

            if (tarea.Value.ConfiguracionBD != null)
            {
                tarea.Value.ConfiguracionBD.Parametros = CrearParametros(tarea.Value.ConfiguracionBD, _flujo);
                error = _configuraicon.Ejecutar(tarea.Value.ConfiguracionBD, reporte, ref resultado);
            }
            else if (!String.IsNullOrEmpty(tarea.Value.ConsultaFinal))
            {
                error = _flujoTrabajo.EjecutarScirpt(null, tarea.Value.ConsultaFinal, null);
            }
            if (error != null)
            {
                foreach (var e in error)
                {
                    resultado.Errores.Add(e["error"].ToString());
                }
            }
            return(resultado);
        }
Ejemplo n.º 5
0
        public override MODResultado Ejecutar(ref LinkedListNode <MODTarea> tarea, MODReporte reporte, MODArchivo archivo)
        {
            MODResultado resultado      = new MODResultado();
            var          _configuraicon = FabricaDatos.CrearConfiguracionOrigenDatos;
            var          _flujoTrabajo  = FabricaDatos.CrearFlujoTrabajoDatos;

            tarea.Value.ConfiguracionBD.Parametros = new Dictionary <string, object>();
            var _historico = new MODFlujoHistorico {
                Periodo = FijarPeriodoPorPeriodicidad(_flujo.Periodo, _flujo.Periodicidad, _flujo.DatoPeriodo), Periodicidad = tarea.Value.Periodicidad
            };

            if (tarea.Value.ConfiguracionBD.TipoOrigen == Comun.Enumeradores.EnumBaseDatosOrigen.SqlServer && tarea.Value.ConfiguracionBD.Sid == "SIR2")
            {
                tarea.Value.ConfiguracionBD.Parametros.Add("periodo", _historico.StrPeriodo);
            }
            else
            {
                tarea.Value.ConfiguracionBD.Parametros.Add("periodo", _historico.StrPeriodoOracle);
            }

            tarea.Next.Value.Registros = _configuraicon.Ejecutar(tarea.Value.ConfiguracionBD, reporte, ref resultado);

            if (tarea.Next.Value.Registros != null)
            {
                resultado = this.Registrar(tarea.Next, tarea.Value.Reporte);
            }
            if (!String.IsNullOrEmpty(tarea.Value.ConsultaFinal))
            {
                _flujoTrabajo.EjecutarScirpt(null, tarea.Value.ConsultaFinal, null);
            }

            return(resultado);
        }
Ejemplo n.º 6
0
        public MODResultado Actualizar(MODReporte reporte)
        {
            MODResultado resultado = new MODResultado();

            try
            {
                using (var conn = (SqlConnection)ObtenerConexionPrincipal())
                {
                    var _reporte = conn.Query("StpReporte", new
                    {
                        accion        = 2,
                        IdReporte     = reporte.Id,
                        Descripcion   = reporte.Nombre,
                        Norma         = reporte.Descripcion,
                        Activo        = reporte.Activo,
                        ActivoEmpresa = reporte.ActivoEmpresa,
                        IdEmpresa     = reporte.IdEmpresa,
                        IdServicio    = reporte.IdServicio,
                        EsReporte     = reporte.EsReporte
                    }, commandType: System.Data.CommandType.StoredProcedure).FirstOrDefault();

                    if (_reporte.IdReporte == 0)
                    {
                        Log.WriteLog(new Exception(_reporte.Error), "SIR.Datos.Concretos.Reporte - Registrar",
                                     String.Format(@"reporte:{0}", System.Text.Json.JsonSerializer.Serialize(reporte)),
                                     ErrorType.Error);
                        resultado.Errores.Add("COMUNES.ERRORSERVICIO");
                    }
                    else
                    {
                        reporte.campos.ForEach(x => {
                            x.IdEmpresa  = reporte.IdEmpresa;
                            x.IdServicio = reporte.IdServicio;
                            x.IdReporte  = _reporte.IdReporte;
                        });

                        List <MODCampos> _tablaCampos = new List <MODCampos>();
                        EstructuraTablaCampo(ref _tablaCampos);
                        var _tabla = ConvertirATabla(reporte.campos);
                        InsertarBloque(conn, "##CampoTemporal", _tablaCampos, _tabla);

                        conn.Query("StpReporte", new { accion     = 3,
                                                       IdEmpresa  = reporte.IdEmpresa,
                                                       IdServicio = reporte.IdServicio,
                                                       IdReporte  = reporte.Id }, commandType: System.Data.CommandType.StoredProcedure);
                        conn.Close();
                    }
                }
            }
            catch (Exception e)
            {
                Log.WriteLog(e, "SIR.Datos.Concretos.Reporte - Actualizar",
                             String.Format(@"reporte:{0}", System.Text.Json.JsonSerializer.Serialize(reporte)),
                             ErrorType.Error);
                resultado.Errores.Add("COMUNES.ERRORSERVICIO");
            }
            return(resultado);
        }
Ejemplo n.º 7
0
        public override MODResultado Ejecutar(ref LinkedListNode <MODTarea> tarea, MODReporte reporte, MODArchivo archivo)
        {
            MODResultado resultado = new MODResultado();
            var          data      = FabricaDatos.CrearFlujoTrabajoDatos;
            Dictionary <string, object> parametros = (Dictionary <string, object>)CrearParametros(tarea.Value.ConfiguracionBD, _flujo);

            tarea.Next.Value.Registros = data.EjecutarScirpt(tarea.Value.Reporte.campos, tarea.Value.ConsultaFinal, parametros);
            return(resultado);
        }
        private MODResultado Registrar(LinkedListNode <MODTarea> tarea, MODReporte reporte)
        {
            MODResultado resultado      = new MODResultado();
            var          _configuraicon = FabricaDatos.CrearConfiguracionOrigenDatos;

            reporte.campos        = AdicionarCamposControl(reporte.campos);
            tarea.Value.Registros = RegistrarCamposControl(tarea.Value.Registros, _flujo, tarea.Value.Id);
            resultado             = _configuraicon.ProcesarEstracion(tarea.Previous.Value.NombreTablaSIR, tarea.Value.Registros, reporte.campos);

            return(resultado);
        }
        public override MODResultado Ejecutar(ref LinkedListNode <MODTarea> tarea, MODReporte reporte, MODArchivo archivo)
        {
            MODResultado resultado      = new MODResultado();
            var          _configuraicon = FabricaDatos.CrearConfiguracionOrigenDatos;

            reporte.campos        = AdicionarCamposControl(reporte.campos);
            tarea.Value.Registros = RegistrarCamposControl(tarea.Value.Registros, _flujo, tarea.Value.Id);

            resultado = _configuraicon.ProcesarEstracion(tarea.Value.NombreTablaSIR, tarea.Value.Registros, reporte.campos);
            AisgnarRegistros(ref tarea);
            return(resultado);
        }
Ejemplo n.º 10
0
        public override MODResultado Ejecutar(ref LinkedListNode <MODTarea> tarea, MODReporte reporte, MODArchivo archivo)
        {
            MODResultado resultado = new MODResultado();
            var          data      = FabricaDatos.CrearFlujoTrabajoDatos;
            Dictionary <string, object> parametros = new Dictionary <string, object>();
            var _historico = new MODFlujoHistorico {
                Periodo = FijarPeriodoPorPeriodicidad(_flujo.Periodo, _flujo.Periodicidad, _flujo.DatoPeriodo), Periodicidad = _flujo.Periodicidad
            };

            parametros.Add("@periodo", _historico.StrPeriodo);
            tarea.Next.Value.Registros = data.EjecutarScirpt(tarea.Value.Reporte.campos, tarea.Value.ConsultaFinal, parametros);
            return(resultado);
        }
Ejemplo n.º 11
0
        public override MODResultado Ejecutar(ref LinkedListNode <MODTarea> tarea, MODReporte reporte, MODArchivo archivo)
        {
            MODResultado resultado = new MODResultado();

            try
            {
                ExprParser       ep                 = new ExprParser();
                LambdaExpression lambda             = null;
                List <string>    parametros_valores = null;

                foreach (var registro in tarea.Value.Registros)
                {
                    foreach (var _homolg in tarea.Value.Homologaciones)
                    {
                        if (_homolg.TipoReemplazo == Comun.Enumeradores.FlujoDeTrabajo.EnumTipoReemplazo.Constante)
                        {
                            registro[_homolg.NombreCampo] = ConvertirObjeto(_homolg.TipoCampo, _homolg.ValorSi);
                        }
                        else if (_homolg.TipoReemplazo == Comun.Enumeradores.FlujoDeTrabajo.EnumTipoReemplazo.Variable)
                        {
                            parametros_valores = new List <string>();
                            foreach (string _nombreCampo in _homolg.Condiciones.Select(y => y.Campo).Distinct())
                            {
                                parametros_valores.Add(registro[_nombreCampo].ToString());
                            }

                            lambda = ep.Parse(_homolg.Ecuacion);
                            if ((bool)ep.Run(lambda, parametros_valores.ToArray()))
                            {
                                registro[_homolg.NombreCampo] = ConvertirObjeto(_homolg.TipoCampo, _homolg.ValorSi);
                            }
                            else
                            {
                                string _posiblevalor = _homolg.ValorNo.Equals("@valorOriginal") ? registro[_homolg.NombreCampo].ToString() : _homolg.ValorNo;
                                registro[_homolg.NombreCampo] = ConvertirObjeto(_homolg.TipoCampo, _posiblevalor);
                            }
                        }
                    }
                }
                AisgnarRegistros(ref tarea);
            }
            catch (Exception e)
            {
                Log.WriteLog(e, "SIR.Negocio.Concretos.FlujoDeTrabajo.HomologarNegocio - Ejecutar",
                             String.Format(@"tarea:{0} - reporte:{1}", System.Text.Json.JsonSerializer.Serialize(tarea),
                                           System.Text.Json.JsonSerializer.Serialize(reporte)),
                             ErrorType.Error);
                resultado.Errores.Add("COMUNES.ERRORSERVICIO");
            }
            return(resultado);
        }
Ejemplo n.º 12
0
        public override MODResultado Ejecutar(ref LinkedListNode <MODTarea> tarea, MODReporte reporte, MODArchivo archivo)
        {
            MODResultado resultado      = new MODResultado();
            var          _configuraicon = FabricaDatos.CrearConfiguracionOrigenDatos;
            var          _flujoTrabajo  = FabricaDatos.CrearFlujoTrabajoDatos;

            if (tarea.Value.Reporte != null && tarea.Value.ConfiguracionBD != null)
            {
                if (tarea.Value.ConfiguracionBD.consulta.Contains("@periodo"))
                {
                    tarea.Value.ConfiguracionBD.Parametros = new Dictionary <string, object>();
                    var _historico = new MODFlujoHistorico {
                        Periodo = _flujo.Periodo, Periodicidad = tarea.Value.Periodicidad
                    };
                    tarea.Value.ConfiguracionBD.Parametros.Add("periodo", _historico.StrPeriodo);
                }

                tarea.Value.NombreTablaSIR = $"Temp_Combinacion_{tarea.Value.Reporte.Descripcion.Replace(" ", "_")}";
                tarea.Next.Value.Registros = _configuraicon.Ejecutar(tarea.Value.ConfiguracionBD, reporte, ref resultado);

                _flujoTrabajo.GenerarTablaTemporal(tarea.Value);

                resultado = this.Registrar(tarea.Next, tarea.Value.Reporte);
            }

            if (!String.IsNullOrEmpty(tarea.Value.ConsultaFinal))
            {
                var _historico = new MODFlujoHistorico {
                    Periodo = _flujo.Periodo, Periodicidad = _flujo.Periodicidad
                };
                if (tarea.Value.ConsultaFinal.Contains("@periodo"))
                {
                    tarea.Next.Value.Registros = _flujoTrabajo.EjecutarScirpt(reporte.campos, tarea.Value.ConsultaFinal, new Dictionary <string, object>()
                    {
                        { "periodo", _historico.StrPeriodo }
                    });
                }
                else
                {
                    tarea.Next.Value.Registros = _flujoTrabajo.EjecutarScirpt(reporte.campos, tarea.Value.ConsultaFinal, null);
                }
            }

            if (tarea.Value.Reporte != null && tarea.Value.ConfiguracionBD != null)
            {
                _flujoTrabajo.EjecutarScirpt(null, $"DROP TABLE {tarea.Value.NombreTablaSIR}", null);
            }

            return(resultado);
        }
Ejemplo n.º 13
0
        public override MODResultado Ejecutar(ref LinkedListNode <MODTarea> tarea, MODReporte reporte, MODArchivo archivo)
        {
            IArchivoNegocio archivoNegocio = FabricaNegocio.CrearArchivoNegocio;

            MODResultado resultado = new MODResultado();
            var          errores   = new List <string>();

            archivo.Periodo         = tarea.Value.Periodo;
            archivo.IdFlujo         = tarea.Value.IdFlujo;
            archivo.IdElementoFlujo = tarea.Value.IdElemento;
            archivo.Periodicidad    = _flujo.Periodicidad;
            archivo.DatoPeriodo     = _flujo.DatoPeriodo;

            var    lista       = tarea.Value.Registros;
            string rutaDestino = "";

            if ((tarea.Value.Registros != null && tarea.Value.Registros.Count > 0) || tarea.Previous.Value.Proceso == Comun.Enumeradores.FlujoDeTrabajo.EnumProceso.Ejecutar)
            {
                if (archivoNegocio.CrearArchivo(archivo, lista, ref rutaDestino))
                {
                    archivoNegocio.CrearLogGeneracionArchivo(new MODLogGeneracionArchivo()
                    {
                        IdArchivo       = archivo.IdArchivo,
                        FechaGeneracion = DateTime.Now,
                        RutaDestino     = rutaDestino,
                        IdFlujo         = archivo.IdFlujo
                    });
                }
                else
                {
                    //resultado = false;
                    //mensajesError.Add($"Ha ocurrido un error al intentar crear el archivo");
                    resultado.Errores.Add("Ha ocurrido un error al intentar crear el archivo");
                }
            }
            else
            {
                archivoNegocio.GenerarArchivo(archivo, ref errores);
                resultado.Errores = errores;
            }
            AisgnarRegistros(ref tarea);
            return(resultado);
        }
Ejemplo n.º 14
0
        public override MODResultado Ejecutar(ref LinkedListNode <MODTarea> tarea, MODReporte reporte, MODArchivo archivo)
        {
            MODResultado resultado      = new MODResultado();
            var          _configuraicon = FabricaDatos.CrearConfiguracionOrigenDatos;
            var          _flujoTrabajo  = FabricaDatos.CrearFlujoTrabajoDatos;

            tarea.Value.ConfiguracionBD.Parametros = new Dictionary <string, object>();

            tarea.Value.ConfiguracionBD.Parametros = CrearParametros(tarea.Value.ConfiguracionBD, _flujo);
            tarea.Next.Value.Registros             = _configuraicon.Ejecutar(tarea.Value.ConfiguracionBD, reporte, ref resultado);

            if (tarea.Next.Value.Registros != null)
            {
                resultado = this.Registrar(tarea.Next, tarea.Value.Reporte);
            }
            if (!String.IsNullOrEmpty(tarea.Value.ConsultaFinal))
            {
                _flujoTrabajo.EjecutarScirpt(null, tarea.Value.ConsultaFinal, null);
            }

            return(resultado);
        }
        public MODResultado Registrar(MODReporte reporte)
        {
            IReporteNegocio iReportes = FabricaNegocio.CrearReporteNegocio;

            return(iReportes.Registrar(reporte));
        }
Ejemplo n.º 16
0
 public abstract MODResultado Ejecutar(ref LinkedListNode <MODTarea> tarea, MODReporte reporte, MODArchivo archivo);
Ejemplo n.º 17
0
        private MODResultado Registrar(LinkedListNode <MODTarea> tarea, MODReporte reporte)
        {
            MODResultado resultado      = new MODResultado();
            var          _configuraicon = FabricaDatos.CrearConfiguracionOrigenDatos;

            if (!reporte.campos.Any(y => y.Nombre == "VERSION_SIR" || y.Nombre == "IDFLUJO_SIR"))
            {
                reporte.campos.Add(new Comun.Entidades.MODCampos {
                    Nombre = "VERSION_SIR", Tipo = Comun.Enumeradores.EnumTipoDato._int
                });
                reporte.campos.Add(new Comun.Entidades.MODCampos {
                    Nombre = "IDFLUJO_SIR", Tipo = Comun.Enumeradores.EnumTipoDato._int
                });
                reporte.campos.Add(new Comun.Entidades.MODCampos {
                    Nombre = "IDCAUSA_SIR", Tipo = Comun.Enumeradores.EnumTipoDato._int
                });
                reporte.campos.Add(new Comun.Entidades.MODCampos {
                    Nombre = "DESCRIPCION_SIR", Tipo = Comun.Enumeradores.EnumTipoDato._string
                });
                reporte.campos.Add(new Comun.Entidades.MODCampos {
                    Nombre = "PERIODO_SIR", Tipo = Comun.Enumeradores.EnumTipoDato._string
                });
            }

            var _flujohistorico = FabricaDatos.CrearFlujoTrabajoDatos;

            var _historico = new MODFlujoHistorico
            {
                IdEmpresa          = _flujo.IdEmpresa,
                IdServicio         = _flujo.IdServicio,
                IdElemento         = _flujo.IdElemento,
                TipoFlujo          = _flujo.Tipo,
                IdTarea            = tarea.Value.Id,
                FlujoFechaCreacion = DateTime.Now,
                TareaFechaCreacion = DateTime.Now,
                IdFlujo            = _flujo.Id,
                Periodicidad       = _flujo.Periodicidad,
                Periodo            = FijarPeriodoPorPeriodicidad(_flujo.Periodo, _flujo.Periodicidad, _flujo.DatoPeriodo)
            };
            var _conteo = _flujohistorico.Historico(ref _historico, Comun.Enumeradores.EnumAccionBaseDatos.Consulta_1);


            foreach (var x in tarea.Value.Registros)
            {
                if (!x.ContainsKey("IDFLUJO_SIR"))
                {
                    x.Add("IDFLUJO_SIR", _flujo.Id);
                }
                if (!x.ContainsKey("VERSION_SIR"))
                {
                    x.Add("VERSION_SIR", _conteo.DatosAdicionales["Version"]);
                }
                if (!x.ContainsKey("IDCAUSA_SIR"))
                {
                    x.Add("IDCAUSA_SIR", 0);
                }
                if (!x.ContainsKey("DESCRIPCION_SIR"))
                {
                    x.Add("DESCRIPCION_SIR", "");
                }
                if (!x.ContainsKey("PERIODO_SIR"))
                {
                    x.Add("PERIODO_SIR", _historico.StrPeriodo);
                }
            }
            ;

            resultado = _configuraicon.ProcesarEstracion(tarea.Previous.Value.NombreTablaSIR, tarea.Value.Registros, reporte.campos);
            return(resultado);
        }
Ejemplo n.º 18
0
        public override void Estructuras()
        {
            MODReporte estructura = new MODReporte()
            {
                Descripcion   = "S10 contribuciones n cobradas",
                Nombre        = "extr_S10_contrib_no_cobrada",
                IdCategoria   = idCategoriaSUI,
                EsReporte     = false,
                Activo        = true,
                ActivoEmpresa = true,

                IdEmpresa  = idEmpresa,
                IdServicio = idServicio,
                //ToDo esta tabla tiene pendiente obtner informacion de TBL_PAR_CALIDAD_PERIODOS, TBL_PUNTOS_MEDIDA y EXTR_CS7_PME
                campos = new List <MODCampos>()
                {
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NIS_RAD",
                        nombreVisible = "NIS_RAD",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 0,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "CO_CONCEPTO",
                        nombreVisible = "CO_CONCEPTO",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 1,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "contrib_NO_cobra",
                        nombreVisible = "contrib_NO_cobra",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,4",
                        Ordinal       = 2,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    }
                }
            };

            contextReporte.Registrar(estructura);

            estructura = new MODReporte()
            {
                Descripcion   = "EXTR_S10",
                Nombre        = "EXTR_S10",
                IdCategoria   = idCategoriaSUI,
                EsReporte     = false,
                Activo        = true,
                ActivoEmpresa = true,

                IdEmpresa  = idEmpresa,
                IdServicio = idServicio,
                //ToDo esta tabla tiene pendiente obtner informacion de TBL_PAR_CALIDAD_PERIODOS, TBL_PUNTOS_MEDIDA y EXTR_CS7_PME
                campos = new List <MODCampos>()
                {
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NIU",
                        nombreVisible = "NIU",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 0,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "IDFACTURA",
                        nombreVisible = "IDFACTURA",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 1,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "FECHA_EXPEDICION",
                        nombreVisible = "FECHA_EXPEDICION",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._datetime,
                        Largo         = "15",
                        Ordinal       = 2,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "CONTRIB_NO_RECAUD",
                        nombreVisible = "CONTRIB_NO_RECAUD",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,2",
                        Ordinal       = 3,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "CONTRIB_RECAUD",
                        nombreVisible = "CONTRIB_RECAUD",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,2",
                        Ordinal       = 4,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "EMPRESA",
                        nombreVisible = "EMPRESA",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 5,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "PERIODO",
                        nombreVisible = "PERIODO",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "20",
                        Ordinal       = 6,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    }
                }
            };
            contextReporte.Registrar(estructura);


            estructura = new MODReporte()
            {
                Descripcion   = "Reporte S10 - DECRETO ## - YYYY",
                Nombre        = "S10",
                IdCategoria   = idCategoriaSUI,
                EsReporte     = true,
                Activo        = true,
                ActivoEmpresa = true,

                IdEmpresa  = idEmpresa,
                IdServicio = idServicio,

                campos = new List <MODCampos>()
                {
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NIU",
                        nombreVisible = "NIU",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 0,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "IDFACTURA",
                        nombreVisible = "IDFACTURA",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 1,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "FECHA_TRANSACCION",
                        nombreVisible = "FECHA_TRANSACCION",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._datetime,
                        Largo         = "15",
                        Ordinal       = 2,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "CONTRIB_NO_RECAUD",
                        nombreVisible = "CONTRIB_NO_RECAUD",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,4",
                        Ordinal       = 3,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "CONTRIB_RECAUD",
                        nombreVisible = "CONTRIB_RECAUD",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,4",
                        Ordinal       = 4,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "EMPRESA",
                        nombreVisible = "EMPRESA",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 5,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "PERIODO",
                        nombreVisible = "PERIODO",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "20",
                        Ordinal       = 6,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    }
                }
            };
            contextReporte.Registrar(estructura);
        }
Ejemplo n.º 19
0
        public override void Estructuras()
        {
            MODReporte estructura = new MODReporte()
            {
                Descripcion   = "EXTR_CS7",
                Nombre        = "EXTR_CS7",
                IdCategoria   = idCategoriaSUI,
                EsReporte     = false,
                Activo        = true,
                ActivoEmpresa = true,

                IdEmpresa  = idEmpresa,
                IdServicio = idServicio,
                //ToDo esta tabla tiene pendiente obtner informacion de TBL_PAR_CALIDAD_PERIODOS, TBL_PUNTOS_MEDIDA y EXTR_CS7_PME
                campos = new List <MODCampos>()
                {
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "COD_P_MEDIDA_LIN",
                        nombreVisible = "COD_P_MEDIDA_LIN",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 0,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NRO_SEMANA",
                        nombreVisible = "NRO_SEMANA",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "5",
                        Ordinal       = 1,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NHT",
                        nombreVisible = "NHT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 2,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NHIT",
                        nombreVisible = "NHIT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 3,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NHMT",
                        nombreVisible = "NHMT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 4,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NHTT",
                        nombreVisible = "NHTT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 5,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NET",
                        nombreVisible = "NET",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 6,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NEIT",
                        nombreVisible = "NEIT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 7,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NEMT",
                        nombreVisible = "NEMT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 8,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NETT",
                        nombreVisible = "NETT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 9,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NIT",
                        nombreVisible = "NIT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 10,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NIMT",
                        nombreVisible = "NIMT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 11,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NITT",
                        nombreVisible = "NITT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 12,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NFPC",
                        nombreVisible = "NFPC",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 13,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NFPI",
                        nombreVisible = "NFPI",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 14,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "EMPRESA",
                        nombreVisible = "EMPRESA",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 15,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "ID_MERCADO",
                        nombreVisible = "ID_MERCADO",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "5",
                        Ordinal       = 16,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    }
                }
            };

            contextReporte.Registrar(estructura);


            estructura = new MODReporte()
            {
                Descripcion   = "Reporte CS7 - DECRETO ## - YYYY",
                Nombre        = "CS7",
                IdCategoria   = idCategoriaSUI,
                EsReporte     = true,
                Activo        = true,
                ActivoEmpresa = true,

                IdEmpresa  = idEmpresa,
                IdServicio = idServicio,

                campos = new List <MODCampos>()
                {
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "COD_P_MEDIDA_LIN",
                        nombreVisible = "COD_P_MEDIDA_LIN",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 0,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NRO_SEMANA",
                        nombreVisible = "NRO_SEMANA",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "5",
                        Ordinal       = 1,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NHT",
                        nombreVisible = "NHT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 2,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NHIT",
                        nombreVisible = "NHIT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 3,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NHMT",
                        nombreVisible = "NHMT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 4,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NHTT",
                        nombreVisible = "NHTT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 5,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NET",
                        nombreVisible = "NET",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 6,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NEIT",
                        nombreVisible = "NEIT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 7,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NEMT",
                        nombreVisible = "NEMT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 8,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NETT",
                        nombreVisible = "NETT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 9,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NIT",
                        nombreVisible = "NIT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 10,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NIMT",
                        nombreVisible = "NIMT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 11,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NITT",
                        nombreVisible = "NITT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 12,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NFPC",
                        nombreVisible = "NFPC",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 13,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NFPI",
                        nombreVisible = "NFPI",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 14,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "EMPRESA",
                        nombreVisible = "EMPRESA",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 15,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "ID_MERCADO",
                        nombreVisible = "ID_MERCADO",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "5",
                        Ordinal       = 16,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "PERIODO",
                        nombreVisible = "PERIODO",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "20",
                        Ordinal       = 17,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    }
                }
            };
            contextReporte.Registrar(estructura);
        }
Ejemplo n.º 20
0
        public override void Estructuras()
        {
            MODReporte estructura = new MODReporte()
            {
                Descripcion   = "cs3 limites",
                Nombre        = "extr_cs3_limites",
                IdCategoria   = idCategoriaSUI,
                EsReporte     = false,
                Activo        = true,
                ActivoEmpresa = true,

                IdEmpresa  = idEmpresa,
                IdServicio = idServicio,
                //ToDo esta tabla tiene pendiente obtner informacion de GRUPO_EST_SIR
                campos = new List <MODCampos>()
                {
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "saidi",
                        nombreVisible = "saidi",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "12,3",
                        Ordinal       = 0,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "saifi",
                        nombreVisible = "saifi",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "12,3",
                        Ordinal       = 1,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "bnd_indif_inf_saidi",
                        nombreVisible = "bnd_indif_inf_saidi",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 2,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "bnd_indif_sup_saidi",
                        nombreVisible = "bnd_indif_sup_saidi",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 3,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "bnd_indif_inf_saifi",
                        nombreVisible = "bnd_indif_inf_saifi",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 4,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "bnd_indif_sup_saifi",
                        nombreVisible = "bnd_indif_sup_saifi",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 5,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "op_red",
                        nombreVisible = "op_red",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "5",
                        Ordinal       = 6,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "empresa",
                        nombreVisible = "empresa",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 7,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    }
                }
            };

            contextReporte.Registrar(estructura);


            estructura = new MODReporte()
            {
                Descripcion   = "Reporte CS3 - DECRETO ## - YYYY",
                Nombre        = "CS3",
                IdCategoria   = idCategoriaSUI,
                EsReporte     = true,
                Activo        = true,
                ActivoEmpresa = true,

                IdEmpresa  = idEmpresa,
                IdServicio = idServicio,

                campos = new List <MODCampos>()
                {
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "INCD1",
                        nombreVisible = "INCD1",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 0,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "INCD2",
                        nombreVisible = "INCD2",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 1,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "INCD3",
                        nombreVisible = "INCD3",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 2,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "INCF1",
                        nombreVisible = "INCF1",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 3,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "INCF2",
                        nombreVisible = "INCF2",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 4,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "INCF3",
                        nombreVisible = "INCF3",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 5,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "IC_SAIDI",
                        nombreVisible = "IC_SAIDI",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 6,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "IC_SAIFI",
                        nombreVisible = "IC_SAIFI",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 7,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "IF_SAIFI",
                        nombreVisible = "IF_SAIFI",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 8,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "IF_SAIDI",
                        nombreVisible = "IF_SAIDI",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 9,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "IV_SAIFI",
                        nombreVisible = "IV_SAIFI",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 10,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "IV_SAIDI",
                        nombreVisible = "IV_SAIDI",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,0",
                        Ordinal       = 11,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "ID_MERCADO",
                        nombreVisible = "ID_MERCADO",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "5",
                        Ordinal       = 12,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "PERIODO",
                        nombreVisible = "PERIODO",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 13,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "EMPRESA",
                        nombreVisible = "EMPRESA",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 14,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    }
                }
            };
            contextReporte.Registrar(estructura);
        }
Ejemplo n.º 21
0
        public override void Estructuras()
        {
            MODReporte estructura = new MODReporte()
            {
                Descripcion   = "EXTR_CS8",
                Nombre        = "EXTR_CS8",
                IdCategoria   = idCategoriaSUI,
                EsReporte     = false,
                Activo        = true,
                ActivoEmpresa = true,

                IdEmpresa  = idEmpresa,
                IdServicio = idServicio,
                //ToDo esta tabla tiene pendiente obtner informacion de TBL_PAR_CALIDAD_PERIODOS, TBL_PUNTOS_MEDIDA y EXTR_CS7_PME
                campos = new List <MODCampos>()
                {
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "niv_tension",
                        nombreVisible = "niv_tension",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "10",
                        Ordinal       = 0,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "nro_semana",
                        nombreVisible = "nro_semana",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "5,0",
                        Ordinal       = 1,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "empresa",
                        nombreVisible = "empresa",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 2,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "id_mercado",
                        nombreVisible = "id_mercado",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "10",
                        Ordinal       = 3,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    }
                }
            };

            contextReporte.Registrar(estructura);


            estructura = new MODReporte()
            {
                Descripcion   = "Reporte CS8 - DECRETO ## - YYYY",
                Nombre        = "CS8",
                IdCategoria   = idCategoriaSUI,
                EsReporte     = true,
                Activo        = true,
                ActivoEmpresa = true,

                IdEmpresa  = idEmpresa,
                IdServicio = idServicio,

                campos = new List <MODCampos>()
                {
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NRO_SEMANA",
                        nombreVisible = "NRO_SEMANA",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "5,0",
                        Ordinal       = 0,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NIV_TENSION",
                        nombreVisible = "NIV_TENSION",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "5",
                        Ordinal       = 1,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "PPST_95",
                        nombreVisible = "PPST_95",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,4",
                        Ordinal       = 2,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "PPST_99",
                        nombreVisible = "PPST_99",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,4",
                        Ordinal       = 3,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "PTHDV_95",
                        nombreVisible = "PTHDV_95",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,4",
                        Ordinal       = 4,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "PTHDV_99",
                        nombreVisible = "PTHDV_99",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,4",
                        Ordinal       = 5,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "PV2_V1_95",
                        nombreVisible = "PV2_V1_95",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,4",
                        Ordinal       = 6,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "PV2_V1_99",
                        nombreVisible = "PV2_V1_99",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,4",
                        Ordinal       = 7,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "PNHT",
                        nombreVisible = "PNHT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,4",
                        Ordinal       = 8,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "PNET",
                        nombreVisible = "PNET",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,4",
                        Ordinal       = 9,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "PNIT",
                        nombreVisible = "PNIT",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._decimal,
                        Largo         = "15,4",
                        Ordinal       = 10,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "PERIODO",
                        nombreVisible = "PERIODO",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "20",
                        Ordinal       = 11,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "EMPRESA",
                        nombreVisible = "EMPRESA",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 12,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "ID_MERCADO",
                        nombreVisible = "ID_MERCADO",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "5",
                        Ordinal       = 13,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    }
                }
            };
            contextReporte.Registrar(estructura);
        }
Ejemplo n.º 22
0
 public override MODResultado Ejecutar(ref LinkedListNode <MODTarea> tarea, MODReporte reporte, MODArchivo archivo)
 {
     return(new MODResultado());
 }
        public MODResultado Modificar(MODReporte reporte)
        {
            IReporteNegocio iReportes = FabricaNegocio.CrearReporteNegocio;

            return(iReportes.Modificar(reporte));
        }
Ejemplo n.º 24
0
 public override MODResultado Ejecutar(ref LinkedListNode <MODTarea> tarea, MODReporte reporte, MODArchivo archivo)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 25
0
        public override void Estructuras()
        {
            MODReporte estructura = new MODReporte()
            {
                Descripcion   = "EXTR_CS6",
                Nombre        = "EXTR_CS6",
                IdCategoria   = idCategoriaSUI,
                EsReporte     = false,
                Activo        = true,
                ActivoEmpresa = true,

                IdEmpresa  = idEmpresa,
                IdServicio = idServicio,
                //ToDo esta tabla tiene pendiente obtner informacion de EXTR_CS4_CS6_VAR
                campos = new List <MODCampos>()
                {
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "COD_PTO_MED_ESP",
                        nombreVisible = "COD_PTO_MED_ESP",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 0,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "COD_PTO_MED_CREG",
                        nombreVisible = "COD_PTO_MED_CREG",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 1,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "IUA_MEDIDOR",
                        nombreVisible = "IUA_MEDIDOR",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 2,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "IUA_ELEMENTO",
                        nombreVisible = "IUA_ELEMENTO",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 3,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "IUS_SUBESTACION",
                        nombreVisible = "IUS_SUBESTACION",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 4,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "TENSION_NOMINAL",
                        nombreVisible = "TENSION_NOMINAL",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 5,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NIV_TENSION_CREG",
                        nombreVisible = "NIV_TENSION_CREG",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 6,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "F_ULT_CALIBRACION",
                        nombreVisible = "F_ULT_CALIBRACION",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._datetime,
                        Largo         = "50",
                        Ordinal       = 7,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "TIPO_ELEMENTO",
                        nombreVisible = "TIPO_ELEMENTO",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "10",
                        Ordinal       = 8,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "PERIODO",
                        nombreVisible = "PERIODO",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 9,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "EMPRESA",
                        nombreVisible = "EMPRESA",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 10,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "EXCEPCION_CREG",
                        nombreVisible = "EXCEPCION_CREG",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._int,
                        Largo         = "50",
                        Ordinal       = 11,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "ID_MERCADO",
                        nombreVisible = "ID_MERCADO",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "5",
                        Ordinal       = 12,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "SOPORTE",
                        nombreVisible = "SOPORTE",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 13,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    }
                }
            };

            contextReporte.Registrar(estructura);


            estructura = new MODReporte()
            {
                Descripcion   = "Reporte CS6 - DECRETO ## - YYYY",
                Nombre        = "CS6",
                IdCategoria   = idCategoriaSUI,
                EsReporte     = true,
                Activo        = true,
                ActivoEmpresa = true,

                IdEmpresa  = idEmpresa,
                IdServicio = idServicio,

                campos = new List <MODCampos>()
                {
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "COD_P_MEDIDA_ESP",
                        nombreVisible = "COD_P_MEDIDA_ESP",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 0,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "COD_P_MEDIDA_CREG",
                        nombreVisible = "COD_P_MEDIDA_CREG",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 1,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "IUA_MEDIDOR",
                        nombreVisible = "IUA_MEDIDOR",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 2,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "IUA_BARRA",
                        nombreVisible = "IUA_BARRA",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 3,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "IUS_SUBEST",
                        nombreVisible = "IUS_SUBEST",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 4,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "TENSION_NOMINAL",
                        nombreVisible = "TENSION_NOMINAL",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 5,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "NIV_TENSION",
                        nombreVisible = "NIV_TENSION",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 6,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "F_ULT_CALIBR",
                        nombreVisible = "F_ULT_CALIBR",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._datetime,
                        Largo         = "50",
                        Ordinal       = 7,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "PERIODO",
                        nombreVisible = "PERIODO",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 8,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "EMPRESA",
                        nombreVisible = "EMPRESA",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 9,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "EXCEPCION_CREG",
                        nombreVisible = "EXCEPCION_CREG",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._int,
                        Largo         = "1",
                        Ordinal       = 10,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "ID_MERCADO",
                        nombreVisible = "ID_MERCADO",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "5",
                        Ordinal       = 11,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    },
                    new MODCampos()
                    {
                        Id            = 0,
                        IdReporte     = 0,
                        Nombre        = "SOPORTE",
                        nombreVisible = "SOPORTE",
                        Tipo          = SIR.Comun.Enumeradores.EnumTipoDato._string,
                        Largo         = "50",
                        Ordinal       = 12,
                        esVersionable = false,
                        esEditable    = false,

                        IdEmpresa  = idEmpresa,
                        IdServicio = idServicio
                    }
                }
            };
            contextReporte.Registrar(estructura);
        }