コード例 #1
0
        protected override XVar getSubsetSQLComponents()
        {
            dynamic sql = XVar.Array();

            sql = XVar.Clone(base.getSubsetSQLComponents());
            if (this.connection.dbType == Constants.nDATABASE_DB2)
            {
                sql["sqlParts"]["head"] = MVCFunctions.Concat(sql["sqlParts"]["head"], ", ROW_NUMBER() over () as DB2_ROW_NUMBER ");
            }
            sql.InitAndSetArrayItem(SecuritySQL(new XVar("Search"), (XVar)(this.tName)), "mandatoryWhere", null);
            return(sql);
        }
コード例 #2
0
        public override XVar addFieldWrappers(dynamic _param_strName)
        {
            #region pass-by-value parameters
            dynamic strName = XVar.Clone(_param_strName);
            #endregion

            if (MVCFunctions.substr((XVar)(strName), new XVar(0), new XVar(1)) == this.strLeftWrapper)
            {
                return(strName);
            }
            return(MVCFunctions.Concat(this.strLeftWrapper, strName, this.strRightWrapper));
        }
コード例 #3
0
        public override XVar addDateQuotes(dynamic _param_val)
        {
            #region pass-by-value parameters
            dynamic val = XVar.Clone(_param_val);
            #endregion

            if ((XVar)(val == XVar.Pack("")) || (XVar)(XVar.Equals(XVar.Pack(val), XVar.Pack(null))))
            {
                return("null");
            }
            return(MVCFunctions.Concat("convert(datetime,'", addSlashes((XVar)(val)), "',120)"));
        }
コード例 #4
0
ファイル: searchpage.cs プロジェクト: kurtrad/ABCVote
 protected override XVar assignSessionPrefix()
 {
     if (this.mode == Constants.SEARCH_DASHBOARD)
     {
         this.sessionPrefix = XVar.Clone(MVCFunctions.Concat(this.dashTName, "_", this.tName));
     }
     else
     {
         this.sessionPrefix = XVar.Clone(this.tName);
     }
     return(null);
 }
コード例 #5
0
ファイル: Control.cs プロジェクト: kurtrad/ABCVote
        public virtual XVar setID(dynamic _param_id)
        {
            #region pass-by-value parameters
            dynamic id = XVar.Clone(_param_id);
            #endregion

            this.id         = XVar.Clone(id);
            this.cfieldname = XVar.Clone(MVCFunctions.Concat(this.goodFieldName, "_", id));
            this.cfield     = XVar.Clone(MVCFunctions.Concat("value_", this.goodFieldName, "_", id));
            this.ctype      = XVar.Clone(MVCFunctions.Concat("type_", this.goodFieldName, "_", id));
            return(null);
        }
コード例 #6
0
ファイル: Control.cs プロジェクト: kurtrad/ABCVote
        public virtual XVar makeWidthStyle(dynamic _param_widthPx)
        {
            #region pass-by-value parameters
            dynamic widthPx = XVar.Clone(_param_widthPx);
            #endregion

            if (XVar.Pack(0) == widthPx)
            {
                return("");
            }
            return(MVCFunctions.Concat("width: ", widthPx, "px;"));
        }
コード例 #7
0
        public override XVar addSlashesBinary(dynamic _param_str)
        {
            #region pass-by-value parameters
            dynamic str = XVar.Clone(_param_str);
            #endregion

            if (XVar.Pack(!(XVar)(MVCFunctions.strlen((XVar)(str)))))
            {
                return("''");
            }
            return(MVCFunctions.Concat("0x", MVCFunctions.bin2hex((XVar)(str))));
        }
コード例 #8
0
        public override XVar showPage()
        {
            dynamic contents = null, var_response = XVar.Array();

            BeforeShowList();
            var_response = XVar.Clone(XVar.Array());
            if ((XVar)(!(XVar)(isDispGrid())) && (XVar)(0 == getGridTabsCount()))
            {
                var_response.InitAndSetArrayItem(true, "noData");
                MVCFunctions.Echo(CommonFunctions.printJSON((XVar)(var_response)));
                return(null);
            }
            prepareTemplate();
            if (XVar.Pack(isPD()))
            {
                contents = XVar.Clone(fetchForms((XVar)(new XVar(0, "grid", 1, "below-grid"))));
            }
            else
            {
                if (XVar.Pack(isBootstrap()))
                {
                    contents = XVar.Clone(MVCFunctions.Concat(this.xt.fetch_loaded(new XVar("grid_tabs")), this.xt.fetch_loaded(new XVar("message_block")), this.xt.fetch_loaded(new XVar("grid_block")), this.xt.fetch_loaded(new XVar("pagination_block"))));
                }
                else
                {
                    contents = XVar.Clone(this.xt.fetch_loaded(new XVar("body")));
                }
            }
            addControlsJSAndCSS();
            fillSetCntrlMaps();
            var_response.InitAndSetArrayItem(GlobalVars.pagesData, "pagesData");
            var_response.InitAndSetArrayItem(this.jsSettings, "settings");
            var_response.InitAndSetArrayItem(this.controlsHTMLMap, "controlsMap");
            var_response.InitAndSetArrayItem(this.viewControlsHTMLMap, "viewControlsMap");
            if ((XVar)((XVar)(this.masterPageType == Constants.PAGE_EDIT) && (XVar)(this.dashTName)) && (XVar)(this.dashElementName))
            {
                var_response.InitAndSetArrayItem(getHeaderControlsBlocks(), "headerButtonsBlock");
            }
            var_response.InitAndSetArrayItem(contents, "html");
            var_response.InitAndSetArrayItem(true, "success");
            var_response.InitAndSetArrayItem(this.id, "id");
            var_response.InitAndSetArrayItem(this.flyId, "idStartFrom");
            var_response.InitAndSetArrayItem(this.recordsDeleted, "delRecs");
            if (this.deleteMessage != "")
            {
                var_response.InitAndSetArrayItem(true, "delMess");
            }
            var_response.InitAndSetArrayItem(grabAllJsFiles(), "additionalJS");
            var_response.InitAndSetArrayItem(grabAllCSSFiles(), "additionalCSS");
            MVCFunctions.Echo(CommonFunctions.printJSON((XVar)(var_response)));
            return(null);
        }
コード例 #9
0
        protected static XVar _getTableInfo(dynamic _param_table)
        {
            #region pass-by-value parameters
            dynamic table = XVar.Clone(_param_table);
            #endregion

            dynamic connId = null, tableDescriptor = XVar.Array(), tableInfo = XVar.Array();
            connId = XVar.Clone(CurrentConnectionId());
            if (XVar.Pack(!(XVar)(GlobalVars.tableinfo_cache.KeyExists(connId))))
            {
                GlobalVars.tableinfo_cache.InitAndSetArrayItem(XVar.Array(), connId);
            }
            tableInfo       = XVar.Clone(XVar.Array());
            tableDescriptor = XVar.Clone(_findDalTable((XVar)(table)));
            if (XVar.Pack(tableDescriptor))
            {
                dynamic db_table_info = XVar.Array();
                tableInfo.InitAndSetArrayItem(db_table_info[tableDescriptor["varname"]], "fields");
                if (XVar.Pack(tableDescriptor["schema"]))
                {
                    tableInfo.InitAndSetArrayItem(MVCFunctions.Concat(tableDescriptor["schema"], ".", tableDescriptor["name"]), "fullName");
                }
                else
                {
                    tableInfo.InitAndSetArrayItem(tableDescriptor["name"], "fullName");
                }
            }
            else
            {
                dynamic fieldList = XVar.Array(), helpSql = null, tables = null;
                if (XVar.Pack(GlobalVars.tableinfo_cache[connId].KeyExists(table)))
                {
                    return(GlobalVars.tableinfo_cache[connId][table]);
                }
                tables = XVar.Clone(CurrentConnection().getTableList());
                if (XVar.Pack(!(XVar)(MVCFunctions.in_array((XVar)(table), (XVar)(tables)))))
                {
                    GlobalVars.tableinfo_cache.InitAndSetArrayItem(false, connId, table);
                    return(false);
                }
                helpSql = XVar.Clone(MVCFunctions.Concat("select * from ", CurrentConnection().addTableWrappers((XVar)(table)), " where 1=0"));
                tableInfo.InitAndSetArrayItem(table, "fullName");
                tableInfo.InitAndSetArrayItem(XVar.Array(), "fields");
                fieldList = XVar.Clone(CurrentConnection().getFieldsList((XVar)(helpSql)));
                foreach (KeyValuePair <XVar, dynamic> f in fieldList.GetEnumerator())
                {
                    tableInfo.InitAndSetArrayItem(new XVar("type", f.Value["type"], "name", f.Value["fieldname"]), "fields", f.Value["fieldname"]);
                }
                GlobalVars.tableinfo_cache.InitAndSetArrayItem(tableInfo, connId, table);
            }
            return(tableInfo);
        }
コード例 #10
0
 public virtual XVar createElementContainers()
 {
     foreach (KeyValuePair <XVar, dynamic> elem in this.pSet.getDashboardElements().GetEnumerator())
     {
         dynamic contentHtml = null, dbElementAttrs = null, style = null;
         if (XVar.Pack(!(XVar)(this.elementsPermissions[elem.Key])))
         {
             continue;
         }
         style = new XVar("");
         if (XVar.Pack(isBootstrap()))
         {
             dynamic selectors = XVar.Array();
             if (XVar.Pack(elem.Value["width"]))
             {
                 selectors = XVar.Clone(XVar.Array());
             }
             selectors.InitAndSetArrayItem(MVCFunctions.Concat("#dashelement_", elem.Value["elementName"], this.id, " > * > .tab-content > * > * > * > .panel > .panel-body"), null);
             selectors.InitAndSetArrayItem(MVCFunctions.Concat("#dashelement_", elem.Value["elementName"], this.id, " > * > .tab-content > * > * > .panel > .panel-body"), null);
             selectors.InitAndSetArrayItem(MVCFunctions.Concat("#dashelement_", elem.Value["elementName"], this.id, " > .panel > .panel-body"), null);
             selectors.InitAndSetArrayItem(MVCFunctions.Concat("#dashelement_", elem.Value["elementName"], this.id, " > .bs-containedpage > .panel > .panel-body"), null);
             style = MVCFunctions.Concat(style, MVCFunctions.join(new XVar(",\n"), (XVar)(selectors)), " {\r\n\t\t\t\t\t\twidth: ", elem.Value["width"], "px;\r\n\t\t\t\t\t\toverflow-x: auto;\r\n\t\t\t\t\t}");
             if (XVar.Pack(elem.Value["height"]))
             {
                 style = MVCFunctions.Concat(style, "#dashelement_", elem.Value["elementName"], this.id, " > .panel > .panel-body,\r\n\t\t\t\t\t\t#dashelement_", elem.Value["elementName"], this.id, " > * > .tab-content > * > * > * > .panel > .panel-body, \r\n\t\t\t\t\t\t#dashelement_", elem.Value["elementName"], this.id, " > * > .tab-content > * > * > .panel > .panel-body, \r\n\t\t\t\t\t\t#dashelement_", elem.Value["elementName"], this.id, " > .bs-containedpage > .panel > .panel-body {\r\n\t\t\t\t\t\theight: ", elem.Value["height"], "px;\r\n\t\t\t\t\t\toverflow-y: auto;\r\n\t\t\t\t\t}");
             }
             if (style != XVar.Pack(""))
             {
                 style = XVar.Clone(MVCFunctions.Concat("<style> @media (min-width: 768px){ ", style, " } </style>"));
             }
         }
         contentHtml = new XVar("");
         if (elem.Value["type"] == Constants.DASHBOARD_SNIPPET)
         {
             dynamic method = null, snippetData = XVar.Array();
             method      = XVar.Clone(elem.Value["snippetId"]);
             snippetData = XVar.Clone(MVCFunctions.callDashboardSnippet((XVar)(elem.Value["snippetId"]), (XVar)(this.eventsObject)));
             contentHtml = XVar.Clone(getSnippetHtml((XVar)(snippetData["header"]), (XVar)(snippetData["body"]), (XVar)(elem.Value["width"]), (XVar)(elem.Value["height"])));
         }
         dbElementAttrs = new XVar("");
         if (XVar.Pack(elem.Value["width"]))
         {
             dbElementAttrs = MVCFunctions.Concat(dbElementAttrs, " data-fixed-width");
         }
         if (XVar.Pack(elem.Value["height"]))
         {
             dbElementAttrs = MVCFunctions.Concat(dbElementAttrs, " data-fixed-height");
         }
         this.xt.assign((XVar)(MVCFunctions.Concat("db_", elem.Value["elementName"])), (XVar)(MVCFunctions.Concat(style, "<div ", dbElementAttrs, " class=\"", getElementClass((XVar)(elem.Value)), "\" id=\"dashelement_", elem.Value["elementName"], this.id, "\">", contentHtml, "</div>")));
     }
     return(null);
 }
コード例 #11
0
ファイル: menuitem.cs プロジェクト: kurtrad/ABCVote
        public virtual XVar setCurrMenuElem(dynamic xt_packed)
        {
            #region packeted values
            XTempl xt = XVar.UnPackXTempl(xt_packed);
            #endregion

            dynamic i = null;
            if ((XVar)(this.pageObject.tName == this.table) && (XVar)((XVar)(this.pageType == "AdminArea") || (XVar)(this.id != 0)))
            {
                if ((XVar)(XSession.Session.KeyExists("menuItemId")) && (XVar)(1 < this.menuTableMap[this.table][MVCFunctions.strtolower((XVar)(this.pageType))]))
                {
                    if (XSession.Session["menuItemId"] == this.id)
                    {
                        setAsCurrMenuElem((XVar)(xt));
                        return(true);
                    }
                }
                else
                {
                    if (this.pageObject.getPageType() == MVCFunctions.strtolower((XVar)(this.pageType)))
                    {
                        setAsCurrMenuElem((XVar)(xt));
                        return(true);
                    }
                    else
                    {
                        if ((XVar)(!(XVar)(isSetParentElem())) && (XVar)(!(XVar)(isThisPageInMenu())))
                        {
                            setAsCurrMenuElem((XVar)(xt));
                            return(true);
                        }
                    }
                }
            }
            i = new XVar(0);
            for (; i < MVCFunctions.count(this.children); i++)
            {
                if (XVar.Pack(this.children[i].setCurrMenuElem((XVar)(xt))))
                {
                    if (XVar.Pack(isBootstrap()))
                    {
                        xt.assign((XVar)(MVCFunctions.Concat("submenu", this.id, "_class")), new XVar("in"));
                    }
                    else
                    {
                        setAsCurrMenuElem((XVar)(xt));
                    }
                    return(true);
                }
            }
            return(false);
        }
コード例 #12
0
        public virtual XVar fillMembers()
        {
            dynamic grConnection = null, qResult = null, sql = null, tdata = XVar.Array();

            grConnection = XVar.Clone(GlobalVars.cman.getForUserGroups());
            sql          = XVar.Clone(MVCFunctions.Concat("select ", grConnection.addFieldWrappers(new XVar("UserName")), ", ", grConnection.addFieldWrappers(new XVar("GroupID")), " from ", grConnection.addTableWrappers(new XVar("dbo.acceso_ugmembers")), " order by ", grConnection.addFieldWrappers(new XVar("UserName")), ", ", grConnection.addFieldWrappers(new XVar("GroupID"))));
            qResult      = XVar.Clone(grConnection.query((XVar)(sql)));
            while (XVar.Pack(tdata = XVar.Clone(qResult.fetchNumeric())))
            {
                this.members.InitAndSetArrayItem(new XVar(0, tdata[1], 1, tdata[0]), null);
            }
            return(null);
        }
コード例 #13
0
        public static XVar processMasterKeys()
        {
            dynamic i = null, options = XVar.Array();

            i       = new XVar(1);
            options = XVar.Clone(XVar.Array());
            while (XVar.Pack(MVCFunctions.REQUESTKeyExists(MVCFunctions.Concat("masterkey", i))))
            {
                options.InitAndSetArrayItem(MVCFunctions.postvalue(MVCFunctions.Concat("masterkey", i)), i);
                i++;
            }
            return(options);
        }
コード例 #14
0
        public static XVar getOwnerId(dynamic _param_table)
        {
            #region pass-by-value parameters
            dynamic table = XVar.Clone(_param_table);
            #endregion

            table = XVar.Clone(CommonFunctions.findTable((XVar)(table)));
            if (table == XVar.Pack(""))
            {
                return(null);
            }
            return(XSession.Session[MVCFunctions.Concat("_", table, "_OwnerID")]);
        }
コード例 #15
0
        public virtual XVar isLocked(dynamic _param_table, dynamic _param_keys, dynamic _param_action)
        {
            #region pass-by-value parameters
            dynamic table  = XVar.Clone(_param_table);
            dynamic keys   = XVar.Clone(_param_keys);
            dynamic action = XVar.Clone(_param_action);
            #endregion

            dynamic lockSQL = null, lockSet = XVar.Array(), lockWhere = null;
            lockSQL = XVar.Clone(MVCFunctions.Concat("select count(*) from ", this.connection.addTableWrappers((XVar)(this.lockTableName)), " where ", this.connection.addFieldWrappers(new XVar("keys")), "=", this.connection.prepareString((XVar)(lockWhere)), " AND ", this.connection.addFieldWrappers(new XVar("table")), "=", this.connection.prepareString((XVar)(table)), " AND ", this.connection.addFieldWrappers(new XVar("action")), "=", action));
            lockSet = XVar.Clone(this.connection.query((XVar)(lockSQL)).fetchNumeric());
            return(0 < lockSet[0]);
        }
コード例 #16
0
ファイル: menuitem.cs プロジェクト: kurtrad/ABCVote
        public virtual XVar assignGroupOnly(dynamic xt_packed)
        {
            #region packeted values
            XTempl xt = XVar.UnPackXTempl(xt_packed);
            #endregion

            dynamic attrForAssign = null;
            xt.assign((XVar)(MVCFunctions.Concat("item", this.id, "_title")), (XVar)(this.title));
            attrForAssign = XVar.Clone(MVCFunctions.Concat(" id=\"itemlink", this.id, "\" itemtitle=\"", this.title, "\" ", (XVar.Pack(this.style) ? XVar.Pack(MVCFunctions.Concat(" style=\"cursor:default;text-decoration:none; ", this.style, "\"")) : XVar.Pack(""))));
            xt.assign((XVar)(MVCFunctions.Concat("item", this.id, "_menulink_attrs")), (XVar)(attrForAssign));
            xt.assign((XVar)(MVCFunctions.Concat("item", this.id, "_optionattrs")), new XVar("disabled"));
            return(null);
        }
コード例 #17
0
ファイル: menuitem.cs プロジェクト: kurtrad/ABCVote
        public virtual XVar setAsCurrMenuElem(dynamic xt_packed)
        {
            #region packeted values
            XTempl xt = XVar.UnPackXTempl(xt_packed);
            #endregion

            xt.assign((XVar)(MVCFunctions.Concat("item", this.id, "_current")), new XVar("current"));
            if (XVar.Pack(isBootstrap()))
            {
                xt.assign((XVar)(MVCFunctions.Concat("item", this.id, "_current")), new XVar("active"));
            }
            return(null);
        }
コード例 #18
0
        public virtual XVar initDPInlineParams()
        {
            dynamic i = null, strkey = null;

            strkey = new XVar("");
            i      = new XVar(0);
            for (; i < MVCFunctions.count(this.dpMasterKey); i++)
            {
                strkey = MVCFunctions.Concat(strkey, "&masterkey", i + 1, "=", MVCFunctions.RawUrlEncode((XVar)(this.dpMasterKey[i])));
            }
            this.dpParams = XVar.Clone(MVCFunctions.Concat("mode=listdetails&id=", this.id, "&mastertable=", MVCFunctions.RawUrlEncode((XVar)(this.masterTable)), strkey, (XVar.Pack(this.masterId) ? XVar.Pack(MVCFunctions.Concat("&masterid=", this.masterId)) : XVar.Pack("")), (XVar.Pack((XVar)(this.masterPageType == Constants.PAGE_EDIT) || (XVar)(this.masterPageType == Constants.PAGE_VIEW)) ? XVar.Pack(MVCFunctions.Concat("&masterpagetype=", this.masterPageType)) : XVar.Pack(""))));
            return(null);
        }
コード例 #19
0
ファイル: editselectedpage.cs プロジェクト: kurtrad/ABCVote
        protected override XVar prepareButtons()
        {
            dynamic label = null;

            base.prepareButtons();
            this.xt.assign(new XVar("save_button"), new XVar(false));
            this.xt.assign(new XVar("view_page_button"), new XVar(false));
            this.xt.assign(new XVar("updsel_button"), new XVar(true));
            this.xt.assign(new XVar("updselbutton_attrs"), (XVar)(MVCFunctions.Concat("id=\"saveButton", this.id, "\"")));
            label = XVar.Clone(MVCFunctions.str_replace(new XVar("%n%"), (XVar)(this.nSelected), new XVar("Update %n% records")));
            this.xt.assign(new XVar("update_selected"), (XVar)(label));
            return(null);
        }
コード例 #20
0
ファイル: loginpage.cs プロジェクト: kurtrad/ABCVote
 protected virtual XVar redirectAfterSuccessfulLogin()
 {
     XSession.Session.Remove("MyURL");
     if (XVar.Pack(this.myurl))
     {
         MVCFunctions.HeaderRedirect((XVar)(MVCFunctions.Concat("", this.myurl)));
     }
     else
     {
         MVCFunctions.HeaderRedirect(new XVar("menu"));
     }
     return(null);
 }
コード例 #21
0
        protected virtual XVar getDelButtonHtml(dynamic _param_gfName, dynamic _param_id, dynamic _param_deleteValue)
        {
            #region pass-by-value parameters
            dynamic gfName      = XVar.Clone(_param_gfName);
            dynamic id          = XVar.Clone(_param_id);
            dynamic deleteValue = XVar.Clone(_param_deleteValue);
            #endregion

            dynamic html = null;
            deleteValue = XVar.Clone(MVCFunctions.runner_htmlspecialchars((XVar)(deleteValue)));
            html        = XVar.Clone(MVCFunctions.Concat("<a class=\"delFilterCtrlButt_", gfName, "_", id, " delete-button\" data-delete=\"", deleteValue, "\" data-icon=\"remove\" href=\"#\"></a>"));
            return(html);
        }
コード例 #22
0
ファイル: loginpage.cs プロジェクト: kurtrad/ABCVote
        protected virtual XVar checkPhoneFieldInQuery()
        {
            dynamic phoneField = null;

            phoneField = XVar.Clone(CommonFunctions.GetGlobalData(new XVar("strPhoneField"), new XVar("")));
            if (XVar.Pack(!(XVar)(XSession.Session["firsAuthStepData"].KeyExists(phoneField))))
            {
                this.pnoneNotInQuery = new XVar(true);
                this.message         = XVar.Clone(MVCFunctions.Concat("Two factor authorization is not possible.", " Add <b>", phoneField, "</b> field to the <b>", GlobalVars.cLoginTable, "</b> table SQL query."));
                return(false);
            }
            return(true);
        }
コード例 #23
0
        public override XVar addBigGoogleMapMarkers(dynamic data, dynamic _param_keys, dynamic _param_editLink = null)
        {
            #region default values
            if (_param_editLink as Object == null)
            {
                _param_editLink = new XVar("");
            }
            #endregion

            #region pass-by-value parameters
            dynamic keys     = XVar.Clone(_param_keys);
            dynamic editLink = XVar.Clone(_param_editLink);
            #endregion

            base.addBigGoogleMapMarkers((XVar)(data), (XVar)(keys), (XVar)(editLink));
            foreach (KeyValuePair <XVar, dynamic> dElem in this.dashSet.getDashboardElements().GetEnumerator())
            {
                dynamic mapId = null, markerData = XVar.Array();
                if ((XVar)((XVar)((XVar)(dElem.Value["elementName"] == this.dashElementName) || (XVar)(dElem.Value["table"] != this.tName)) || (XVar)(dElem.Value["type"] != Constants.DASHBOARD_MAP)) || (XVar)(dElem.Value["updateMoved"]))
                {
                    continue;
                }
                markerData = XVar.Clone(XVar.Array());
                markerData.InitAndSetArrayItem(MVCFunctions.str_replace(new XVar(","), new XVar("."), (XVar)((XVar.Pack(data[dElem.Value["latF"]]) ? XVar.Pack(data[dElem.Value["latF"]]) : XVar.Pack("")))), "lat");
                markerData.InitAndSetArrayItem(MVCFunctions.str_replace(new XVar(","), new XVar("."), (XVar)((XVar.Pack(data[dElem.Value["lonF"]]) ? XVar.Pack(data[dElem.Value["lonF"]]) : XVar.Pack("")))), "lng");
                markerData.InitAndSetArrayItem((XVar.Pack(data[dElem.Value["addressF"]]) ? XVar.Pack(data[dElem.Value["addressF"]]) : XVar.Pack("")), "address");
                markerData.InitAndSetArrayItem((XVar.Pack(data[dElem.Value["descF"]]) ? XVar.Pack(data[dElem.Value["descF"]]) : XVar.Pack(markerData["address"])), "desc");
                markerData.InitAndSetArrayItem(this.dashSet.getDashMapIcon((XVar)(dElem.Value["elementName"]), (XVar)(data)), "mapIcon");
                markerData.InitAndSetArrayItem(this.recId, "recId");
                markerData.InitAndSetArrayItem(keys, "keys");
                markerData.InitAndSetArrayItem(getMarkerMasterKeys((XVar)(data)), "masterKeys");
                mapId = XVar.Clone(MVCFunctions.Concat(MVCFunctions.GoodFieldName((XVar)(this.dashTName)), "_", dElem.Value["elementName"], "_dashMap"));
                if (XVar.Pack(!(XVar)(this.googleMapCfg["mapsData"].KeyExists(mapId))))
                {
                    this.googleMapCfg.InitAndSetArrayItem(XVar.Array(), "mapsData", mapId);
                    this.googleMapCfg.InitAndSetArrayItem(true, "mapsData", mapId, "skipped");
                    this.googleMapCfg.InitAndSetArrayItem(true, "mapsData", mapId, "dashMap");
                    this.googleMapCfg.InitAndSetArrayItem(dElem.Value["heatMap"], "mapsData", mapId, "heatMap");
                }
                if (XVar.Pack(!(XVar)(this.googleMapCfg["mapsData"][mapId].KeyExists("markers"))))
                {
                    this.googleMapCfg.InitAndSetArrayItem(XVar.Array(), "mapsData", mapId, "markers");
                }
                if ((XVar)(markerData["lat"] == "") || (XVar)(markerData["lng"] == ""))
                {
                    continue;
                }
                this.googleMapCfg.InitAndSetArrayItem(markerData, "mapsData", mapId, "markers", null);
            }
            return(null);
        }
コード例 #24
0
        public virtual XVar set_file_delete_url(dynamic _param_file)
        {
            #region pass-by-value parameters
            dynamic file = XVar.Clone(_param_file);
            #endregion

            file.InitAndSetArrayItem(MVCFunctions.Concat(this.options["script_url"], "?file=", MVCFunctions.RawUrlEncode((XVar)(file["name"]))), "delete_url");
            file.InitAndSetArrayItem(this.options["delete_type"], "delete_type");
            if (!XVar.Equals(XVar.Pack(file["delete_type"]), XVar.Pack("DELETE")))
            {
                file["delete_url"] = MVCFunctions.Concat(file["delete_url"], "&_method=DELETE");
            }
            return(null);
        }
コード例 #25
0
        public virtual XVar getUploadFilesSize()
        {
            dynamic result = null;

            result = new XVar(0);
            foreach (KeyValuePair <XVar, dynamic> fileArray in XSession.Session[MVCFunctions.Concat("mupload_", this.formStamp)].GetEnumerator())
            {
                if (XVar.Pack(!(XVar)(fileArray.Value["deleted"])))
                {
                    result += fileArray.Value["file"]["size"];
                }
            }
            return(result);
        }
コード例 #26
0
        public virtual XVar getUploadFilesCount()
        {
            dynamic result = null;

            result = new XVar(0);
            foreach (KeyValuePair <XVar, dynamic> fileArray in XSession.Session[MVCFunctions.Concat("mupload_", this.formStamp)].GetEnumerator())
            {
                if ((XVar)(!(XVar)(fileArray.Value["deleted"])) && (XVar)(0 < MVCFunctions.count(fileArray.Value)))
                {
                    result++;
                }
            }
            return(result);
        }
コード例 #27
0
        protected override XVar getSubsetSQLComponents()
        {
            dynamic sql = XVar.Array();

            sql = XVar.Clone(base.getSubsetSQLComponents());
            if (XVar.Pack(this.dispFieldAlias))
            {
                sql["sqlParts"]["head"] = MVCFunctions.Concat(sql["sqlParts"]["head"], ", ", this.dispField, " ");
                sql["sqlParts"]["head"] = MVCFunctions.Concat(sql["sqlParts"]["head"], "as ", this.connection.addFieldWrappers((XVar)(this.dispFieldAlias)));
            }
            sql.InitAndSetArrayItem(getLookupWizardWhere(), "mandatoryWhere", null);
            sql.InitAndSetArrayItem(getDependentDropdownFilter(), "mandatoryWhere", null);
            return(sql);
        }
コード例 #28
0
        public override XVar fillCheckAttr(dynamic record, dynamic _param_data, dynamic _param_keyblock)
        {
            #region pass-by-value parameters
            dynamic data     = XVar.Clone(_param_data);
            dynamic keyblock = XVar.Clone(_param_keyblock);
            #endregion

            if ((XVar)((XVar)(deleteAvailable()) || (XVar)(inlineEditAvailable())) || (XVar)(updateSelectedAvailable()))
            {
                record.InitAndSetArrayItem(true, "checkbox");
            }
            record.InitAndSetArrayItem(MVCFunctions.Concat("name=\"selection[]\" value=\"", MVCFunctions.runner_htmlspecialchars((XVar)(keyblock)), "\" id=\"check", this.id, "_", this.recId, "\""), "checkbox_attrs");
            return(null);
        }
コード例 #29
0
        protected virtual XVar getCaseStatement(dynamic _param_condition, dynamic _param_trueValue, dynamic _param_falseValue)
        {
            #region pass-by-value parameters
            dynamic condition  = XVar.Clone(_param_condition);
            dynamic trueValue  = XVar.Clone(_param_trueValue);
            dynamic falseValue = XVar.Clone(_param_falseValue);
            #endregion

            if (this.connection.dbType == Constants.nDATABASE_Access)
            {
                return(MVCFunctions.Concat("IIF(", condition, ", ", trueValue, ", ", falseValue, ")"));
            }
            return(MVCFunctions.Concat("case when ", condition, " then ", trueValue, " else ", falseValue, " end"));
        }
コード例 #30
0
        public override XVar proccessRecordValue(dynamic data, dynamic keylink, dynamic _param_listFieldInfo)
        {
            #region pass-by-value parameters
            dynamic listFieldInfo = XVar.Clone(_param_listFieldInfo);
            #endregion

            dynamic value = null;
            value = XVar.Clone(base.proccessRecordValue((XVar)(data), (XVar)(keylink), (XVar)(listFieldInfo)));
            if (this.lookupSelectField == listFieldInfo["fName"])
            {
                value = XVar.Clone(MVCFunctions.Concat("<a href=\"#\" data-ind=\"", MVCFunctions.count(this.lookupValuesArr), "\" type=\"lookupSelect", this.id, "\">", value, "</a>"));
            }
            return(value);
        }