using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using CY.BLL; using CY.BLL.Sys; using CY.Model; using CY.Infrastructure.Common; using CY.Infrastructure; using CY.Infrastructure.DESEncrypt; using CY.BLL.EC; using CY.Infrastructure.Query; namespace CY.WebForm.Pages.membermanage { //吴辉 //会员订单列表 public partial class MemberOrderList : BasePage { EC_PaymentRecordBLL bll_EC_PaymentRecordBLL = null; public string Province = ""; //接收值 Request["selectProvince"].ToString2(); public string City = "";//接收值 Request["selectCity"].ToString2(); public string County = "";//接收值 Request["selectCounty"].ToString2(); //初始化 public MemberOrderList() { bll_EC_PaymentRecordBLL = new EC_PaymentRecordBLL(); } //页面加载 protected void Page_Load(object sender, EventArgs e) { UCPager1.AspNetPager.PageChanged += AspNetPager1_PageChanged; if (!IsPostBack) { BindOrderTypeList(); DataBindToPage(); } } /// /// 绑定会员订单类型 /// private void BindOrderTypeList() { IList sysDicList = new Sys_DictionaryBLL().GetDataByType("会员订单类型").OrderBy(p => p.MeanValue).ToList(); this.selOrderType.DataSource = sysDicList; this.selOrderType.DataTextField = "Name"; this.selOrderType.DataValueField = "Name"; this.selOrderType.DataBind(); this.selOrderType.Items.Insert(0, new ListItem("全部", "")); } //数据绑定 public void DataBindToPage() { Province = Request["selectProvince"].ToString2(); City = Request["selectCity"].ToString2(); County = Request["selectCounty"].ToString2(); Pagination pa = new Pagination(); pa.PageSize = UCPager1.AspNetPager.PageSize; pa.PageIndex = UCPager1.AspNetPager.CurrentPageIndex; this.RepClientList.DataSource = bll_EC_PaymentRecordBLL.SelectAllModelPage(pa, this.txtRegTimeEnd.Value.ToDateTime2(), this.txtRegTimeStart.Value.ToDateTime2(), this.txtCompanyName.Value, this.selMemberType.Value, this.selOrderType.Value, Request["selectProvince"], Request["selectCity"], Request["selectCounty"]); this.RepClientList.DataBind(); UCPager1.AspNetPager.RecordCount = pa.RecordCount; } //分页事件 protected void AspNetPager1_PageChanged(object src, EventArgs e) { DataBindToPage(); } //查询事件 protected void btn_Search_Click(object sender, EventArgs e) { UCPager1.AspNetPager.CurrentPageIndex = 1; DataBindToPage(); } } }