Ejemplo n.º 1
0
        //[PowerManage]
        public ViewResult Index()
        {
            var bannerConfigs = DownloadAppManager.QueryBannerConfig(new BannerFilterQuery(), 1);

            if (bannerConfigs != null && bannerConfigs.Any())
            {
                foreach (var banner in bannerConfigs)
                {
                    if (!string.IsNullOrWhiteSpace(banner.Image))
                    {
                        banner.Image = WebConfigurationManager.AppSettings["DoMain_image"] + banner.Image;
                    }
                }
            }
            ViewBag.NoticeChannel   = DownloadAppManager.QueryNoticeChannel() ?? new List <NoticeChannel>();
            ViewBag.AllTargetGroups = GetTargetGroupDic();
            ViewBag.RuleList        = VIPAuthorizationRuleConfigManager.GetVIPAuthorizationRuleAndId();
            ViewBag.NumOfBanners    = DownloadAppManager.CountBannerConfig(new BannerFilterQuery());
            ViewBag.Page            = 1;

            #region  拉列表
            ViewBag.ChannelDLL          = ChannelDropDownList();
            ViewBag.LocationDLL         = LocationDropDownList();
            ViewBag.TargetSmallAppIdDLL = TargetSmallAppIdDropDownList();
            #endregion
            return(View(bannerConfigs ?? new List <BannerConfig>()));
        }
        public ViewResult Index(BannerFilterQuery bannerfilterQuery, int page = 1)
        {
            var bannerConfigs = DownloadAppManager.QueryBannerConfig(bannerfilterQuery, page);

            if (bannerConfigs != null && bannerConfigs.Any())
            {
                foreach (var banner in bannerConfigs)
                {
                    if (!string.IsNullOrWhiteSpace(banner.Image))
                    {
                        banner.Image = WebConfigurationManager.AppSettings["DoMain_image"] + banner.Image;
                    }
                }
            }
            ViewBag.NoticeChannel   = DownloadAppManager.QueryNoticeChannel() ?? new List <NoticeChannel>();
            ViewBag.AllTargetGroups = GetTargetGroupDic();
            ViewBag.RuleList        = VIPAuthorizationRuleConfigManager.GetVIPAuthorizationRuleAndId();
            ViewBag.NumOfBanners    = DownloadAppManager.CountBannerConfig(bannerfilterQuery);
            ViewBag.Page            = page;
            return(View(bannerConfigs ?? new List <BannerConfig>()));
        }