Esempio n. 1
0
        }//setSessionViewId()

        public void setSessionViewId(CswNbtSessionDataId SessionViewId, bool ForceReload)
        {
            if (Session["SessionViewId"] == null || SessionViewId.ToString() != Session["SessionViewId"].ToString() || ForceReload)
            {
                clearView();
                Session.Add("SessionViewId", SessionViewId.ToString());
                initSelectedView(true);
            }
        }//setSessionViewId()
Esempio n. 2
0
        } // FromJObject()

        public JObject ToJObject()
        {
            JObject SearchObj = new JObject();

            SearchObj["name"]       = Name;
            SearchObj["searchterm"] = SearchTerm;
            SearchObj["searchtype"] = SearchType.ToString();
            SearchObj["category"]   = Category;
            if (null != SearchId)
            {
                SearchObj["searchid"] = SearchId.PrimaryKey;
            }
            if (null != SessionDataId)
            {
                SearchObj["sessiondataid"] = SessionDataId.ToString();
            }
            SearchObj["onlymergeablenodetypes"] = OnlyMergeableNodeTypes;
            JArray FiltersArr = new JArray();

            foreach (CswNbtSearchFilter Filter in FiltersApplied)
            {
                FiltersArr.Add(Filter.ToJObject());
            }
            SearchObj["filtersapplied"] = FiltersArr;

            return(SearchObj);
        } // ToJObject()