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()); }
public ActionResult CouponAdd(int coupontypeid = 0) { ViewBag.coupontypeid = coupontypeid; ViewBag.coupontype = null; if (coupontypeid > 0) { COUPON coupon = RemotingHelp.GetModelObject <COUPON>(); ViewBag.coupontype = (coupon.GetCouponType().data as List <ShowCouponTypeInfo>).SingleOrDefault(t => t.ct_coupontypeid == coupontypeid); } ProductCache productCache = RemotingHelp.GetModelObject <ProductCache>(); ViewBag.products = productCache.GetNoRepeatProducts(); return(View()); }