Exemplo n.º 1
0
        // 最新訊息 - 新聞 公告 聲明 - 最新消息
        public ActionResult AnnouncementLatest(int?page)
        {
            //======語系取得========
            string langCd = GetLang();
            //======================
            AnnouncementLatestFilter filter = new AnnouncementLatestFilter()
            {
                CurrentPage = page ?? 1,
                LangCode    = langCd
            };

            AnnouncementLatestRepository repo  = new AnnouncementLatestRepository();
            AnnouncementLatestResult     mdoel = repo.GetList(filter);

            return(View(mdoel));
        }
Exemplo n.º 2
0
        // 最新訊息 - 新聞 公告 聲明 列表
        public ActionResult AnnouncementList(int?typeID, int?page)
        {
            if (!typeID.HasValue)
            {
                return(RedirectToAction("AnnouncementLatest"));
            }
            //======語系取得========
            string langCd = GetLang();
            //======================
            AnnouncementLatestFilter filter = new AnnouncementLatestFilter()
            {
                CurrentPage = page ?? 1,
                TypeID      = typeID,
                LangCode    = langCd
            };
            AnnouncementLatestRepository repo  = new AnnouncementLatestRepository();
            AnnouncementLatestResult     mdoel = repo.GetList(filter);

            mdoel.TypeID = (int)filter.TypeID;

            TempData["CateInfo"] = repo.GetNewsCate(langCd);
            return(View(mdoel));
        }