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.Model; using CY.Infrastructure.Query; using CY.Infrastructure.Common; using CY.BLL.Sys; using CY.BLL.OA; using CY.BLL.EC; using CY.BLL.Inquiry; using CY.Model.Inquiry; using System.Drawing; namespace CY.WebForm.Pages.financial { public partial class UnpayOrderList : BasePage { OA_CorporateClientsBLL bll_OA_CorporateClientsBLL = null; Sys_DictionaryBLL _Sys_DictionaryBLL = null; OA_StaffBLL bll_OA_StaffBLL = null; OA_CustomerApplyBLL bll_OA_CustomerApplyBLL = null; EC_MemberBasicBLL bll_EC_MemberBasicBLL = null; Sys_CitySiteBLL bll_Sys_CitySiteBLL = null; EC_OrderBLL eC_OrderBLL = null; //初始化 public UnpayOrderList() { _Sys_DictionaryBLL = new Sys_DictionaryBLL(); bll_OA_CorporateClientsBLL = new OA_CorporateClientsBLL(); bll_OA_StaffBLL = new OA_StaffBLL(); bll_OA_CustomerApplyBLL = new OA_CustomerApplyBLL(); bll_EC_MemberBasicBLL = new EC_MemberBasicBLL(); bll_Sys_CitySiteBLL = new Sys_CitySiteBLL(); eC_OrderBLL = new EC_OrderBLL(); } protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { switch (Request["Target"]) { default: BindProvince(); InitialSelectData(); BindList(); return; } Response.End(); } } //加载查询条件 protected void InitialSelectData() { this.selCustomerTypeId.DataSource = _Sys_DictionaryBLL.GetDataByType("客户类型"); this.selCustomerTypeId.DataBind(); this.selCustomerTypeId.Items.Insert(0, new ListItem("全部", "")); //业务经理 this.selBusinessManagerId.DataSource = bll_OA_StaffBLL.SelectListByFirmId(CurrentUser.MemberId, true, false); this.selBusinessManagerId.DataTextField = "Name"; this.selBusinessManagerId.DataValueField = "Keyid"; this.selBusinessManagerId.DataBind(); this.selBusinessManagerId.Items.Insert(0, new ListItem("全部", "")); //客户经理 this.selAccountManagerId.DataSource = bll_OA_StaffBLL.SelectListByFirmId(CurrentUser.MemberId, false, true); this.selAccountManagerId.DataTextField = "Name"; this.selAccountManagerId.DataValueField = "Keyid"; this.selAccountManagerId.DataBind(); this.selAccountManagerId.Items.Insert(0, new ListItem("全部", "")); } //查询事件 protected void btn_Search_Click(object sender, EventArgs e) { BindList(); } //绑定列表 private void BindList() { Pagination pa = new Pagination(); pa.PageSize = UCPager1.AspNetPager.PageSize; pa.PageIndex = UCPager1.AspNetPager.CurrentPageIndex; IEnumerable oA_DeliverPlans1 = eC_OrderBLL.GetshoukuantixingList(pa, CurrentUser.MemberId, this.selectProvince.SelectedItem.Text.Replace("全部", ""), this.selectCity.SelectedItem.Text.Replace("全部", ""), this.selectCounty.SelectedItem.Text.Replace("全部", ""), this.selCustomerTypeId.Value, this.txtquery_userName.Value, this.selBusinessManagerId.Value, this.selAccountManagerId.Value); this.RepClientList.DataSource = oA_DeliverPlans1; this.RepClientList.DataBind(); UCPager1.AspNetPager.RecordCount = pa.RecordCount; } //绑定省 protected void BindProvince() { this.selectProvince.Items.Clear(); if (CurrentUser.TrueType == "员工") this.selectProvince.DataSource = bll_Sys_CitySiteBLL.SelectStaffManageProvinceList(CurrentUser.TrueMemberId); else this.selectProvince.DataSource = bll_Sys_CitySiteBLL.SelectAllNextModel(0, 0, 1); this.selectProvince.DataTextField = "Name"; this.selectProvince.DataValueField = "Keyid"; this.selectProvince.DataBind(); this.selectProvince.Items.Insert(0, new ListItem("全部", "")); this.selectCity.Items.Insert(0, new ListItem("全部", "")); this.selectCounty.Items.Insert(0, new ListItem("全部", "")); } //改变省绑定市 protected void ChangeProvince(object sender, EventArgs e) { this.selectCity.Items.Clear(); this.selectCounty.Items.Clear(); Sys_CitySite m_Sys_CitySite = bll_Sys_CitySiteBLL.GetModelByKeyid(this.selectProvince.SelectedValue.ToInt32() ?? 0); if (m_Sys_CitySite != null) { if (CurrentUser.TrueType == "员工") this.selectCity.DataSource = bll_Sys_CitySiteBLL.SelectStaffManageCityList(m_Sys_CitySite.Keyid, CurrentUser.TrueMemberId); else this.selectCity.DataSource = bll_Sys_CitySiteBLL.SelectAllNextModel(m_Sys_CitySite.Keyid, 0, 2); this.selectCity.DataTextField = "Name"; this.selectCity.DataValueField = "Keyid"; this.selectCity.DataBind(); } this.selectCity.Items.Insert(0, new ListItem("全部", "")); this.selectCounty.Items.Insert(0, new ListItem("全部", "")); } //改变市绑定区 protected void ChangeCity(object sender, EventArgs e) { this.selectCounty.Items.Clear(); Sys_CitySite m_Sys_CitySite = bll_Sys_CitySiteBLL.GetModelByKeyid(this.selectCity.SelectedValue.ToInt32() ?? 0); if (m_Sys_CitySite != null) { if (CurrentUser.TrueType == "员工") this.selectCounty.DataSource = bll_Sys_CitySiteBLL.SelectStaffManageCountryList(m_Sys_CitySite.ProvinceId, m_Sys_CitySite.Keyid, CurrentUser.TrueMemberId); else this.selectCounty.DataSource = bll_Sys_CitySiteBLL.SelectProxyNextModel(m_Sys_CitySite.ProvinceId, m_Sys_CitySite.Keyid, 3); this.selectCounty.DataTextField = "Name"; this.selectCounty.DataValueField = "Keyid"; this.selectCounty.DataBind(); } this.selectCounty.Items.Insert(0, new ListItem("全部", "")); } } }