public ActionResult Hi_Ajax_GetFolderTree(string areaName = "") { long shopId = 0; CouponsAjaxModel model = new CouponsAjaxModel() { list = new List <CouponsContent>() }; return(Json(GetTreeListJson(shopId), JsonRequestBehavior.AllowGet)); }
public ActionResult Hi_Ajax_SmallProgCoupons(int p = 1, long shopId = 1, string title = "") { int pageNo = p; CouponsAjaxModel model = new CouponsAjaxModel() { list = new List <CouponsContent>() }; SmallProInitialCouponsModel(model, shopId, title, pageNo); return(Json(model, JsonRequestBehavior.AllowGet)); }
public ActionResult Hi_Ajax_Coupons(int p = 1, long shopId = 1, string title = "") { int pageNo = p; shopId = CurrentSellerManager.ShopId; CouponsAjaxModel model = new CouponsAjaxModel() { list = new List <CouponsContent>() }; InitialCouponsModel(model, shopId, title, pageNo); return(Json(model, JsonRequestBehavior.AllowGet)); }
private void SmallProInitialCouponsModel(CouponsAjaxModel model, long shopId, string name = "", int pageNo = 1) { var couponsList = _iCouponService.GetCouponList(new Himall.IServices.QueryModel.CouponQuery { CouponName = name, IsOnlyShowNormal = true, IsShowAll = false, ShowPlatform = Himall.Core.PlatformType.Wap, PageNo = pageNo, PageSize = 10 }); int pageCount = TemplatePageHelper.GetPageCount(couponsList.Total, 10); if (couponsList != null) { model.status = 1; model.page = TemplatePageHelper.GetPageHtml(pageCount, pageNo); SmallProInitialCouponsContentModel(couponsList.Models, model); } }
private void SmallProInitialCouponsContentModel(IQueryable <Himall.Model.CouponInfo> couponsList, CouponsAjaxModel model) { foreach (var coupon in couponsList) { model.list.Add(new CouponsContent { create_time = coupon.CreateTime.ToString(), game_id = coupon.Id, link = "../coupondetail/coupondetail?id=" + coupon.Id, type = 1, title = coupon.CouponName, condition = coupon.OrderAmount.ToString(), endTime = coupon.EndTime.ToShortDateString(), price = coupon.Price.ToString(), shopName = coupon.ShopName }); } }