예제 #1
0
        public ActionResult BannerAdd(int bannerid = 0)
        {
            ViewBag.bannerid = bannerid;
            if (bannerid > 0)
            {
                BannerCache bannerCache = RemotingHelp.GetModelObject <BannerCache>();
                ViewBag.banner = bannerCache.GetBanners().SingleOrDefault(t => t.id == bannerid);
            }
            ProductCache productCache = RemotingHelp.GetModelObject <ProductCache>();

            ViewBag.products = productCache.GetNoRepeatProducts();
            return(View());
        }
예제 #2
0
        /// <summary>
        /// 删除轮播图
        /// </summary>
        /// <returns></returns>
        public ActionResult DeleteBanner(int[] ids)
        {
            BannerCache bannerCache = RemotingHelp.GetModelObject <BannerCache>();

            return(Json(bannerCache.DeleteBanner(ids), JsonRequestBehavior.AllowGet));
        }
예제 #3
0
        /// <summary>
        /// 添加编辑轮播图
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public ActionResult AddBanner(AddBannerModel model)
        {
            BannerCache bannerCache = RemotingHelp.GetModelObject <BannerCache>();

            return(Json(bannerCache.AddBanner(model), JsonRequestBehavior.AllowGet));
        }
예제 #4
0
        public ActionResult GetBannersForAdmin()
        {
            BannerCache bannerCache = RemotingHelp.GetModelObject <BannerCache>();

            return(Json(bannerCache.GetBannersForAdmin(), JsonRequestBehavior.AllowGet));
        }
예제 #5
0
        public List <ShowBannerInfo> GetBanners()
        {
            BannerCache bannerCache = RemotingHelp.GetModelObject <BannerCache>();

            return(bannerCache.GetBanners());
        }