Пример #1
0
        //
        // GET: /Search/

        #region Get Search Using MyQuries
        /// <summary>
        /// Get Search Form-- RaviM
        /// </summary>
        /// <param name="ddlValue"></param>
        /// <returns></returns>
        public ActionResult Search(int?ddlValue)
        {
            int    userid = CurrentUser.UserId;
            string x      = string.Empty;

            x = SearchBL.GetSearchName(ddlValue);

            SearchBL.SearchForm searchForm = new SearchBL.SearchForm();
            searchForm.SearchName = x;
            if (ddlValue == null || ddlValue == 0)
            {
                searchForm.MyQueries    = SearchBL.GetMyQueriesForSearch(userid, ddlValue);
                searchForm.MyQueryValue = Convert.ToInt32(ddlValue);
                return(View(searchForm));
            }
            else
            {
                searchForm.ResultQuery  = SearchBL.GetSearchQuery(userid, x, ddlValue);
                searchForm.AbstractMask = Convert.ToBoolean(searchForm.ResultQuery.AbstractMask);
                searchForm.MyQueries    = SearchBL.GetMyQueriesForSearch(userid, ddlValue);
                searchForm.MyQueryValue = Convert.ToInt32(ddlValue);

                return(View(searchForm));
            }
        }