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 System.Data; namespace CY.WebForm.Pages.workcar { //吴辉 //车辆配置管理 public partial class MemberDictionaryList : BasePage { Sys_DictionaryBLL bll_Sys_DictionaryBLL = null; OA_CarDictionaryBLL bll_OA_CarDictionaryBLL = null; //初始化 public MemberDictionaryList() { bll_Sys_DictionaryBLL = new Sys_DictionaryBLL(); bll_OA_CarDictionaryBLL = new OA_CarDictionaryBLL(); } //页面加载 protected void Page_Load(object sender, EventArgs e) { UCPager1.AspNetPager.PageChanged += AspNetPager1_PageChanged; if (!IsPostBack) { this.selParType.DataSource = bll_Sys_DictionaryBLL.GetDataByType("车辆配置表类型"); this.selParType.DataValueField = "Name"; this.selParType.DataTextField = "Name"; this.selParType.DataBind(); this.selParType.Items.Insert(0, new ListItem("全部", "")); BindList(); } if (Request["delete"] != null) { if (bll_OA_CarDictionaryBLL.DelAllModel(Request["delete"].ToString2(),CurrentUser.MemberId)) { JavaScript.MessageBox("删除成功", this, "window.location='/Pages/workcar/MemberDictionaryList.aspx'"); } else { JavaScript.MessageBox("删除失败", this); } } } //绑定数据 private void BindList() { Pagination pa = new Pagination(); pa.PageSize = UCPager1.AspNetPager.PageSize; pa.PageIndex = UCPager1.AspNetPager.CurrentPageIndex; this.RepClientList.DataSource = bll_OA_CarDictionaryBLL.SelectModelPage(pa, CurrentUser.MemberId, this.selParType.Value, this.txtParName.Value); this.RepClientList.DataBind(); UCPager1.AspNetPager.RecordCount = pa.RecordCount; } //分页事件 protected void AspNetPager1_PageChanged(object src, EventArgs e) { BindList(); } protected void btn_Search_Click(object sender, EventArgs e) { BindList(); } } }