Пример #1
0
        public static void Init()
        {
            XVar dalTableacceso_ugmembers = XVar.Array();

            dalTableacceso_ugmembers["UserName"] = new XVar("type", 200, "varname", "UserName");
            dalTableacceso_ugmembers["GroupID"]  = new XVar("type", 3, "varname", "GroupID");
            dalTableacceso_ugmembers.InitAndSetArrayItem(true, "UserName", "key");
            dalTableacceso_ugmembers.InitAndSetArrayItem(true, "GroupID", "key");
            GlobalVars.dal_info["PermisosDB_at_192_168_1_123_dbo_acceso_ugmembers"] = dalTableacceso_ugmembers;
        }
Пример #2
0
        public static void Init()
        {
            XVar dalTableacceso_ugrights = XVar.Array();

            dalTableacceso_ugrights["TableName"]  = new XVar("type", 200, "varname", "fldTableName");
            dalTableacceso_ugrights["GroupID"]    = new XVar("type", 3, "varname", "GroupID");
            dalTableacceso_ugrights["AccessMask"] = new XVar("type", 200, "varname", "AccessMask");
            dalTableacceso_ugrights.InitAndSetArrayItem(true, "TableName", "key");
            dalTableacceso_ugrights.InitAndSetArrayItem(true, "GroupID", "key");
            GlobalVars.dal_info["PermisosDB_at_192_168_1_123_dbo_acceso_ugrights"] = dalTableacceso_ugrights;
        }
Пример #3
0
        /**
         * Set the DBpublic XVar object
         * @param String leftWrapper
         * @param String rightWrapper
         */
        private XVar InitDbFunctions(XVar leftWrapper, XVar rightWrapper)
        {
            XVar extraParams = getDbFunctionsExtraParams();

            if (!leftWrapper.IsEmpty() && !rightWrapper.IsEmpty())
            {
                extraParams.InitAndSetArrayItem(leftWrapper, "leftWrap");
                extraParams.InitAndSetArrayItem(rightWrapper, "rightWrap");
            }
            _functions = GetDbFunctions(extraParams);
            return(null);
        }
Пример #4
0
        public static void Init()
        {
            XVar dalTableESTADO_COMPESADO = XVar.Array();

            dalTableESTADO_COMPESADO["id_estado_compesado"] = new XVar("type", 3, "varname", "id_estado_compesado");
            dalTableESTADO_COMPESADO["estado_compesado"]    = new XVar("type", 200, "varname", "estado_compesado");
            dalTableESTADO_COMPESADO.InitAndSetArrayItem(true, "id_estado_compesado", "key");
            GlobalVars.dal_info["PermisosDB_at_192_168_1_123_dbo_ESTADO_COMPESADO"] = dalTableESTADO_COMPESADO;
        }
Пример #5
0
        public static void Init()
        {
            XVar dalTableESTADO_PERSONALES = XVar.Array();

            dalTableESTADO_PERSONALES["id_estado_personal"] = new XVar("type", 3, "varname", "id_estado_personal");
            dalTableESTADO_PERSONALES["estado_personal"]    = new XVar("type", 200, "varname", "estado_personal");
            dalTableESTADO_PERSONALES.InitAndSetArrayItem(true, "id_estado_personal", "key");
            GlobalVars.dal_info["PermisosDB_at_192_168_1_123_dbo_ESTADO_PERSONALES"] = dalTableESTADO_PERSONALES;
        }
Пример #6
0
        public static void Init()
        {
            XVar dalTableTIPOEMPLEADO = XVar.Array();

            dalTableTIPOEMPLEADO["id_tipo"]       = new XVar("type", 3, "varname", "id_tipo");
            dalTableTIPOEMPLEADO["tipo_empleado"] = new XVar("type", 200, "varname", "tipo_empleado");
            dalTableTIPOEMPLEADO.InitAndSetArrayItem(true, "id_tipo", "key");
            GlobalVars.dal_info["PermisosDB_at_192_168_1_123_dbo_TIPOEMPLEADO"] = dalTableTIPOEMPLEADO;
        }
Пример #7
0
        public static void Init()
        {
            XVar dalTableDEPARTAMENTO = XVar.Array();

            dalTableDEPARTAMENTO["id_departamento"] = new XVar("type", 3, "varname", "id_departamento");
            dalTableDEPARTAMENTO["departamento"]    = new XVar("type", 200, "varname", "departamento");
            dalTableDEPARTAMENTO["limite_permisos"] = new XVar("type", 3, "varname", "limite_permisos");
            dalTableDEPARTAMENTO.InitAndSetArrayItem(true, "id_departamento", "key");
            GlobalVars.dal_info["PermisosDB_at_192_168_1_123_dbo_DEPARTAMENTO"] = dalTableDEPARTAMENTO;
        }
Пример #8
0
        public static void Init()
        {
            XVar dalTableGRUPOS = XVar.Array();

            dalTableGRUPOS["id_grupo"]        = new XVar("type", 3, "varname", "id_grupo");
            dalTableGRUPOS["grupo"]           = new XVar("type", 200, "varname", "grupo");
            dalTableGRUPOS["id_departamento"] = new XVar("type", 3, "varname", "id_departamento");
            dalTableGRUPOS.InitAndSetArrayItem(true, "id_grupo", "key");
            GlobalVars.dal_info["PermisosDB_at_192_168_1_123_dbo_GRUPOS"] = dalTableGRUPOS;
        }
Пример #9
0
        public static void Init()
        {
            XVar dalTablePreferencias = XVar.Array();

            dalTablePreferencias["nombre_jefe"] = new XVar("type", 200, "varname", "nombre_jefe");
            dalTablePreferencias["division"]    = new XVar("type", 200, "varname", "division");
            dalTablePreferencias["ID"]          = new XVar("type", 3, "varname", "ID");
            dalTablePreferencias.InitAndSetArrayItem(true, "ID", "key");
            GlobalVars.dal_info["PermisosDB_at_192_168_1_123_dbo_Preferencias"] = dalTablePreferencias;
        }
Пример #10
0
        public static void Init()
        {
            XVar dalTableTIPOPERMISO = XVar.Array();

            dalTableTIPOPERMISO["id_tipopermiso"]    = new XVar("type", 3, "varname", "id_tipopermiso");
            dalTableTIPOPERMISO["tipo_permiso"]      = new XVar("type", 200, "varname", "tipo_permiso");
            dalTableTIPOPERMISO["horas_asignada"]    = new XVar("type", 3, "varname", "horas_asignada");
            dalTableTIPOPERMISO["dias_asignados"]    = new XVar("type", 3, "varname", "dias_asignados");
            dalTableTIPOPERMISO["cantidad_permisos"] = new XVar("type", 3, "varname", "cantidad_permisos");
            dalTableTIPOPERMISO.InitAndSetArrayItem(true, "id_tipopermiso", "key");
            GlobalVars.dal_info["PermisosDB_at_192_168_1_123_dbo_TIPOPERMISO"] = dalTableTIPOPERMISO;
        }
Пример #11
0
        public static void Init()
        {
            XVar dalTableHORARIOS = XVar.Array();

            dalTableHORARIOS["id_horarios"]               = new XVar("type", 3, "varname", "id_horarios");
            dalTableHORARIOS["horarios"]                  = new XVar("type", 200, "varname", "horarios");
            dalTableHORARIOS["dia_inicio"]                = new XVar("type", 200, "varname", "dia_inicio");
            dalTableHORARIOS["dia_final"]                 = new XVar("type", 200, "varname", "dia_final");
            dalTableHORARIOS["hora_inicio"]               = new XVar("type", 134, "varname", "hora_inicio");
            dalTableHORARIOS["hora_final"]                = new XVar("type", 134, "varname", "hora_final");
            dalTableHORARIOS["cantidad_horas"]            = new XVar("type", 3, "varname", "cantidad_horas");
            dalTableHORARIOS["horas_permisos_personales"] = new XVar("type", 3, "varname", "horas_permisos_personales");
            dalTableHORARIOS.InitAndSetArrayItem(true, "id_horarios", "key");
            GlobalVars.dal_info["PermisosDB_at_192_168_1_123_dbo_HORARIOS"] = dalTableHORARIOS;
        }
Пример #12
0
        public static void Init()
        {
            XVar dalTablePermisos = XVar.Array();

            dalTablePermisos["id_permisos"]        = new XVar("type", 3, "varname", "id_permisos");
            dalTablePermisos["ONI"]                = new XVar("type", 200, "varname", "ONI");
            dalTablePermisos["id_tipopermiso"]     = new XVar("type", 3, "varname", "id_tipopermiso");
            dalTablePermisos["fecha_solicitud"]    = new XVar("type", 7, "varname", "fecha_solicitud");
            dalTablePermisos["motivo"]             = new XVar("type", 201, "varname", "motivo");
            dalTablePermisos["adjunto"]            = new XVar("type", 201, "varname", "adjunto");
            dalTablePermisos["id_estado_personal"] = new XVar("type", 3, "varname", "id_estado_personal");
            dalTablePermisos["Observaciones"]      = new XVar("type", 201, "varname", "Observaciones");
            dalTablePermisos["total_horas"]        = new XVar("type", 3, "varname", "total_horas");
            dalTablePermisos.InitAndSetArrayItem(true, "id_permisos", "key");
            GlobalVars.dal_info["PermisosDB_at_192_168_1_123_dbo_Permisos"] = dalTablePermisos;
        }
Пример #13
0
        public static void Init()
        {
            XVar dalTableEMPLEADO = XVar.Array();

            dalTableEMPLEADO["ONI"]              = new XVar("type", 200, "varname", "ONI");
            dalTableEMPLEADO["nombre"]           = new XVar("type", 200, "varname", "nombre");
            dalTableEMPLEADO["password"]         = new XVar("type", 200, "varname", "password");
            dalTableEMPLEADO["id_tipo"]          = new XVar("type", 3, "varname", "id_tipo");
            dalTableEMPLEADO["id_departamento"]  = new XVar("type", 3, "varname", "id_departamento");
            dalTableEMPLEADO["id_horarios"]      = new XVar("type", 3, "varname", "id_horarios");
            dalTableEMPLEADO["saldo_personales"] = new XVar("type", 3, "varname", "saldo_personales");
            dalTableEMPLEADO["saldo_compesado"]  = new XVar("type", 200, "varname", "saldo_compesado");
            dalTableEMPLEADO["foto"]             = new XVar("type", 200, "varname", "foto");
            dalTableEMPLEADO["id_grupo"]         = new XVar("type", 3, "varname", "id_grupo");
            dalTableEMPLEADO.InitAndSetArrayItem(true, "ONI", "key");
            GlobalVars.dal_info["PermisosDB_at_192_168_1_123_dbo_EMPLEADO"] = dalTableEMPLEADO;
        }
Пример #14
0
        public static void Init()
        {
            XVar dalTableREGISTRO_HORAS_COMPESADAS = XVar.Array();

            dalTableREGISTRO_HORAS_COMPESADAS["id_compesados"]             = new XVar("type", 3, "varname", "id_compesados");
            dalTableREGISTRO_HORAS_COMPESADAS["ONI"]                       = new XVar("type", 200, "varname", "ONI");
            dalTableREGISTRO_HORAS_COMPESADAS["fecha_compesado"]           = new XVar("type", 7, "varname", "fecha_compesado");
            dalTableREGISTRO_HORAS_COMPESADAS["hora_realizado_inicio"]     = new XVar("type", 134, "varname", "hora_realizado_inicio");
            dalTableREGISTRO_HORAS_COMPESADAS["hora_realizado_fin"]        = new XVar("type", 134, "varname", "hora_realizado_fin");
            dalTableREGISTRO_HORAS_COMPESADAS["cantidad_horas_compesadas"] = new XVar("type", 3, "varname", "cantidad_horas_compesadas");
            dalTableREGISTRO_HORAS_COMPESADAS["justificacion"]             = new XVar("type", 201, "varname", "justificacion");
            dalTableREGISTRO_HORAS_COMPESADAS["anexo"]                     = new XVar("type", 201, "varname", "anexo");
            dalTableREGISTRO_HORAS_COMPESADAS["observacion"]               = new XVar("type", 201, "varname", "observacion");
            dalTableREGISTRO_HORAS_COMPESADAS["id_estado_compesado"]       = new XVar("type", 3, "varname", "id_estado_compesado");
            dalTableREGISTRO_HORAS_COMPESADAS["vistobueno1"]               = new XVar("type", 200, "varname", "vistobueno1");
            dalTableREGISTRO_HORAS_COMPESADAS["vistobueno2"]               = new XVar("type", 200, "varname", "vistobueno2");
            dalTableREGISTRO_HORAS_COMPESADAS["desde"]                     = new XVar("type", 135, "varname", "desde");
            dalTableREGISTRO_HORAS_COMPESADAS["hasta"]                     = new XVar("type", 135, "varname", "hasta");
            dalTableREGISTRO_HORAS_COMPESADAS["fecha_creacion"]            = new XVar("type", 135, "varname", "fecha_creacion");
            dalTableREGISTRO_HORAS_COMPESADAS.InitAndSetArrayItem(true, "id_compesados", "key");
            GlobalVars.dal_info["PermisosDB_at_192_168_1_123_dbo_REGISTRO_HORAS_COMPESADAS"] = dalTableREGISTRO_HORAS_COMPESADAS;
        }
Пример #15
0
 public XVar rte()
 {
     try
     {
         dynamic         _connection = null, cfield = null, data = XVar.Array(), field = null, id = null, nHeight = null, nWidth = null, onsubmit = null, ptype = null, table = null;
         ProjectSettings pSet;
         table = XVar.Clone(MVCFunctions.postvalue(new XVar("table")));
         if (XVar.Pack(!(XVar)(CommonFunctions.checkTableName((XVar)(table)))))
         {
             MVCFunctions.Echo(new XVar(0));
             return(MVCFunctions.GetBuferContentAndClearBufer());
         }
         Assembly.GetExecutingAssembly().GetType(MVCFunctions.Concat("runnerDotNet.", MVCFunctions.Concat("", table, ""),
                                                                     "_Variables")).InvokeMember("Apply", BindingFlags.InvokeMethod, null, null, null);
         if ((XVar)((XVar)(!(XVar)(CommonFunctions.isLogged())) || (XVar)(!(XVar)(CommonFunctions.CheckSecurity((XVar)(XSession.Session[MVCFunctions.Concat("_", GlobalVars.strTableName, "_OwnerID")]), new XVar("Search"))))) && (XVar)(MVCFunctions.postvalue("action") != "add"))
         {
             return(MVCFunctions.GetBuferContentAndClearBufer());
         }
         ptype = XVar.Clone(MVCFunctions.postvalue(new XVar("ptype")));
         field = XVar.Clone(MVCFunctions.postvalue(new XVar("field")));
         pSet  = XVar.UnPackProjectSettings(new ProjectSettings((XVar)(GlobalVars.strTableName), (XVar)(ptype)));
         if ((XVar)(!(XVar)(pSet.checkFieldPermissions((XVar)(field)))) && (XVar)(MVCFunctions.postvalue("action") != "add"))
         {
             return(MVCFunctions.GetBuferContentAndClearBufer());
         }
         _connection = XVar.Clone(GlobalVars.cman.byTable((XVar)(GlobalVars.strTableName)));
         data        = new XVar(false);
         if (MVCFunctions.postvalue("action") != "add")
         {
             dynamic keys = XVar.Array(), keysArr = XVar.Array(), qResult = null, sql = null, where = null;
             keysArr = XVar.Clone(pSet.getTableKeys());
             keys    = XVar.Clone(XVar.Array());
             foreach (KeyValuePair <XVar, dynamic> k in keysArr.GetEnumerator())
             {
                 keys.InitAndSetArrayItem(MVCFunctions.postvalue((XVar)(MVCFunctions.Concat("key", k.Key + 1))), k.Value);
             }
             where = XVar.Clone(CommonFunctions.KeyWhere((XVar)(keys)));
             if (pSet.getAdvancedSecurityType() == Constants.ADVSECURITY_VIEW_OWN)
             {
                 where = XVar.Clone(CommonFunctions.whereAdd((XVar)(where), (XVar)(CommonFunctions.SecuritySQL(new XVar("Search"), (XVar)(GlobalVars.strTableName)))));
             }
             sql     = XVar.Clone(GlobalVars.gQuery.gSQLWhere((XVar)(where)));
             qResult = XVar.Clone(_connection.query((XVar)(sql)));
             if (XVar.Pack(!(XVar)(qResult)))
             {
                 return(MVCFunctions.GetBuferContentAndClearBufer());
             }
             data = XVar.Clone(qResult.fetchAssoc());
         }
         else
         {
             data = XVar.Clone(XVar.Array());
             data.InitAndSetArrayItem(XSession.Session[MVCFunctions.Concat(GlobalVars.strTableName, "_", field, "_rte")], field);
         }
         nWidth  = XVar.Clone(pSet.getNCols((XVar)(field)));
         nHeight = XVar.Clone(pSet.getNRows((XVar)(field)));
         id      = XVar.Clone(MVCFunctions.postvalue(new XVar("id")));
         cfield  = XVar.Clone(MVCFunctions.Concat("value_", MVCFunctions.GoodFieldName((XVar)(field)), "_", (XVar.Pack(!XVar.Equals(XVar.Pack(id), XVar.Pack(""))) ? XVar.Pack(id) : XVar.Pack("1"))));
         if (MVCFunctions.postvalue("browser") == "ie")
         {
             onsubmit = new XVar("onsubmit=\"updateRTEs();\"");
         }
         else
         {
             onsubmit = XVar.Clone(MVCFunctions.Concat("onsubmit=\"updateRTEs();return this.elements['", cfield, "'].value;\""));
         }
         MVCFunctions.Echo(MVCFunctions.Concat("<html><body style=\"margin:0;\"><form name=\"rteform\" ", onsubmit, ">"));
         MVCFunctions.Echo(MVCFunctions.Concat("<script type=\"text/javascript\" src=\"", MVCFunctions.GetRootPathForResources(new XVar("include/rte/richtext.js")), "\"></script>\r\n"));
         MVCFunctions.Echo("<script language=\"JavaScript\" type=\"text/javascript\">");
         MVCFunctions.Echo("initRTE('include/rte/images/', 'include/rte/', '');\r\n");
         MVCFunctions.Echo(MVCFunctions.Concat("{var rte = new richTextEditor('", cfield, "');"));
         MVCFunctions.Echo(MVCFunctions.Concat("rte.width= ", nWidth, ";"));
         MVCFunctions.Echo(MVCFunctions.Concat("rte.height= ", nHeight, ";"));
         MVCFunctions.Echo("rte.html = '");
         if ((XVar)(data) && (XVar)(data[field] != null))
         {
             MVCFunctions.Echo(CommonFunctions.jsreplace((XVar)(data[field])));
         }
         MVCFunctions.Echo("';");
         MVCFunctions.Echo("rte.build();}");
         MVCFunctions.Echo("</script>");
         MVCFunctions.Echo("</form></body></html>");
         return(MVCFunctions.GetBuferContentAndClearBufer());
     }
     catch (RunnerRedirectException ex)
     { return(Redirect(ex.Message)); }
 }