public ActionResult RechargeDetail() { string key = HotelCloud.Common.HCRequest.GetString("key"); string hotelweixinId = key.Split('@')[0]; string userweixinId = key.Split('@')[1]; int page = 1; int pagesize = 10; int count = 0; DataTable dblist = WeiXin.Models.Home.RechargeUser.GeteRechargeUserList(hotelweixinId, userweixinId, out count, page, pagesize, "", ""); List <RechargeUser> list = DataTableToEntity.GetEntities <RechargeUser>(dblist).ToList(); list = RechargeUserConvert.RechargeConvertMember(list); ViewData["list"] = list; ViewData["count"] = count; ViewData["page"] = page; ViewData["pagesize"] = pagesize; return(View()); }
public ActionResult FetchRechargeOrder() { string query = HotelCloud.Common.HCRequest.GetString("query").Trim(); string select = HotelCloud.Common.HCRequest.GetString("select").Trim(); string key = HotelCloud.Common.HCRequest.GetString("key"); string hotelweixinId = key.Split('@')[0]; string userweixinId = key.Split('@')[1]; int page = HotelCloud.Common.HCRequest.GetInt("page", 1); if (page < 1) { page = 1; } int pagesize = 10; int count = 0; int pagesum = 0; DataTable dblist = WeiXin.Models.Home.RechargeUser.GeteRechargeUserList(hotelweixinId, userweixinId, out count, page, pagesize, "", ""); List <RechargeUser> list = DataTableToEntity.GetEntities <RechargeUser>(dblist).ToList(); list = RechargeUserConvert.RechargeConvertMember(list); Newtonsoft.Json.Converters.IsoDateTimeConverter timeFormat = new Newtonsoft.Json.Converters.IsoDateTimeConverter(); timeFormat.DateTimeFormat = "yyyy-MM-dd HH:mm:ss"; pagesum = (count % pagesize == 0) ? count / pagesize : count / pagesize + 1; return(Json(new { data = Newtonsoft.Json.JsonConvert.SerializeObject(list, timeFormat), count = count, page = page, pagesum = pagesum }, JsonRequestBehavior.AllowGet)); }