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.Query; using CY.Infrastructure.Common; using CY.BLL.EC; using CY.Model.Inquiry; namespace CY.WebForm.Pages.business { //吴辉 //行政管理 public partial class DeliverWorkBookList : BasePage { Sys_DictionaryBLL bll_Sys_DictionaryBLL = null; EC_OrderBasicBLL bll_EC_OrderBasicBLL = null; EC_OrderPrintParameterBLL _eC_OrderPrintParameterBLL = null; OA_StaffBLL bll_OA_StaffBLL = null; //初始化 public DeliverWorkBookList() { bll_Sys_DictionaryBLL = new Sys_DictionaryBLL(); bll_EC_OrderBasicBLL = new EC_OrderBasicBLL(); bll_OA_StaffBLL = new OA_StaffBLL(); _eC_OrderPrintParameterBLL = new EC_OrderPrintParameterBLL(); } //页面加载 protected void Page_Load(object sender, EventArgs e) { UCPager1.AspNetPager.PageChanged += AspNetPager1_PageChanged; if (!IsPostBack) { this.selCustormerManager.DataSource = bll_OA_StaffBLL.SelectListByFirmId(CurrentUser.MemberId, false, true); this.selCustormerManager.DataTextField = "Name"; this.selCustormerManager.DataValueField = "Keyid"; this.selCustormerManager.DataBind(); this.selCustormerManager.Items.Insert(0, new ListItem("全部", "")); this.selBusinessManager.DataSource = bll_OA_StaffBLL.SelectListByFirmId(CurrentUser.MemberId, true, false); this.selBusinessManager.DataTextField = "Name"; this.selBusinessManager.DataValueField = "Keyid"; this.selBusinessManager.DataBind(); this.selBusinessManager.Items.Insert(0, new ListItem("全部", "")); this.selOrderStates.DataSource = bll_Sys_DictionaryBLL.GetDataByType("EC_订单状态").Where(p => p.MeanValue.Value != -5 && p.MeanValue.Value != -4); this.selOrderStates.DataBind(); this.selOrderStates.Items.Insert(0, new ListItem("全部", "")); BindList(); } } //绑定数据 private void BindList() { Pagination pa = new Pagination(); pa.PageSize = UCPager1.AspNetPager.PageSize; pa.PageIndex = UCPager1.AspNetPager.CurrentPageIndex; var eC_OrderBasics = bll_EC_OrderBasicBLL.SelectModelPageWorkBook(pa, CurrentUser.MemberId, this.txtBeginDate.Value.Trim(), this.txtEndDate.Value.Trim(), this.txtOrderId.Value.Trim(), this.txtSearchyjname.Value.Trim(), this.selCustormerManager.Value, this.selBusinessManager.Value, this.selOrderStates.Value); foreach (var orderBasic in eC_OrderBasics) { EC_OrderPrintParameter _eC_OrderPrintParameter = _eC_OrderPrintParameterBLL.GetModel(orderBasic.Keyid.Value); InquiryCommonModel _inquiryCommonModel = null; if (null == _eC_OrderPrintParameter) { _inquiryCommonModel = new InquiryCommonModel(); } else { _inquiryCommonModel = SerializationHelper.DeSerialize(typeof(InquiryCommonModel), _eC_OrderPrintParameter.PrintParameter) as InquiryCommonModel; } orderBasic.OrderExtend.PrintNum = _inquiryCommonModel.PrintCount; } this.RepClientList.DataSource = eC_OrderBasics; this.RepClientList.DataBind(); UCPager1.AspNetPager.RecordCount = pa.RecordCount; } //分页事件 protected void AspNetPager1_PageChanged(object src, EventArgs e) { BindList(); } //查询事件 protected void btn_Search_Click(object src, EventArgs e) { BindList(); } } }