Пример #1
0
        /// <summary>
        /// 广告浏览
        /// </summary>
        /// <returns></returns>
        public ActionResult AdvertiseView()
        {
            BllAdActive Bll = new BllAdActive();

            string key = "";

            if (!String.IsNullOrEmpty(Request["Id"]))
            {
                key = Request["Id"].ToString();
            }
            var model = Bll.GetModelByWhere(" and Id='" + key + "'");

            ViewData["Name"]           = model.ActiveName;
            ViewData["ActionTypeName"] = model.ActionFormName;
            ViewData["CreateTime"]     = Convert.ToDateTime(model.CreateTime).ToString("yyyy-MM-dd hh:mm");
            ViewData["Img"]            = model.Img;
            ViewData["ReadNum"]        = 0;
            switch (model.ActionType)
            {
            case 1:
            case 2:
                ViewData["Info"] = model.Info;
                break;

            case 3:
                var Dymaic = new BllEDynamic().LoadData(model.ActionFormId);
                ViewData["Info"] = Dymaic.Content;
                break;
            }
            LogInsert(OperationTypeEnum.访问, "广告预览模块", "访问页面成功.");
            return(View());
        }
Пример #2
0
        /// <summary>
        /// 公告浏览
        /// </summary>
        /// <returns></returns>
        public ActionResult LookView()
        {
            BllAdActive Bll = new BllAdActive();

            string key = "";

            if (!String.IsNullOrEmpty(Request["Id"]))
            {
                key = Request["Id"].ToString();
            }
            var model = Bll.GetModelByWhere(" and Id='" + key + "'");

            ViewData["Name"]           = model.ActiveName;
            ViewData["ActionTypeName"] = model.ActionTypeName;
            ViewData["CreateTime"]     = Convert.ToDateTime(model.CreateTime).ToString("yyyy-MM-dd hh:mm");
            ViewData["Info"]           = model.Info;
            ViewData["ReadNum"]        = 0;


            return(View());
        }