/// <summary> /// 查询用户优惠券 /// </summary> /// <param name="query">查询信息</param> /// <returns></returns> public static QueryResult <CustomerCouponInfo> QueryCouponCode(CustomerCouponCodeQueryInfo query) { var memberInfo = CustomerDA.GetCustomerInfo(query.CustomerSysNo); query.CustomerRank = (int)memberInfo.CustomerRank; return(CustomerDA.QueryCouponCode(query)); }
/// <summary> /// 我的优惠券 /// </summary> /// <returns></returns> public ActionResult Coupon() { int pageIndex = 0; if (int.TryParse(Request.Params["page"], out pageIndex)) { pageIndex--; } CustomerCouponCodeQueryInfo query = new CustomerCouponCodeQueryInfo(); query.PageInfo.PageIndex = pageIndex; query.PageInfo.PageSize = 10; query.CustomerSysNo = this.CurrUser.UserSysNo; query.Status = "A"; var result = CustomerFacade.QueryCouponCode(query); result.PageInfo.PageIndex++; return(View(result)); }
public ActionResult Ajax_QueryCoupons() { var result = new AjaxResult { Success = true }; int pageIndex = int.Parse(Request["PageIndex"]); CustomerCouponCodeQueryInfo query = new CustomerCouponCodeQueryInfo(); query.PageInfo.PageIndex = pageIndex; query.PageInfo.PageSize = 10; query.CustomerSysNo = this.CurrUser.UserSysNo; query.Status = "A"; var data = CustomerFacade.QueryCouponCode(query); data.PageInfo.PageIndex++; result.Data = data; return(Json(result, JsonRequestBehavior.AllowGet)); }