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 AnnouncementContent(int?ID, int?typeID)
        {
            if (!ID.HasValue || !typeID.HasValue)
            {
                return(RedirectToAction("AnnouncementLatest"));
            }
            //======語系取得========
            string langCd = GetLang();
            //======================
            AnnouncementLatestRepository repo  = new AnnouncementLatestRepository();
            AnnouncementLatestContent    mdoel = repo.GetContentByID((int)ID, (int)typeID, langCd);

            //=瀏覽記錄====================
            DataTable d_log;
            string    err_msg = "";

            DB.Log_Insert(ID.ToString(), "News");
            d_log = DB.Log_List(ref err_msg, ID.ToString(), "News");
            ViewData["log_count"] = d_log.Rows.Count.ToString();
            //============================

            return(View(mdoel));
        }
Exemplo n.º 3
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));
        }