Пример #1
0
        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());
        }
Пример #2
0
        /// <summary>
        /// 获取所有的优惠券类型(用于后台配置)
        /// </summary>
        /// <returns></returns>
        public ActionResult GetCouponType()
        {
            COUPON coupon = RemotingHelp.GetModelObject <COUPON>();

            return(Json(coupon.GetCouponType(), JsonRequestBehavior.AllowGet));
        }