public ActionResult DrawList() { List <DrawInfoModel> list = Recharge.GetDrawList(1, 50, " where a.uid=" + WorkContext.Uid.ToString()); DrawListModel draw = new DrawListModel { PageModel = new PageModel(50, 1, list.Count > 0 ? list[0].TotalCount : 0), DrawList = list }; return(View(draw)); }
/// <summary> /// 提现列表 /// </summary> public ActionResult DrawList(string username = "", string mobile = "", string alipayaccount = "", string status = "-1", int pageSize = 15, int pageNumber = 1) { StringBuilder strb = new StringBuilder(); strb.Append(" where 1=1 "); if (username != "") { strb.Append(" and a.username like '%" + username + "%' "); } if (mobile != "") { strb.Append(" and a.mobile like '" + mobile + "%' "); } if (alipayaccount != "") { strb.Append(" and a.alipay like '" + alipayaccount + "%' "); } if (status != "-1" && status != "") { strb.Append(" and a.state =" + status); } strb.Append(" order by a.[addtime] desc"); List <DrawInfoModel> drawlist = Recharge.GetDrawList(pageNumber, pageSize, strb.ToString()); DrawListModel model = new DrawListModel() { DrawList = drawlist, PageModel = new PageModel(pageSize, pageNumber, drawlist.Count > 0 ? drawlist[0].TotalCount : 0), Status = int.Parse(status), UserName = username, Mobile = mobile, AlipayAccount = alipayaccount }; ShopUtils.SetAdminRefererCookie(string.Format("{0}?pageNumber={1}&pageSize={2}&UserName={3}&Mobile={4}&Status={5}&AlipayAccount={6}", Url.Action("DrawList"), pageNumber, pageSize, username, mobile, status, alipayaccount)); return(View(model)); }