Beispiel #1
0
        /// <summary>
        /// Este método carga datos de prueba en el esquema de la aplicación.
        /// </summary>
        public void cargarEsquema()
        {
            // ReSharper disable InconsistentNaming

            ////////////////////////////////////////////////////////
            // Se crean algunos usuarios (y se encripta el password)
            ////////////////////////////////////////////////////////

            #region usuarios
            Usuario admin = new Usuario {
                Nombre = "ADMIN",
                Empleado = "ADMINISTRADOR DEL SISTEMA",
                Legajo = 3300,
                Activado = true
            };
            admin.setCryptPassword("admsgm");
            admin.save();
            #endregion usuarios

            //////////////////////////////////////////////////////
            // Se crean un par de parametros generales del sistema
            //////////////////////////////////////////////////////

            #region generales sistema
            (new Parametro {
                Clave = "SISTEMA.VERSION",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "Versión del Sistema",
                Valorstring = "1.0.0"
            }).save();
            (new Parametro {
                Clave = "SISTEMA.TITULO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "Titulo para la Aplicación",
                Valorstring = "SGMPro - ESTUDIO ALAMO & ASOCIADOS"
            }).save();
            (new Parametro {
                Clave = "SISTEMA.NOMBRE",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "Nombre interno del Sistema",
                Valorstring = "SGMPro"
            }).save();
            (new Parametro {
                Clave = "SISTEMA.DB",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "Nombre de la DB del sistema",
                Valorstring = "sgmpro"
            }).save();
            #endregion generales sistema

            ////////////////////////////////////////////////////////////////////
            // Se crean los parámetros asociados a opciones ejecutables del menú
            ////////////////////////////////////////////////////////////////////

            #region menu
            (new Parametro {
                Clave = "MENU.SISTEMA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.MENU,
                Nombre = "&Sistema",
                Valorbool = true,
                Orden = 1
            }).save();
            (new Parametro {
                Clave = "MENU.GESTION",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.MENU,
                Nombre = "&Gestión",
                Orden = 2
            }).save();
            (new Parametro {
                Clave = "MENU.CONFIGURACION",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.MENU,
                Nombre = "&Configuracion",
                Orden = 3
            }).save();
            (new Parametro {
                Clave = "MENU.INTERFACES",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.MENU,
                Nombre = "I&nterfaces",
                Orden = 4
            }).save();
            (new Parametro {
                Clave = "MENU.INFORMES",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.MENU,
                Nombre = "&Informes",
                Orden = 5
            }).save();
            (new Parametro {
                Clave = "MENU.AYUDA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.MENU,
                Nombre = "&Ayuda",
                Valorbool = true,
                Orden = 6
            }).save();
            (new Parametro {
                Clave = "MENU.SISTEMA.INICIARSESION",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "&Iniciar Sesión...",
                Valorstring = "cuIniciarSesion",
                Valorbool = true,
                Orden = 1
            }).save();
            (new Parametro {
                Clave = "MENU.SISTEMA.CERRARSESION",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "&Cerrar Sesión",
                Valorstring = "cuCerrarSesion",
                Valorbool = true,
                Orden = 2
            }).save();
            (new Parametro {
                Clave = "MENU.SISTEMA.$LINEA$",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "-",
                Orden = 3
            }).save();
            (new Parametro {
                Clave = "MENU.SISTEMA.BACKUP",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "&Realizar Backup de datos...",
                Valorstring = "cuBackupSistema",
                Orden = 4
            }).save();
            (new Parametro {
                Clave = "MENU.SISTEMA.$$LINEA$",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "-",
                Valorbool = true,
                Orden = 5
            }).save();
            (new Parametro {
                Clave = "MENU.SISTEMA.SALIR",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "&Salir",
                Valorstring = "cuCerrarSistema",
                Valorbool = true,
                Orden = 6
            }).save();
            (new Parametro {
                Clave = "MENU.AYUDA.ACERCADE",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "&Acerca de...",
                Valorstring = "cuAcercaDe",
                Valorbool = true,
                Orden = 1
            }).save();
            (new Parametro {
                Clave = "MENU.GESTION.BANDEJA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "&Bandeja de Gestiones Asociadas...",
                Valorstring = "cuBandejaEntrada",
                Orden = 1
            }).save();
            (new Parametro {
                Clave = "MENU.GESTION.SELECCION",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "Selección &Manual de Cuenta...",
                Valorstring = "cuSeleccionarCuenta",
                Orden = 2
            }).save();
            (new Parametro {
                Clave = "MENU.GESTION.$LINEA$",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "-",
                Orden = 3
            }).save();
            (new Parametro {
                Clave = "MENU.GESTION.LEGAL",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "Gestión &Legal...",
                Valorstring = "cuGestionLegal",
                Orden = 4
            }).save();
            (new Parametro {
                Clave = "MENU.GESTION.$$LINEA$",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "-",
                Orden = 5
            }).save();
            (new Parametro {
                Clave = "MENU.GESTION.ADMIN",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "Administración de Datos...",
                Valorstring = "cuConfigurarGestion",
                Orden = 6
            }).save();
            (new Parametro {
                Clave = "MENU.GESTION.$$$LINEA$",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "-",
                Orden = 7
            }).save();
            (new Parametro {
                Clave = "MENU.GESTION.DEUDAS",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "Administración de &Deudas...",
                Valorstring = "cuAbmDeuda.CUAdminDeudas",
                Orden = 8
            }).save();
            (new Parametro {
                Clave = "MENU.GESTION.PAGOS",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "Administración de &Pagos...",
                Valorstring = "cuAbmPago.CUAdminPagos",
                Orden = 9
            }).save();
            (new Parametro {
                Clave = "MENU.CONFIGURACION.LISTAS",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "Configurar &Listas...",
                Valorstring = "cuConfigurarListas",
                Orden = 1
            }).save();
            (new Parametro {
                Clave = "MENU.CONFIGURACION.ABMJOB",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "&Programar Generación de Listas",
                Valorstring = "cuGenerarJobs.CUEditarJob",
                Orden = 2
            }).save();
            (new Parametro {
                Clave = "MENU.CONFIGURACION.$LINEA$",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "-",
                Orden = 3
            }).save();
            (new Parametro {
                Clave = "MENU.CONFIGURACION.TIPOSCONVENIO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "Gestión de &Tipos de Convenio",
                Valorstring = "cuAbmTipoConvenio.CUAdminTiposConvenio",
                Orden = 4
            }).save();
            (new Parametro {
                Clave = "MENU.CONFIGURACION.ABMVARIABLES",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "Gestión de &Variables",
                Valorstring = "cuAbmVariable.CUListVariables",
                Orden = 6
            }).save();
            (new Parametro {
                Clave = "MENU.CONFIGURACION.$$$LINEA$",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "-",
                Orden = 7
            }).save();
            (new Parametro {
                Clave = "MENU.CONFIGURACION.SEGURIDAD",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "&Seguridad y Perfiles",
                Valorstring = "cuConfigurarUsuarios",
                Orden = 8
            }).save();
            (new Parametro {
                Clave = "MENU.CONFIGURACION.PARAMETROS",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "&Configurar Parámetros...",
                Valorstring = "cuAbmParametro.CUAdminParametros",
                Orden = 9
            }).save();
            (new Parametro {
                Clave = "MENU.INTERFACES.ALTACUENTAS",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "Carga Masiva...",
                Valorstring = "cuCargaMasiva",
                Orden = 1
            }).save();
            (new Parametro {
                Clave = "MENU.INTERFACES.$$LINEA$",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "-",
                Orden = 2
            }).save();
            (new Parametro {
                Clave = "MENU.INTERFACES.UPDATEPERSONAS",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "Novedades de &Personas...",
                Valorstring = "cuInterfaces.CUNovedadPersonas",
                Orden = 3
            }).save();
            (new Parametro {
                Clave = "MENU.INTERFACES.UPDATECUENTAS",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "Novedades de &Cuentas...",
                Valorstring = "cuInterfaces.CUNovedadCuentas",
                Orden = 4
            }).save();
            (new Parametro {
                Clave = "MENU.INTERFACES.UPDATEMOVIMIENTOS",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "Novedades &Deudas y Pagos...",
                Valorstring = "cuInterfaces.CUNovedadMovs",
                Orden = 5
            }).save();
            (new Parametro {
                Clave = "MENU.INFORMES.GESTIONES",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "Gestiones Realizadas",
                Valorstring = "cuGenerarInformes.CUListadoGestiones",
                Orden = 1
            }).save();
            (new Parametro {
                Clave = "MENU.INFORMES.GENLISTAS",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "Listas Generadas",
                Valorstring = "cuGenerarInformes.CUGenerarRecibo",
                Orden = 2
            }).save();
            (new Parametro {
                Clave = "MENU.INFORMES.COBRANZAS",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.SUBMENU,
                Nombre = "Cobranzas Ingresadas",
                Valorstring = "cuGenerarInformes.CUCobranzasIngresadas",
                Orden = 3
            }).save();
            #endregion menu

            ///////////////////////////////////////////////////////
            // Se crean permisos contra botones
            ///////////////////////////////////////////////////////

            #region entidades gestionables
            (new Parametro {
                Clave = "ENTIDAD.PARAMETRO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.PARAMETRO",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.USUARIO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.USUARIO",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.ROL",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.ROL",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.PERFIL",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.PERFIL",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.PERMISO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.PERMISO",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.SESION",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.SESION",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.CONTACTO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.CONTACTO",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.CONVENIO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.CONVENIO",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.ESTRATEGIA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.ESTRATEGIA",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.CUENTA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.CUENTA",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.ENTIDAD",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.ENTIDAD",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.DEUDA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.DEUDA",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.GESTIONPERIODICA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.GESTIONPERIODICA",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.LISTAGESTION",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.LISTAGESTION",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.JOBGENLISTAGESTION",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.JOBGENLISTAGESTION",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.PAGO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.PAGO",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.PERSONA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.PERSONA",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.PREDICADO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.PREDICADO",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.PRODUCTO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.PRODUCTO",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.RELACION",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.RELACION",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.TIPOCONVENIO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.TIPOCONVENIO",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.TRAMO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.TRAMO",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.TIPOLISTAGESTION",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.TIPOLISTAGESTION",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.VARIABLE",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.VARIABLE",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.VOCABLO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.VOCABLO",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.GESTION",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.GESTION",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.RESULTADO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.RESULTADO",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.IMPUTACION",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.IMPUTACION",
            }).save();
            (new Parametro {
                Clave = "ENTIDAD.RECIBO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "ENTIDAD.RECIBO",
            }).save();
            #endregion entidades gestionables

            ///////////////////////////////////////////////////////
            // Se crean recursos para los botones
            ///////////////////////////////////////////////////////

            #region botones
            (new Parametro {
                Clave = "BOTON.CONVENIO.GENERAR",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.CONVENIO.GENERAR",
            }).save();
            (new Parametro {
                Clave = "BOTON.CONVENIO.ACTIVAR",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.CONVENIO.ACTIVAR",
            }).save();
            (new Parametro {
                Clave = "BOTON.CONVENIO.IMPRIMIR",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.CONVENIO.IMPRIMIR",
            }).save();
            (new Parametro {
                Clave = "BOTON.CONTACTO.VERIFICAR",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.CONTACTO.VERIFICAR",
            }).save();
            (new Parametro {
                Clave = "BOTON.CUENTA.CANCELAR",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.CUENTA.CANCELAR",
            }).save();
            (new Parametro {
                Clave = "BOTON.CONTACTO.CREAR",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.CONTACTO.CREAR",
            }).save();
            (new Parametro {
                Clave = "BOTON.GESTIONAR.ACTUAL",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.GESTIONAR.ACTUAL",
            }).save();
            (new Parametro {
                Clave = "BOTON.GESTIONAR.SELECCION",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.GESTIONAR.SELECCION",
            }).save();
            (new Parametro {
                Clave = "BOTON.GESTIONAR.TELEFONICA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.GESTIONAR.TELEFONICA",
            }).save();
            (new Parametro {
                Clave = "BOTON.GESTIONAR.POSTAL",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.GESTIONAR.POSTAL",
            }).save();
            (new Parametro {
                Clave = "BOTON.GESTIONAR.TERRENO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.GESTIONAR.TERRENO",
            }).save();
            (new Parametro {
                Clave = "BOTON.GESTIONAR.BACKOFFICE",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.GESTIONAR.BACKOFFICE",
            }).save();
            (new Parametro {
                Clave = "BOTON.GESTIONAR.ALTAPAGO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.GESTIONAR.ALTAPAGO",
            }).save();
            (new Parametro {
                Clave = "BOTON.GESTIONAR.ALTACONVENIO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.GESTIONAR.ALTACONVENIO",
            }).save();
            (new Parametro {
                Clave = "BOTON.GESTIONAR.ALTADEUDA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.GESTIONAR.ALTADEUDA",
            }).save();
            (new Parametro {
                Clave = "BOTON.GESTION.GESTIONAR",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.GESTION.GESTIONAR",
            }).save();
            (new Parametro {
                Clave = "BOTON.GESTION.IMPRIMIR",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.GESTION.IMPRIMIR",
            }).save();
            (new Parametro {
                Clave = "BOTON.GESTION.IMPRIMIR.TODO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.GESTION.IMPRIMIR.TODO",
            }).save();
            (new Parametro {
                Clave = "BOTON.RECIBO.REIMPRIMIR",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.RECIBO.REIMPRIMIR",
            }).save();
            (new Parametro {
                Clave = "BOTON.CUENTA.EDITAR",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.CUENTA.EDITAR",
            }).save();
            (new Parametro {
                Clave = "BOTON.CONTACTO.EDITAR",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.CONTACTO.EDITAR",
            }).save();
            (new Parametro {
                Clave = "BOTON.PERSONA.EDITAR",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.RECURSO,
                Nombre = "BOTON.PERSONA.EDITAR",
            }).save();
            #endregion botones

            ////////////////////////////////////////////////////////////////
            // Se crean los permisos asociados a los recursos 'verificables'
            // (aquellos que son suceptibles de tener un permiso asociado)
            ////////////////////////////////////////////////////////////////

            #region permisos menu
            Permiso pBackup = new Permiso {
                Recurso = Parametros.GetByClave("MENU.SISTEMA.BACKUP"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBackup.save();

            Permiso pGestel = new Permiso {
                Recurso = Parametros.GetByClave("MENU.GESTION.BANDEJA"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pGestel.save();

            Permiso pGestsel = new Permiso {
                Recurso = Parametros.GetByClave("MENU.GESTION.SELECCION"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pGestsel.save();

            Permiso pGeslegal = new Permiso {
                Recurso = Parametros.GetByClave("MENU.GESTION.LEGAL"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pGeslegal.save();

            Permiso pDgadmin = new Permiso {
                Recurso = Parametros.GetByClave("MENU.GESTION.ADMIN"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pDgadmin.save();

            Permiso pDgadmindd = new Permiso {
                Recurso = Parametros.GetByClave("MENU.GESTION.DEUDAS"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pDgadmindd.save();

            Permiso pDgadminpg = new Permiso {
                Recurso = Parametros.GetByClave("MENU.GESTION.PAGOS"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pDgadminpg.save();

            Permiso pConfParam = new Permiso {
                Recurso = Parametros.GetByClave("MENU.CONFIGURACION.PARAMETROS"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pConfParam.save();

            Permiso pConflist = new Permiso {
                Recurso = Parametros.GetByClave("MENU.CONFIGURACION.LISTAS"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pConflist.save();

            Permiso pAbmJobs = new Permiso {
                Recurso = Parametros.GetByClave("MENU.CONFIGURACION.ABMJOB"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pAbmJobs.save();

            Permiso pAbmVar = new Permiso {
                Recurso = Parametros.GetByClave("MENU.CONFIGURACION.ABMVARIABLES"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pAbmVar.save();

            Permiso pAbmTipoconv = new Permiso {
                Recurso = Parametros.GetByClave("MENU.CONFIGURACION.TIPOSCONVENIO"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pAbmTipoconv.save();

            Permiso pSeguridad = new Permiso {
                Recurso = Parametros.GetByClave("MENU.CONFIGURACION.SEGURIDAD"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pSeguridad.save();

            Permiso pInfogest = new Permiso {
                Recurso = Parametros.GetByClave("MENU.INFORMES.GESTIONES"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pInfogest.save();

            Permiso pInfogenlist = new Permiso {
                Recurso = Parametros.GetByClave("MENU.INFORMES.GENLISTAS"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pInfogenlist.save();

            Permiso pInfocobranzas = new Permiso {
                Recurso = Parametros.GetByClave("MENU.INFORMES.COBRANZAS"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pInfocobranzas.save();

            Permiso pInterfaltactas = new Permiso {
                Recurso = Parametros.GetByClave("MENU.INTERFACES.ALTACUENTAS"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pInterfaltactas.save();

            Permiso pInterfupdpers = new Permiso {
                Recurso = Parametros.GetByClave("MENU.INTERFACES.UPDATEPERSONAS"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pInterfupdpers.save();

            Permiso pInterfupdctas = new Permiso {
                Recurso = Parametros.GetByClave("MENU.INTERFACES.UPDATECUENTAS"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pInterfupdctas.save();

            Permiso pInterfupdmovs = new Permiso {
                Recurso = Parametros.GetByClave("MENU.INTERFACES.UPDATEMOVIMIENTOS"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pInterfupdmovs.save();
            #endregion permisos menu

            ///////////////////////////////////////////////////////
            // Se crean permisos contra botones
            ///////////////////////////////////////////////////////

            #region permisos entidades
            Permiso pVerPARAMETRO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PARAMETRO"),
                Tipo = ETipoPermiso.VER
            };
            pVerPARAMETRO.save();
            Permiso pAgregarPARAMETRO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PARAMETRO"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarPARAMETRO.save();
            Permiso pEditarPARAMETRO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PARAMETRO"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarPARAMETRO.save();
            Permiso pRemoverPARAMETRO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PARAMETRO"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverPARAMETRO.save();
            Permiso pVerUsuario = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.USUARIO"),
                Tipo = ETipoPermiso.VER
            };
            pVerUsuario.save();
            Permiso pAgregarUsuario = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.USUARIO"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarUsuario.save();
            Permiso pEditarUsuario = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.USUARIO"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarUsuario.save();
            Permiso pRemoverUsuario = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.USUARIO"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverUsuario.save();
            Permiso pVerROL = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.ROL"),
                Tipo = ETipoPermiso.VER
            };
            pVerROL.save();
            Permiso pAgregarROL = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.ROL"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarROL.save();
            Permiso pEditarROL = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.ROL"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarROL.save();
            Permiso pRemoverROL = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.ROL"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverROL.save();
            Permiso pVerPERMISO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PERMISO"),
                Tipo = ETipoPermiso.VER
            };
            pVerPERMISO.save();
            Permiso pAgregarPERMISO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PERMISO"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarPERMISO.save();
            Permiso pEditarPERMISO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PERMISO"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarPERMISO.save();
            Permiso pRemoverPERMISO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PERMISO"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverPERMISO.save();
            Permiso pVerPERFIL = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PERFIL"),
                Tipo = ETipoPermiso.VER
            };
            pVerPERFIL.save();
            Permiso pAgregarPERFIL = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PERFIL"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarPERFIL.save();
            Permiso pEditarPERFIL = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PERFIL"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarPERFIL.save();
            Permiso pRemoverPERFIL = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PERFIL"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverPERFIL.save();
            // NO PUEDE HACERSE NADA CON UNA SESION (SOLO LISTAR)
            //Permiso pVerSESION = new Permiso {
            //    Recurso = Parametros.GetByClave("ENTIDAD.SESION"),
            //    Tipo = ETipoPermiso.VER
            //};
            //pVerSESION.save();
            //Permiso pAgregarSESION = new Permiso {
            //    Recurso = Parametros.GetByClave("ENTIDAD.SESION"),
            //    Tipo = ETipoPermiso.AGREGAR
            //};
            //pAgregarSESION.save();
            //Permiso pEditarSESION = new Permiso {
            //    Recurso = Parametros.GetByClave("ENTIDAD.SESION"),
            //    Tipo = ETipoPermiso.EDITAR
            //};
            //pEditarSESION.save();
            //Permiso pRemoverSESION = new Permiso {
            //    Recurso = Parametros.GetByClave("ENTIDAD.SESION"),
            //    Tipo = ETipoPermiso.REMOVER
            //};
            //pRemoverSESION.save();
            Permiso pVerCONTACTO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.CONTACTO"),
                Tipo = ETipoPermiso.VER
            };
            pVerCONTACTO.save();
            Permiso pAgregarCONTACTO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.CONTACTO"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarCONTACTO.save();
            Permiso pEditarCONTACTO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.CONTACTO"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarCONTACTO.save();
            Permiso pRemoverCONTACTO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.CONTACTO"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverCONTACTO.save();
            Permiso pVerCONVENIO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.CONVENIO"),
                Tipo = ETipoPermiso.VER
            };
            pVerCONVENIO.save();
            Permiso pAgregarCONVENIO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.CONVENIO"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarCONVENIO.save();
            Permiso pEditarCONVENIO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.CONVENIO"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarCONVENIO.save();
            Permiso pRemoverCONVENIO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.CONVENIO"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverCONVENIO.save();
            Permiso pVerCUENTA = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.CUENTA"),
                Tipo = ETipoPermiso.VER
            };
            pVerCUENTA.save();
            Permiso pAgregarCUENTA = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.CUENTA"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarCUENTA.save();
            Permiso pEditarCUENTA = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.CUENTA"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarCUENTA.save();
            Permiso pRemoverCUENTA = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.CUENTA"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverCUENTA.save();
            Permiso pVerDEUDA = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.DEUDA"),
                Tipo = ETipoPermiso.VER
            };
            pVerDEUDA.save();
            Permiso pAgregarDEUDA = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.DEUDA"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarDEUDA.save();
            // NO SE PUEDEN REMOVER NI EDITAR LAS DEUDAS!!!!!!!!
            //Permiso pEditarDEUDA = new Permiso {
            //    Recurso = Parametros.GetByClave("ENTIDAD.DEUDA"),
            //    Tipo = ETipoPermiso.EDITAR
            //};
            //pEditarDEUDA.save();
            //Permiso pRemoverDEUDA = new Permiso {
            //    Recurso = Parametros.GetByClave("ENTIDAD.DEUDA"),
            //    Tipo = ETipoPermiso.REMOVER
            //};
            //pRemoverDEUDA.save();
            Permiso pVerENTIDAD = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.ENTIDAD"),
                Tipo = ETipoPermiso.VER
            };
            pVerENTIDAD.save();
            Permiso pAgregarENTIDAD = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.ENTIDAD"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarENTIDAD.save();
            Permiso pEditarENTIDAD = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.ENTIDAD"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarENTIDAD.save();
            Permiso pRemoverENTIDAD = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.ENTIDAD"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverENTIDAD.save();
            Permiso pVerESTRATEGIA = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.ESTRATEGIA"),
                Tipo = ETipoPermiso.VER
            };
            pVerESTRATEGIA.save();
            Permiso pAgregarESTRATEGIA = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.ESTRATEGIA"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarESTRATEGIA.save();
            Permiso pEditarESTRATEGIA = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.ESTRATEGIA"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarESTRATEGIA.save();
            Permiso pRemoverESTRATEGIA = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.ESTRATEGIA"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverESTRATEGIA.save();
            Permiso pVerGESTIONPERIODICA = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.GESTIONPERIODICA"),
                Tipo = ETipoPermiso.VER
            };
            pVerGESTIONPERIODICA.save();
            Permiso pAgregarGESTIONPERIODICA = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.GESTIONPERIODICA"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarGESTIONPERIODICA.save();
            Permiso pEditarGESTIONPERIODICA = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.GESTIONPERIODICA"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarGESTIONPERIODICA.save();
            Permiso pRemoverGESTIONPERIODICA = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.GESTIONPERIODICA"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverGESTIONPERIODICA.save();
            Permiso pVerLISTAGESTION = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.LISTAGESTION"),
                Tipo = ETipoPermiso.VER
            };
            pVerLISTAGESTION.save();
            Permiso pAgregarLISTAGESTION = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.LISTAGESTION"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarLISTAGESTION.save();
            Permiso pEditarLISTAGESTION = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.LISTAGESTION"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarLISTAGESTION.save();
            Permiso pRemoverLISTAGESTION = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.LISTAGESTION"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverLISTAGESTION.save();
            Permiso pVerPAGO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PAGO"),
                Tipo = ETipoPermiso.VER
            };
            pVerPAGO.save();
            Permiso pAgregarPAGO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PAGO"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarPAGO.save();
            // NO SE PUEDE EDITAR UN PAGO!!!!
            //Permiso pEditarPAGO = new Permiso {
            //    Recurso = Parametros.GetByClave("ENTIDAD.PAGO"),
            //    Tipo = ETipoPermiso.EDITAR
            //};
            //pEditarPAGO.save();
            Permiso pRemoverPAGO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PAGO"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverPAGO.save();
            Permiso pVerPERSONA = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PERSONA"),
                Tipo = ETipoPermiso.VER
            };
            pVerPERSONA.save();
            Permiso pAgregarPERSONA = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PERSONA"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarPERSONA.save();
            Permiso pEditarPERSONA = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PERSONA"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarPERSONA.save();
            Permiso pRemoverPERSONA = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PERSONA"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverPERSONA.save();
            Permiso pVerPREDICADO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PREDICADO"),
                Tipo = ETipoPermiso.VER
            };
            pVerPREDICADO.save();
            Permiso pAgregarPREDICADO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PREDICADO"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarPREDICADO.save();
            Permiso pEditarPREDICADO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PREDICADO"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarPREDICADO.save();
            Permiso pRemoverPREDICADO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PREDICADO"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverPREDICADO.save();
            Permiso pVerPRODUCTO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PRODUCTO"),
                Tipo = ETipoPermiso.VER
            };
            pVerPRODUCTO.save();
            Permiso pAgregarPRODUCTO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PRODUCTO"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarPRODUCTO.save();
            Permiso pEditarPRODUCTO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PRODUCTO"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarPRODUCTO.save();
            Permiso pRemoverPRODUCTO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.PRODUCTO"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverPRODUCTO.save();
            Permiso pVerRELACION = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.RELACION"),
                Tipo = ETipoPermiso.VER
            };
            pVerRELACION.save();
            Permiso pAgregarRELACION = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.RELACION"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarRELACION.save();
            Permiso pEditarRELACION = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.RELACION"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarRELACION.save();
            Permiso pRemoverRELACION = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.RELACION"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverRELACION.save();
            Permiso pVerTIPOCONVENIO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.TIPOCONVENIO"),
                Tipo = ETipoPermiso.VER
            };
            pVerTIPOCONVENIO.save();
            Permiso pAgregarTIPOCONVENIO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.TIPOCONVENIO"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarTIPOCONVENIO.save();
            Permiso pEditarTIPOCONVENIO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.TIPOCONVENIO"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarTIPOCONVENIO.save();
            Permiso pRemoverTIPOCONVENIO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.TIPOCONVENIO"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverTIPOCONVENIO.save();
            Permiso pVerTIPOLISTAGESTION = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.TIPOLISTAGESTION"),
                Tipo = ETipoPermiso.VER
            };
            pVerTIPOLISTAGESTION.save();
            Permiso pAgregarTIPOLISTAGESTION = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.TIPOLISTAGESTION"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarTIPOLISTAGESTION.save();
            Permiso pEditarTIPOLISTAGESTION = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.TIPOLISTAGESTION"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarTIPOLISTAGESTION.save();
            Permiso pRemoverTIPOLISTAGESTION = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.TIPOLISTAGESTION"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverTIPOLISTAGESTION.save();
            Permiso pVerJOBGENLISTAGESTION = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.JOBGENLISTAGESTION"),
                Tipo = ETipoPermiso.VER
            };
            pVerJOBGENLISTAGESTION.save();
            Permiso pAgregarJOBGENLISTAGESTION = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.JOBGENLISTAGESTION"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarJOBGENLISTAGESTION.save();
            Permiso pEditarJOBGENLISTAGESTION = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.JOBGENLISTAGESTION"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarJOBGENLISTAGESTION.save();
            Permiso pRemoverJOBGENLISTAGESTION = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.JOBGENLISTAGESTION"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverJOBGENLISTAGESTION.save();
            Permiso pVerTRAMO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.TRAMO"),
                Tipo = ETipoPermiso.VER
            };
            pVerTRAMO.save();
            Permiso pAgregarTRAMO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.TRAMO"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarTRAMO.save();
            Permiso pEditarTRAMO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.TRAMO"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarTRAMO.save();
            Permiso pRemoverTRAMO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.TRAMO"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverTRAMO.save();
            Permiso pVerVARIABLE = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.VARIABLE"),
                Tipo = ETipoPermiso.VER
            };
            pVerVARIABLE.save();
            Permiso pAgregarVARIABLE = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.VARIABLE"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarVARIABLE.save();
            Permiso pEditarVARIABLE = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.VARIABLE"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarVARIABLE.save();
            Permiso pRemoverVARIABLE = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.VARIABLE"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverVARIABLE.save();
            Permiso pVerVOCABLO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.VOCABLO"),
                Tipo = ETipoPermiso.VER
            };
            pVerVOCABLO.save();
            Permiso pAgregarVOCABLO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.VOCABLO"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarVOCABLO.save();
            Permiso pEditarVOCABLO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.VOCABLO"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarVOCABLO.save();
            Permiso pRemoverVOCABLO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.VOCABLO"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverVOCABLO.save();
            Permiso pVerGESTION = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.GESTION"),
                Tipo = ETipoPermiso.VER
            };
            pVerGESTION.save();
            Permiso pAgregarGESTION = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.GESTION"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarGESTION.save();
            Permiso pEditarGESTION = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.GESTION"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarGESTION.save();
            Permiso pRemoverGESTION = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.GESTION"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverGESTION.save();
            Permiso pVerRESULTADO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.RESULTADO"),
                Tipo = ETipoPermiso.VER
            };
            pVerRESULTADO.save();
            Permiso pAgregarRESULTADO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.RESULTADO"),
                Tipo = ETipoPermiso.AGREGAR
            };
            pAgregarRESULTADO.save();
            Permiso pEditarRESULTADO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.RESULTADO"),
                Tipo = ETipoPermiso.EDITAR
            };
            pEditarRESULTADO.save();
            Permiso pRemoverRESULTADO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.RESULTADO"),
                Tipo = ETipoPermiso.REMOVER
            };
            pRemoverRESULTADO.save();
            // NO SE PUEDE OPERAR DIRECTAMENTE CON UNA IMPUTACION
            //Permiso pVerIMPUTACION = new Permiso {
            //    Recurso = Parametros.GetByClave("ENTIDAD.IMPUTACION"),
            //    Tipo = ETipoPermiso.VER
            //};
            //pVerIMPUTACION.save();
            //Permiso pAgregarIMPUTACION = new Permiso
            //{
            //    Recurso = Parametros.GetByClave("ENTIDAD.IMPUTACION"),
            //    Tipo = ETipoPermiso.AGREGAR
            //};
            //pAgregarIMPUTACION.save();
            //Permiso pEditarIMPUTACION = new Permiso
            //{
            //    Recurso = Parametros.GetByClave("ENTIDAD.IMPUTACION"),
            //    Tipo = ETipoPermiso.EDITAR
            //};
            //pEditarIMPUTACION.save();
            //Permiso pRemoverIMPUTACION = new Permiso
            //{
            //    Recurso = Parametros.GetByClave("ENTIDAD.IMPUTACION"),
            //    Tipo = ETipoPermiso.REMOVER
            //};
            //pRemoverIMPUTACION.save();
            Permiso pVerRECIBO = new Permiso {
                Recurso = Parametros.GetByClave("ENTIDAD.RECIBO"),
                Tipo = ETipoPermiso.VER
            };
            pVerRECIBO.save();
            // NO SE PUEDE OPERAR DIRECTAMENTE CON UN RECIBO
            //Permiso pAgregarRECIBO = new Permiso
            //{
            //    Recurso = Parametros.GetByClave("ENTIDAD.RECIBO"),
            //    Tipo = ETipoPermiso.AGREGAR
            //};
            //pAgregarRECIBO.save();
            //Permiso pEditarRECIBO = new Permiso
            //{
            //    Recurso = Parametros.GetByClave("ENTIDAD.RECIBO"),
            //    Tipo = ETipoPermiso.EDITAR
            //};
            //pEditarRECIBO.save();
            //Permiso pRemoverRECIBO = new Permiso
            //{
            //    Recurso = Parametros.GetByClave("ENTIDAD.RECIBO"),
            //    Tipo = ETipoPermiso.REMOVER
            //};
            //pRemoverRECIBO.save();
            #endregion permisos entidades

            ///////////////////////////////////////////////////////
            // Se crean permisos contra botones
            ///////////////////////////////////////////////////////

            #region permisos botones
            Permiso pBotonConvenioGenerar = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.CONVENIO.GENERAR"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonConvenioGenerar.save();
            Permiso pBotonConvenioActivar = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.CONVENIO.ACTIVAR"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonConvenioActivar.save();
            Permiso pBotonConvenioImprimir = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.CONVENIO.IMPRIMIR"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonConvenioImprimir.save();
            Permiso pBotonCuentaCancelar = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.CUENTA.CANCELAR"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonCuentaCancelar.save();
            Permiso pBotonContactoVerificar = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.CONTACTO.VERIFICAR"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonContactoVerificar.save();
            Permiso pBotonContactoCrear = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.CONTACTO.CREAR"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonContactoCrear.save();
            Permiso pBotonGestionarActual = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.GESTIONAR.ACTUAL"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonGestionarActual.save();
            Permiso pBotonGestionarSeleccion = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.GESTIONAR.SELECCION"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonGestionarSeleccion.save();
            Permiso pBotonGestionarTelefonica = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.GESTIONAR.TELEFONICA"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonGestionarTelefonica.save();
            Permiso pBotonGestionarPostal = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.GESTIONAR.POSTAL"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonGestionarPostal.save();
            Permiso pBotonGestionarTerreno = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.GESTIONAR.TERRENO"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonGestionarTerreno.save();
            Permiso pBotonGestionarBack = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.GESTIONAR.BACKOFFICE"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonGestionarBack.save();
            Permiso pBotonGestionarAltaPago = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.GESTIONAR.ALTAPAGO"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonGestionarAltaPago.save();
            Permiso pBotonGestionarAltaConvenio = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.GESTIONAR.ALTACONVENIO"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonGestionarAltaConvenio.save();
            Permiso pBotonGestionarAltaDeuda = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.GESTIONAR.ALTADEUDA"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonGestionarAltaDeuda.save();
            Permiso pBotonGestionarGestion = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.GESTION.GESTIONAR"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonGestionarGestion.save();
            Permiso pBotonImprimir = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.GESTION.IMPRIMIR"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonImprimir.save();
            Permiso pBotonImprimirTodo = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.GESTION.IMPRIMIR.TODO"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonImprimirTodo.save();
            Permiso pBotonReciboReimprimir = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.RECIBO.REIMPRIMIR"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonReciboReimprimir.save();
            Permiso pBotonCuentaEditar = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.CUENTA.EDITAR"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonCuentaEditar.save();
            Permiso pBotonContactoEditar = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.CONTACTO.EDITAR"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonContactoEditar.save();
            Permiso pBotonPersonaEditar = new Permiso {
                Recurso = Parametros.GetByClave("BOTON.PERSONA.EDITAR"),
                Tipo = ETipoPermiso.EJECUTAR
            };
            pBotonPersonaEditar.save();
            #endregion permisos botones

            ///////////////////////////////////////////////////////
            // Se crea un rol para los administradores
            ///////////////////////////////////////////////////////

            #region roles
            Rol roladmin = new Rol {Nombre = "ADMIN", Descripcion = "ADMINISTRADORES DE SISTEMAS", Activado = true};
            //roladmin.agregarPermiso(pBackup);
            //roladmin.agregarPermiso(pGestel);
            //roladmin.agregarPermiso(pGestsel);
            //roladmin.agregarPermiso(pGeslegal);
            //roladmin.agregarPermiso(pDgadmin);
            //roladmin.agregarPermiso(pDgadminpg);
            //roladmin.agregarPermiso(pDgadmindd);
            //roladmin.agregarPermiso(pConfParam);
            //roladmin.agregarPermiso(pConflist);
            //roladmin.agregarPermiso(pInfogest);
            //roladmin.agregarPermiso(pAbmJobs);
            //roladmin.agregarPermiso(pInfogenlist);
            //roladmin.agregarPermiso(pInfocobranzas);
            //roladmin.agregarPermiso(pInterfaltactas);
            //roladmin.agregarPermiso(pInterfupdpers);
            //roladmin.agregarPermiso(pInterfupdctas);
            //roladmin.agregarPermiso(pInterfupdmovs);
            //roladmin.agregarPermiso(pAbmVar);
            roladmin.agregarPermiso(pSeguridad);
            roladmin.agregarPermiso(pVerUsuario);
            roladmin.agregarPermiso(pAgregarUsuario);
            roladmin.agregarPermiso(pEditarUsuario);
            roladmin.agregarPermiso(pRemoverUsuario);
            roladmin.agregarPermiso(pVerROL);
            roladmin.agregarPermiso(pAgregarROL);
            roladmin.agregarPermiso(pEditarROL);
            roladmin.agregarPermiso(pRemoverROL);
            roladmin.agregarPermiso(pVerPERMISO);
            roladmin.agregarPermiso(pAgregarPERMISO);
            roladmin.agregarPermiso(pEditarPERMISO);
            roladmin.agregarPermiso(pRemoverPERMISO);
            roladmin.agregarPermiso(pVerPARAMETRO);
            //roladmin.agregarPermiso(pAgregarPARAMETRO);
            //roladmin.agregarPermiso(pEditarPARAMETRO);
            //roladmin.agregarPermiso(pRemoverPARAMETRO);
            roladmin.save();

            // Se asignan roles a los usuarios
            admin.agregarRol(roladmin); // forma 1
            #endregion roles

            ///////////////////////////////////////////////////////
            // Se crean nodos del arbol de configuracion de gestión
            ///////////////////////////////////////////////////////

            #region NodosTreeGestion
            NodoTree ntseg0 = new NodoTree {
                Nivel = 0,
                Descripcion = "Seguridad y Perfiles",
                Texto = "Seleccione un nodo del árbol de opciones...",
                IdImagenSeleccionado = 0,
                IdImagenNoSeleccionado = 0
            };
            NodoTree ntseg01 = new NodoTree {
                Nivel = 1,
                Descripcion = "Usuarios",
                Texto = "cuConfigurarUsuarios.CUListUsuarios:Creación y edición de usuarios que podrán operar el Sistema",
                IdImagenSeleccionado = 1,
                IdImagenNoSeleccionado = 1
            };
            NodoTree ntseg02 = new NodoTree {
                Nivel = 1,
                Descripcion = "Roles",
                Texto = "cuConfigurarUsuarios.CUListRoles:Conjunto de permisos sobre las distintas funcionalidades del Sistema.",
                IdImagenSeleccionado = 2,
                IdImagenNoSeleccionado = 2
            };
            NodoTree ntseg03 = new NodoTree {
                Nivel = 1,
                Descripcion = "Perfiles",
                Texto = "cuConfigurarUsuarios.CUListPerfiles:Conjunto de perfiles a los cuales puede asignarse los usuarios",
                IdImagenSeleccionado = 3,
                IdImagenNoSeleccionado = 3,
            };
            ntseg0.NodosHijos.Add(ntseg01);
            ntseg0.NodosHijos.Add(ntseg02);
            ntseg0.NodosHijos.Add(ntseg03);
            ntseg0.save();

            NodoTree ntdg0 = new NodoTree {
                Nivel = 0,
                Descripcion = "Datos de Gestión",
                Texto = "Seleccione un nodo del árbol de opciones...",
                IdImagenSeleccionado = 0,
                IdImagenNoSeleccionado = 0
            };
            NodoTree ntdg01 = new NodoTree {
                Nivel = 1,
                Descripcion = "Entidades",
                Texto = "cuAbmEntidad.CUListEntidad:Organizaciones que poseen las cuentas sobre las cuales se realizan las gestiones. Son las organizaciones clientes",
                IdImagenSeleccionado = 1,
                IdImagenNoSeleccionado = 1
            };
            NodoTree ntdg02 = new NodoTree {
                Nivel = 1,
                Descripcion = "Personas",
                Texto = "cuAbmPersona.CUListPersonas:Toda persona relacionada con alguna cuenta cargada en el Sistema. Por ej. un titular de una cta. (Deudor) o un garante de una cta.",
                IdImagenSeleccionado = 2,
                IdImagenNoSeleccionado = 2
            };
            NodoTree ntdg03 = new NodoTree {
                Nivel = 1,
                Descripcion = "Gestiones",
                Texto = "cuAbmGestion.CUListGestiones:Listado de gestiones generadas.",
                IdImagenSeleccionado = 3,
                IdImagenNoSeleccionado = 3,
            };
            NodoTree ntdg04 = new NodoTree {
                Nivel = 1,
                Descripcion = "Convenios",
                Texto = "cuAbmConvenio.CUListConvenios:Listado de convenios generados",
                IdImagenSeleccionado = 4,
                IdImagenNoSeleccionado = 4,
            };
            ntdg0.NodosHijos.Add(ntdg01);
            ntdg0.NodosHijos.Add(ntdg02);
            ntdg0.NodosHijos.Add(ntdg03);
            ntdg0.NodosHijos.Add(ntdg04);
            ntdg0.save();

            NodoTree ntg0 = new NodoTree {
                Nivel = 0,
                Descripcion = "Gestiones Asociadas",
                Texto = "Seleccione un nodo del árbol de opciones...",
                IdImagenSeleccionado = 0,
                IdImagenNoSeleccionado = 0
            };
            NodoTree ntg01 = new NodoTree {
                Nivel = 1,
                Descripcion = "Bandeja de Entrada",
                Texto = "Listado de gestiones, pendientes de ó en gestión, asignadas al usuario activo",
                IdImagenSeleccionado = 1,
                IdImagenNoSeleccionado = 1
            };
            NodoTree ntg02 = new NodoTree {
                Nivel = 1,
                Descripcion = "Gestiones Pendientes",
                Texto = "cuAbmGestion.CUListGestiones:PENDIENTE:Listado de gestiones pendientes",
                IdImagenSeleccionado = 7,
                IdImagenNoSeleccionado = 7
            };
            NodoTree ntg03 = new NodoTree {
                Nivel = 1,
                Descripcion = "Gestiones Realizadas",
                Texto = "cuAbmGestion.CUListGestiones:FINALIZADA:Listado de gestiones realizadas",
                IdImagenSeleccionado = 2,
                IdImagenNoSeleccionado = 2
            };
            NodoTree ntg0101 = new NodoTree {
                Nivel = 2,
                Descripcion = "Gestión Telefónica",
                Texto = "cuAbmGestion.CUListGestiones:TELEFONICA:Gestiones telefónicas disponibles para asignar o asigandas al usuario actual",
                IdImagenSeleccionado = 3,
                IdImagenNoSeleccionado = 3
            };
            NodoTree ntg0102 = new NodoTree {
                Nivel = 2,
                Descripcion = "Gestión BackOffice",
                Texto = "cuAbmGestion.CUListGestiones:BACKOFFICE:Gestiones de backoffice disponibles para asignar o asigandas al usuario actual",
                IdImagenSeleccionado = 4,
                IdImagenNoSeleccionado = 4
            };
            NodoTree ntg0103 = new NodoTree {
                Nivel = 2,
                Descripcion = "Gestión Postal",
                Texto = "cuAbmGestion.CUListGestiones:POSTAL:Gestiones postales disponibles para asignar o asigandas al usuario actual",
                IdImagenSeleccionado = 5,
                IdImagenNoSeleccionado = 5
            };
            NodoTree ntg0104 = new NodoTree {
                Nivel = 2,
                Descripcion = "Gestión Terreno",
                Texto = "cuAbmGestion.CUListGestiones:TERRENO:Gestiones de terreno disponibles para asignar o asigandas al usuario actual",
                IdImagenSeleccionado = 6,
                IdImagenNoSeleccionado = 6
            };
            ntg01.NodosHijos.Add(ntg0101);
            ntg01.NodosHijos.Add(ntg0102);
            ntg01.NodosHijos.Add(ntg0103);
            ntg01.NodosHijos.Add(ntg0104);
            ntg0.NodosHijos.Add(ntg01);
            ntg0.NodosHijos.Add(ntg02);
            ntg0.NodosHijos.Add(ntg03);
            ntg0.save();

            NodoTree ntcfg0 = new NodoTree {
                Nivel = 0,
                Descripcion = "Configuración de Listas",
                Texto = "Seleccione un nodo del árbol de opciones...",
                IdImagenSeleccionado = 0,
                IdImagenNoSeleccionado = 0
            };
            NodoTree ntcfg01 = new NodoTree {
                Nivel = 1,
                Descripcion = "Tipos de Listas",
                Texto = "cuAbmTipoLista.CUListTiposLista:Contiene la configuración de las Listas de Gestión que se generarán periodicamente",
                IdImagenSeleccionado = 1,
                IdImagenNoSeleccionado = 1
            };
            NodoTree ntcfg02 = new NodoTree {
                Nivel = 1,
                Descripcion = "Estrategias",
                Texto = "cuAbmEstrategia.CUListEstrategias:Regla que define el filtro por el cual se agrupan las cuentas en las distintas Listas de Gestión",
                IdImagenSeleccionado = 2,
                IdImagenNoSeleccionado = 2,
            };
            NodoTree ntcfg03 = new NodoTree {
                Nivel = 1,
                Descripcion = "Variables",
                Texto = "cuAbmVariable.CUListVariables:Valor definido por el usuario. Se utiliza en la configuración de Estrategias",
                IdImagenSeleccionado = 3,
                IdImagenNoSeleccionado = 3,
            };
            NodoTree ntcfg04 = new NodoTree {
                Nivel = 1,
                Descripcion = "Listas Generadas",
                Texto = "cuListaGestion.CUListListas:Listado de Listas de Gestión generadas y activas",
                IdImagenSeleccionado = 4,
                IdImagenNoSeleccionado = 4
            };
            ntcfg0.NodosHijos.Add(ntcfg01);
            ntcfg0.NodosHijos.Add(ntcfg02);
            ntcfg0.NodosHijos.Add(ntcfg03);
            ntcfg0.NodosHijos.Add(ntcfg04);
            ntcfg0.save();
            #endregion

            ////////////////////////////////////////////////////////
            // Se crean las formas de pago para las moras canceladas
            ////////////////////////////////////////////////////////

            #region formas pago
            (new Parametro {
                Clave = "FORMAPAGO.EFECTIVO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "EFECTIVO",
                Valorstring = "EFECTIVO",
                Orden = 1
            }).save();
            (new Parametro {
                Clave = "FORMAPAGO.BONOS",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "BONOS",
                Valorstring = "BONOS",
                Orden = 2
            }).save();
            (new Parametro {
                Clave = "FORMAPAGO.DOLARES",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "DOLARES",
                Valorstring = "DOLARES",
                Orden = 3
            }).save();
            (new Parametro {
                Clave = "FORMAPAGO.CHEQUE",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "CHEQUE",
                Valorstring = "CHEQUE",
                Orden = 4
            }).save();
            (new Parametro {
                Clave = "FORMAPAGO.OTRO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "OTRO",
                Valorstring = "OTRO",
                Orden = 5
            }).save();
            #endregion formas pago

            ///////////////////////////////////////////////////
            // Se crean los tipos de gestion de mora aceptables
            ///////////////////////////////////////////////////

            #region tipos gestion
            (new Parametro {
                Clave = "TIPOGESTION.POSTAL",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "POSTAL",
                Valorstring = "POSTAL",
                Valorbool = true, // es un tipo generable via lista y requiere Contacto/Contactado
                Valordouble = 0,  // Costo de gestion (va a GASTO)
                Orden = 1
            }).save();
            (new Parametro {
                Clave = "TIPOGESTION.TELEFONICA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "TELEFONICA",
                Valorstring = "TELEFONICA",
                Valorbool = true,// es un tipo generable via lista y requiere Contacto/Contactado
                Valordouble = 0, // Costo de gestion (va a GASTO)
                Orden = 2
            }).save();
            (new Parametro {
                Clave = "TIPOGESTION.ADMINISTRATIVA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "ADMINISTRATIVA",
                Valorstring = "ADMINISTRATIVA",
                Valordouble = 0, // Costo de gestion (va a GASTO)
                Orden = 3
            }).save();
            (new Parametro {
                Clave = "TIPOGESTION.TERRENO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "TERRENO",
                Valorstring = "TERRENO",
                Valorbool = true,// es un tipo generable via lista y requiere Contacto/Contactado
                Valordouble = 0, // Costo de gestion (va a GASTO)
                Orden = 4
            }).save();
            (new Parametro {
                Clave = "TIPOGESTION.BACKOFFICE",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "BACKOFFICE",
                Valorstring = "BACKOFFICE",
                Valorbool = true,// es un tipo generable via lista y requiere Contacto/Contactado
                Valordouble = 0, // Costo de gestion (va a GASTO)
                Orden = 5
            }).save();
            (new Parametro {
                Clave = "TIPOGESTION.LEGAL",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "LEGAL",
                Valorstring = "LEGAL",
                Valordouble = 0, // Costo de gestion (va a GASTO)
                Orden = 6
            }).save();
            #endregion tipos gestion

            //////////////////////////////////////////////////////////
            // Se crean los tipos de facturas permitidos en el sistema
            //////////////////////////////////////////////////////////

            #region tipos recibos
            (new Parametro {
                Clave = "TIPOFACTURA.A",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "FACTURA A",
                Valorstring = "FACTURA A",
                Valorbool = true,
                Orden = 1
            }).save();
            (new Parametro {
                Clave = "TIPOFACTURA.B",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "FACTURA B",
                Valorstring = "FACTURA B",
                Valorbool = true,
                Orden = 2
            }).save();
            (new Parametro {
                Clave = "TIPOFACTURA.C",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "FACTURA C",
                Valorstring = "FACTURA C",
                Valorbool = true,
                Orden = 3
            }).save();
            (new Parametro {
                Clave = "TIPOFACTURA.NINGUNO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "NINGUNO",
                Valorstring = "NINGUNO",
                Orden = 4
            }).save();
            (new Parametro {
                Clave = "TIPOFACTURA.RECIBOPROPIO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "RECIBO PROPIO",
                Valorstring = "RECIBO ALAMO",
                Valorbool = true,
                Orden = 5
            }).save();
            (new Parametro {
                Clave = "TIPOFACTURA.RECIBOPOR3",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "RECIBO DE CLIENTE",
                Valorstring = "RECIBO CLENTE",
                Orden = 6
            }).save();
            #endregion tipos recibos

            ///////////////////////////////////////////////////
            // Se crean los tipos de contacto para los datos de
            // ubicación de las personas.
            ///////////////////////////////////////////////////

            #region tipos contacto
            (new Parametro {
                Clave = "TIPOCONTACTO.PERSONAL",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "PERSONAL",
                Valorstring = "PERSONAL",
                Orden = 1
            }).save();
            (new Parametro {
                Clave = "TIPOCONTACTO.LABORAL",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "LABORAL",
                Valorstring = "LABORAL",
                Orden = 2
            }).save();
            (new Parametro {
                Clave = "TIPOCONTACTO.FAMILIAR",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "FAMILIAR",
                Valorstring = "FAMILIAR",
                Orden = 3
            }).save();
            (new Parametro {
                Clave = "TIPOCONTACTO.OTRO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "OTRO",
                Valorstring = "OTRO",
                Orden = 4
            }).save();
            #endregion tipos contacto

            ///////////////////////////////////////////////////
            // Se crean los estados civiles de las personas.
            ///////////////////////////////////////////////////

            #region estados civiles
            (new Parametro {
                Clave = "ESTADOCIVIL.CASADO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "CASADO",
                Valorstring = "CASADO",
                Orden = 1
            }).save();
            (new Parametro {
                Clave = "ESTADOCIVIL.SOLTERO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "SOLTERO",
                Valorstring = "SOLTERO",
                Orden = 2
            }).save();
            (new Parametro {
                Clave = "ESTADOCIVIL.DIVORCIADO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "DIVORCIADO",
                Valorstring = "DIVORCIADO",
                Orden = 3
            }).save();
            (new Parametro {
                Clave = "ESTADOCIVIL.VIUDO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "VIUDO",
                Valorstring = "VIUDO",
                Orden = 4
            }).save();
            (new Parametro {
                Clave = "ESTADOCIVIL.SINDATOS",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "SIN DATOS",
                Valorstring = "SIN DATOS",
                Orden = 5
            }).save();
            #endregion estados civiles

            ///////////////////////////////////////////////////
            // Se crean los Sexos de las personas.
            ///////////////////////////////////////////////////

            #region sexos
            (new Parametro {
                Clave = "SEXO.MASCULINO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "MASCULINO",
                Valorstring = "MASCULINO",
                Orden = 1
            }).save();
            (new Parametro {
                Clave = "SEXO.FEMENINO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "FEMENINO",
                Valorstring = "FEMENINO",
                Orden = 2
            }).save();
            (new Parametro {
                Clave = "SEXO.NOAPLICA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "NO APLICA",
                Valorstring = "NO APLICA",
                Orden = 3
            }).save();
            (new Parametro {
                Clave = "SEXO.DESCONOCIDO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "DESCONOCIDO",
                Valorstring = "DESCONOCIDO",
                Orden = 4
            }).save();
            #endregion estados civiles

            ////////////////////////////////////////////////////////////
            // Se crean los tipos de estados economicos de las personas.
            ////////////////////////////////////////////////////////////

            #region estado economicos
            (new Parametro {
                Clave = "ESTADOECONOMICO.BAJA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "CLASE BAJA",
                Valorstring = "CLASE BAJA",
                Orden = 1
            }).save();
            (new Parametro {
                Clave = "ESTADOECONOMICO.MEDIABAJA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "CLASE MEDIA-BAJA",
                Valorstring = "CLASE MEDIA-BAJA",
                Orden = 2
            }).save();
            (new Parametro {
                Clave = "ESTADOECONOMICO.MEDIA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "CLASE MEDIA",
                Valorstring = "CLASE MEDIA",
                Orden = 3
            }).save();
            (new Parametro {
                Clave = "ESTADOECONOMICO.MEDIAALTA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "CLASE MEDIA-ALTA",
                Valorstring = "CLASE MEDIA-ALTA",
                Orden = 4
            }).save();
            (new Parametro {
                Clave = "ESTADOECONOMICO.ALTA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "CLASE ALTA",
                Valorstring = "CLASE ALTA",
                Orden = 5
            }).save();
            #endregion estados economicos

            ///////////////////////////////////////////////////
            // Se crean los tipos de contacto para los datos de
            // ubicación de las personas.
            ///////////////////////////////////////////////////

            #region condicion iva
            (new Parametro {
                Clave = "CONDICIONIVA.INSCRIPTO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "INSCRIPTO",
                Valorstring = "INSCRIPTO",
                Orden = 1
            }).save();
            (new Parametro {
                Clave = "CONDICIONIVA.MONOTRIBUTISTA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "MONOTRIBUTISTA",
                Valorstring = "MONOTRIBUTISTA",
                Orden = 2
            }).save();
            (new Parametro {
                Clave = "CONDICIONIVA.FINAL",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "CONSUMIDOR FINAL",
                Valorstring = "CONSUMIDOR FINAL",
                Orden = 3
            }).save();
            (new Parametro {
                Clave = "CONDICIONIVA.EXCENTO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "EXCENTO",
                Valorstring = "EXCENTO",
                Orden = 4
            }).save();
            #endregion condicion iva

            ///////////////////////////////////////////////////
            // Se crean los tipos de relaciones entre personas
            // ubicación de las personas.
            ///////////////////////////////////////////////////

            #region tipos relacion
            (new Parametro {
                Clave = "TIPORELACION.CONYUGE",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "CONYUGE",
                Valorstring = "CONYUGE",
                Orden = 1
            }).save();
            (new Parametro {
                Clave = "TIPORELACION.FAMILIAR",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "FAMILIAR",
                Valorstring = "FAMILIAR",
                Orden = 2
            }).save();
            (new Parametro {
                Clave = "TIPORELACION.CODEUDOR",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "CODEUDOR",
                Valorstring = "CODEUDOR",
                Orden = 3
            }).save();
            (new Parametro {
                Clave = "TIPORELACION.TUTOR",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "TUTOR",
                Valorstring = "TUTOR",
                Orden = 4
            }).save();
            (new Parametro {
                Clave = "TIPORELACION.VECINO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "VECINO",
                Valorstring = "VECINO",
                Orden = 5
            }).save();
            (new Parametro {
                Clave = "TIPORELACION.OTRO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "OTRO",
                Valorstring = "OTRO",
                Orden = 6
            }).save();
            #endregion tipos contacto

            ///////////////////////////////////////////////////
            // Se crean los conceptos de deuda.
            ///////////////////////////////////////////////////

            #region conceptos deuda
            (new Parametro {
                Clave = "CONCEPTODEUDA.ORIGEN",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "INGRESO DEUDA INICIAL",
                Valorstring = "INGRESO DEUDA INICIAL",
                Valorlong = 0, // esto significa que genera punitorio
                Valorbool = true, // esto significa que puede entrar en convenio
                Orden = 1
            }).save();
            (new Parametro {
                Clave = "CONCEPTODEUDA.GASTO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "GASTOS",
                Valorstring = "GASTOS",
                Valorlong = 0, // esto significa que NO genera punitorio
                Orden = 2
            }).save();
            (new Parametro {
                Clave = "CONCEPTODEUDA.HONORARIO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "HONORARIOS",
                Valorstring = "HONORARIOS",
                Valorlong = 0, // esto significa que NO genera punitorio
                Orden = 3
            }).save();
            (new Parametro {
                Clave = "CONCEPTODEUDA.CONVENIO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "DEUDA DE CONVENIO",
                Valorstring = "DEUDA DE CONVENIO",
                Valorlong = 1, // esto significa que genera punitorio
                Orden = 11 // hasta 10 se puede seleccionar a mano
            }).save();
            (new Parametro {
                Clave = "CONCEPTODEUDA.AJUSTE",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "AJUSTE",
                Valorstring = "AJUSTE",
                Valorlong = 0, // esto significa que NO genera punitorio
                Orden = 12 // hasta 10 se puede seleccionar a mano
            }).save();
            (new Parametro {
                Clave = "CONCEPTODEUDA.PUNITORIO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "PUNITORIOS",
                Valorstring = "PUNITORIOS",
                Valorlong = 0,  // esto significa que NO genera punitorio
                Orden = 14 // hasta 10 se puede seleccionar a mano
            }).save();
            (new Parametro {
                Clave = "CONCEPTODEUDA.REVERSION",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "REVERSION",
                Valorstring = "REVERSION",
                Valorlong = 0, // esto significa que NO genera punitorio
                Orden = 15 // hasta 10 se puede seleccionar a mano
            }).save();
            #endregion conceptos deuda

            ///////////////////////////////////////////////////
            // Se crean los detalles de deuda.
            ///////////////////////////////////////////////////

            #region detalles deuda
            (new Parametro {
                Clave = "DETALLEDEUDA.APERTURALEGAJO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "APERTURA LEGAJO",
                Valorstring = "APERTURA LEGAJO",
                Valorlong = 2,
                // determina a que concepto de deuda
                // pertenece (0 significa para todos)
                Orden = 1
            }).save();
            (new Parametro {
                Clave = "DETALLEDEUDA.ADMINISTRACION",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "GASTO ADMINISTRATIVO",
                Valorstring = "GASTO ADMINISTRATIVO",
                Valorlong = 2,
                Orden = 2
            }).save();
            (new Parametro {
                Clave = "DETALLEDEUDA.DILIGENCIA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "GASTO POR DILIGENCIA",
                Valorstring = "GASTO POR DILIGENCIA",
                Valorlong = 2,
                Orden = 3
            }).save();
            (new Parametro {
                Clave = "DETALLEDEUDA.GESTION",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "GASTO POR GESTION",
                Valorstring = "GASTO POR GESTION",
                Valorlong = 2,
                Orden = 4
            }).save();
            (new Parametro {
                Clave = "DETALLEDEUDA.JUDICIALES",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "GASTO JUDICIAL",
                Valorstring = "GASTO JUDICIAL",
                Valorlong = 2,
                Orden = 5
            }).save();
            (new Parametro {
                Clave = "DETALLEDEUDA.SELLADO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "GASTO DE SELLADO",
                Valorstring = "GASTO DE SELLADO",
                Valorlong = 2,
                Orden = 6
            }).save();
            (new Parametro {
                Clave = "DETALLEDEUDA.HONOREXTRA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "HONORARIO EXTRA",
                Valorstring = "HONORARIO EXTRA",
                Valorlong = 3,
                Orden = 7
            }).save();
            (new Parametro {
                Clave = "DETALLEDEUDA.JURIDICO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "HONORARIO JURIDICO",
                Valorstring = "HONORARIO JURIDICO",
                Valorlong = 3,
                Orden = 8
            }).save();
            (new Parametro {
                Clave = "DETALLEDEUDA.CUOTA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "CUOTA",
                Valorstring = "CUOTA",
                Valorlong = 11,
                Orden = 9
            }).save();
            (new Parametro {
                Clave = "DETALLEDEUDA.ANTICIPO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "ANTICIPO",
                Valorstring = "ANTICIPO",
                Valorlong = 11,
                Orden = 10
            }).save();
            (new Parametro {
                Clave = "DETALLEDEUDA.ATRASO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "ATRASO DE ANTICIPO/CUOTA",
                Valorstring = "ATRASO DE ANTICIPO/CUOTA",
                Valorlong = 14,
                Orden = 11
            }).save();
            (new Parametro {
                Clave = "DETALLEDEUDA.NINGUNO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "NINGUNO",
                Valorstring = "NINGUNO",
                Valorlong = 0,
                Orden = 12
            }).save();
            (new Parametro {
                Clave = "DETALLEDEUDA.MIGRADO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "DEUDA MIGRADA",
                Valorstring = "DEUDA MIGRADA",
                Valorlong = 0,
                Orden = 13
            }).save();
            #endregion detalles deuda

            ///////////////////////////////////////////////////
            // Se crean los tipos de convenios.
            ///////////////////////////////////////////////////

            #region tipos convenio
            (new Parametro {
                Clave = "TIPOCONVENIO.GRAL6CUOTAS",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "GENERAL 6 CUOTAS",
                // en formulas: cap=capital original; cta=cuota; cpc= capital de la cuota
                Valorstring = "((cap + (cap*6))/6):1:0:((cap*0.0175)/6)",
                // formulas (intere:honor:gastos:otros)
                Valorlong = 6,
                // cantidad de cuotas
                Valorchar = '2',
                // max cuotas vencidas permitidas
                Orden = 1
            }).save();
            (new Parametro {
                Clave = "TIPOCONVENIO.GRAL12CUOTAS",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "GENERAL 12 CUOTAS",
                // en formulas: cap=capital original; cta=cuota; cpc= capital de la cuota
                Valorstring = "((cap + (cap*24))/12):1:0:((cap*0.0175)/12)",
                // formulas (intere:honor:gastos:otros)
                Valorlong = 12,
                // cantidad de cuotas
                Valorchar = '2',
                // max cuotas vencidas permitidas
                Orden = 2
            }).save();
            #endregion tipos contacto

            ///////////////////////////////////////////////////
            // Se crean los origenes de un contacto.
            ///////////////////////////////////////////////////

            #region origen contacto
            (new Parametro {
                Clave = "ORIGENCONTACTO.CLIENTE",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "CLIENTE",
                Valorstring = "CLIENTE",
                Orden = 1
            }).save();
            (new Parametro {
                Clave = "ORIGENCONTACTO.PAGAMARILLA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "PAGINAS AMARILLAS",
                Valorstring = "PAGINAS AMARILLAS",
                Valorbool = true,//puede ser modificado/eliminado
                Orden = 2,
            }).save();
            (new Parametro {
                Clave = "ORIGENCONTACTO.PADRON",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "PADRON",
                Valorstring = "PADRON",
                Valorbool = true,//puede ser modificado/eliminado
                Orden = 3
            }).save();
            (new Parametro {
                Clave = "ORIGENCONTACTO.RIESGONET",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "RIESGONET",
                Valorstring = "RIESGONET",
                Valorbool = true,//puede ser modificado/eliminado
                Orden = 4
            }).save();
            (new Parametro {
                Clave = "ORIGENCONTACTO.OTRO",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.GESTION,
                Nombre = "OTRO",
                Valorstring = "OTRO",
                Valorbool = true,//puede ser modificado/eliminado
                Orden = 5
            }).save();
            #endregion origen contacto

            ///////////////////////////////////////////////////
            // Se crean las cartas para la gestión postal
            ///////////////////////////////////////////////////

            #region Cartas
            (new Parametro {
                Clave = "CARTA.PREJUDICIAL",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "CARTA 1. GESTIÓN PREJUDICIAL",
                Valorstring = "TEMPGESTIONPREJUDICIAL.DOT",
                Valorbool = true,
                //puede ser modificado/eliminado
                Orden = 1
            }).save();
            (new Parametro {
                Clave = "CARTA.COLUMBIA",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "CARTA 1. BANCO COLUMBIA",
                Valorstring = "TEMPBANCOCOLUMBIA.DOT",
                Valorbool = true,
                //puede ser modificado/eliminado
                Orden = 2
            }).save();
            (new Parametro {
                Clave = "CARTA.INTIMACION",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "CARTA 2. CARTA INTIMACIÓN",
                Valorstring = "TEMPINTIMACION.DOT",
                Valorbool = true,
                //puede ser modificado/eliminado
                Orden = 3
            }).save();
            (new Parametro {
                Clave = "CARTA.INTIMACIONMF",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "CARTA 3. MF FORESTAL",
                Valorstring = "TEMPINTIMACIONMFFORESTAL.DOT",
                Valorbool = true,
                //puede ser modificado/eliminado
                Orden = 4
            }).save();
            (new Parametro
            {
                Clave = "CARTA.INTIMACIONJUD",
                Clase = EClaseParametro.SISTEMA,
                Tipo = ETipoParametro.BASE,
                Nombre = "CARTA 3. INTIMACIÓN JUDICIAL",
                Valorstring = "TEMPINTIMACIONJUDICIAL.DOT",
                Valorbool = true,//puede ser modificado/eliminado
                Orden = 4
            }).save();

            #endregion

            // ReSharper restore InconsistentNaming
        }