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.OA; using CY.BLL.Sys; namespace CY.WebForm.Pages.business { //吴辉 //访问记录 public partial class CustomerAccessRecordDetailList : BasePage { OA_CustomerAccessRecordBLL _OA_CustomerAccessRecordBLL = null; OA_StaffBLL bll_OA_StaffBLL = null; Sys_DictionaryBLL bll_Sys_DictionaryBLL = null; public CustomerAccessRecordDetailList() { _OA_CustomerAccessRecordBLL = new OA_CustomerAccessRecordBLL(); bll_OA_StaffBLL = new OA_StaffBLL(); bll_Sys_DictionaryBLL = new Sys_DictionaryBLL(); } protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { InitialSelectData(); BindList(); } } protected void InitialSelectData() { this.selSourcesInfoId.DataSource = bll_Sys_DictionaryBLL.GetDataByType("客户访问类型"); this.selSourcesInfoId.DataTextField = "Name"; this.selSourcesInfoId.DataValueField = "MeanValue"; this.selSourcesInfoId.DataBind(); this.selSourcesInfoId.Items.Insert(0, new ListItem("全部", "")); this.selAccountManagerId.DataSource = bll_OA_StaffBLL.SelectListByFirmId(CurrentUser.MemberId,true,true); this.selAccountManagerId.DataTextField = "Name"; this.selAccountManagerId.DataValueField = "Keyid"; this.selAccountManagerId.DataBind(); this.selAccountManagerId.Items.Insert(0, new ListItem("全部", "")); } /// /// 加载全部数据 /// private void BindList() { Pagination pa = new Pagination(); pa.PageSize = int.MaxValue; pa.PageIndex = 1; this.RepFirmAccountIncomeListRecord.DataSource = _OA_CustomerAccessRecordBLL.SelectModelPage(pa, Request["Keyid"].ToString2(), Request["type"] == "cor" ? "True" : "False", CurrentUser.MemberId, this.selSourcesInfoId.Value, this.txtRegTimeStart.Value == null ? null : this.txtRegTimeStart.Value.ToDateTime2(), this.txtRegTimeEnd.Value == null ? null : this.txtRegTimeEnd.Value.ToDateTime2(), this.selAccountManagerId.Value); this.RepFirmAccountIncomeListRecord.DataBind(); } protected void btn_Search_Click(object sender, EventArgs e) { BindList(); } } }