using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using CY.Infrastructure.Query; using CY.BLL; using CY.Model; namespace CY.WebForm.Pages.member { public partial class CashListShow : System.Web.UI.Page { Pay_CashApplyBLL pay_CashApplyBLL = new Pay_CashApplyBLL(); public string PrintHtml = ""; public string StartDate { get { return Request.Params["StartDate"] == null ? string.Empty : Request.Params["StartDate"].ToString(); } } public string EndDate { get { string endDate = Request.Params["EndDate"] == null ? string.Empty : Request.Params["EndDate"].ToString(); if (!string.IsNullOrEmpty(endDate)) { endDate = DateTime.Parse(endDate).AddDays(1).ToString(); } return endDate; } } public string Province { get { return Request.Params["Province"] == null ? string.Empty : Request.Params["Province"].ToString(); } } public string City { get { return Request.Params["City"] == null ? string.Empty : Request.Params["City"].ToString(); } } public string County { get { return Request.Params["County"] == null ? string.Empty : Request.Params["County"].ToString(); } } public int CashTypeId { get { return Request.Params["CashTypeId"] == null ? 1 : int.Parse(Request.Params["CashTypeId"].ToString()); } } protected void Page_Load(object sender, EventArgs e) { UCPager1.AspNetPager.PageChanged += AspNetPager1_PageChanged; if (!IsPostBack) { BindList(); } } /// /// 绑定数据 /// private void BindList() { Pagination pa = new Pagination(); pa.PageSize = UCPager1.AspNetPager.PageSize; pa.PageIndex = UCPager1.AspNetPager.CurrentPageIndex; this.RepClientList.DataSource = pay_CashApplyBLL.GetModelPageList(pa, CashTypeId, StartDate, EndDate, Province, City, County); this.RepClientList.DataBind(); UCPager1.AspNetPager.RecordCount = pa.RecordCount; Pagination pa_All = new Pagination(); pa_All.PageSize = int.MaxValue; pa_All.PageIndex = 1; List m_EC_OrderBasic_List = pay_CashApplyBLL.GetModelPageList(pa_All, CashTypeId, StartDate, EndDate, Province, City, County).ToList(); PrintHtml += "编号会员名称提现类型提现金额银行帐号开户行开户人提现状态申请时间"; if (m_EC_OrderBasic_List != null && m_EC_OrderBasic_List.Count > 0) { int i = 1; foreach (var item in m_EC_OrderBasic_List) { PrintHtml += "" + i + "" + item.MemberName + "" + (item.CashTypeId == 0 ? "账户提现" : "推广提现") + "" + item.Money.Value.ToString("0.00") + "" + item.TargetBankId + "" + item.TargetBankName + "" + item.Cardholder + "" + item.CashStateName + "" + item.CreateTime + ""; i++; } } } //分页事件 protected void AspNetPager1_PageChanged(object src, EventArgs e) { BindList(); } } }