コード例 #1
0
        public ActionResult SubmitSearch()
        {
            var title = Request.Form["title"];
            //var type = Request.Form["type"];
            var fromDT      = DateTime.Parse(Request.Form["fromDT"]);
            var toDT        = DateTime.Parse(Request.Form["toDT"]);
            var author      = Request.Form["author"];
            var author_dept = Request.Form["author_dept"];

            ArticleType?artile_type = null;

            //if (type == "1")
            //    artile_type = ArticleType.学术类;
            //else if (type == "2")
            //    artile_type = ArticleType.科普类;

            //ViewBag.Article_List = ArticleMgr.QueryArticles(title, artile_type, fromDT, toDT, author, author_dept);

            ViewBag.News_List = NewsMgr.QueryNews(title, fromDT, toDT, author, author_dept);

            if (string.IsNullOrEmpty(author) == true &&
                string.IsNullOrEmpty(author_dept) == true)
            {
                ViewBag.Cds_List = CdsMgr.QueryCds(title);
            }

            return(View("SearchResult"));
        }
コード例 #2
0
        /// <summary>
        /// 显示决策支持详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult Detail(int id)
        {
            ViewBag.CurrentUser = CurrentUser;
            if (CurrentUser != null)
            {
                ViewBag.Collection = AccountMgr.GetUserCollection(CurrentUser.id, ContentType.指导, id);
            }
            var obj = CdsMgr.GetCds(id);

            return(View(obj));
        }
コード例 #3
0
        /// <summary>
        /// 显示决策指导列表
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            var all = CdsMgr.GetCdsList();

            return(View(all));
        }