コード例 #1
0
        public ActionResult Search2(string q, string facetDataType, string facetMedia, string facetRecordSource, string facetAgency, string facetState, string facetOrgType, string facetTags, string facetPopDensity, string facetRegion, string facetStatus, string activeTab, string currentPage, string sortType, string sortDir)
        {
            ;
            var model = new vmDashboardSearch
            {
                q                 = q,
                facetDataType     = facetDataType,
                facetMedia        = facetMedia,
                facetRecordSource = facetRecordSource,
                facetAgency       = facetAgency,
                facetState        = facetState,
                facetOrgType      = facetOrgType,
                facetTags         = facetTags,
                facetPopDensity   = facetPopDensity,
                facetRegion       = facetRegion,
                facetStatus       = facetStatus,
                activeTab         = activeTab ?? "1",
                currentPage       = currentPage.ConvertOrDefault <int?>() ?? 1,
                sortType          = sortType,
                sortDir           = sortDir,
                searchResults     = AzureSearch.QuerySearchIndex(q, facetDataType, facetMedia, facetRecordSource, facetAgency, facetState, facetOrgType, facetTags, facetPopDensity, facetRegion, facetStatus, currentPage.ConvertOrDefault <int?>() ?? 1, sortType, sortDir)
            };

            //log search
            //if (!string.IsNullOrEmpty(q))
            //    db_Ref.InsertT_OE_SYS_SEARCH_LOG(q.ToUpper().Trim());

            return(View(model));
        }
コード例 #2
0
ファイル: DashboardController.cs プロジェクト: ljsweeny/EECIP
        public ActionResult Index(vmDashboardSearch model)
        {
            //int UserIDX = db_Accounts.GetUserIDX();

            model.searchResults = AzureSearch.QuerySearchIndex(model.searchStr);

            return(View(model));
        }
コード例 #3
0
        public ActionResult SearchAdminQueryIndex()
        {
            string err = "";

            try
            {
                AzureSearch.QuerySearchIndex("wef");
                TempData["Success"] = "Search index populated.";
            }
            catch (Exception ex)
            {
                err = ex.ToString();
            }

            TempData["Error"] = err;
            return(RedirectToAction("SearchAdmin", "Admin"));
        }
コード例 #4
0
        // GET: Dashboard/Search
        public ActionResult Search(string q, string facetDataType, string facetMedia, string facetRecordSource, string facetAgency, string facetState, string facetTags, string facetPopDensity, string facetRegion, string facetStatus, string activeTab, string currentPage, string sortType)
        {
            var model = new vmDashboardSearch();

            model.q                 = q;
            model.facetDataType     = facetDataType;
            model.facetMedia        = facetMedia;
            model.facetRecordSource = facetRecordSource;
            model.facetAgency       = facetAgency;
            model.facetState        = facetState;
            model.facetTags         = facetTags;
            model.facetPopDensity   = facetPopDensity;
            model.facetRegion       = facetRegion;
            model.facetStatus       = facetStatus;
            model.activeTab         = activeTab ?? "1";
            model.currentPage       = currentPage.ConvertOrDefault <int?>() ?? 1;
            model.sortType          = sortType;

            model.searchResults = AzureSearch.QuerySearchIndex(model.q, model.facetDataType, model.facetMedia, model.facetRecordSource, model.facetAgency, model.facetState, model.facetTags, model.facetPopDensity, model.facetRegion, model.facetStatus, model.currentPage, model.sortType);
            return(View(model));
        }