//加载会员级别的 public void LoadMemmberType(int p) { MemmberTypeBLL bll = new MemmberTypeBLL(); List <MemmberType> list = bll.GetAllMemmberTypeByDelFlag(p); list.Insert(0, new MemmberType() { MemType = -1, MemTpName = "请选择" }); cmbMemType.DataSource = list; cmbMemType.DisplayMember = "MemTpName"; cmbMemType.ValueMember = "MemType"; }
} //标识 //加载所有会员的等级信息 private void LoadMemmberTypeByDelFlag(int delFlag) { MemmberTypeBLL bll = new MemmberTypeBLL(); List <MemmberType> list = bll.GetAllMemmeberTypeByDelFlag(delFlag); list.Insert(0, new MemmberType() { MemType = -1, MemTpName = "请选择" }); //为下拉框绑定数据 cmbMemType.DataSource = list; cmbMemType.DisplayMember = "MemTpName"; //显示的是这个属性中的值 cmbMemType.ValueMember = "MemType"; //实际的值 }