private void FrmChangeTable_Load(object sender, EventArgs e) { this.tbOldName.Text = table.TName; this.cboArea.Text = "一楼"; List <RoomType> list = RoomTypeBLL.selectall(); this.cboRoomType.DisplayMember = "RTNAME"; string id = Comm.id; this.cboRoomType.ValueMember = "RTID"; // this.cboRlou.DisplayMember = "TableArea"; this.cboRoomType.DataSource = list; }
private void FrmTableTs_Load(object sender, EventArgs e) { this.comblou.Text = "一楼"; List <RoomType> list = RoomTypeBLL.selectall(); this.cboRname.DisplayMember = "RTNAME"; string id = Comm.id; this.cboRname.ValueMember = "RTID"; // this.cboRlou.DisplayMember = "TableArea"; this.cboRname.DataSource = list; }
private void FrmTableX_Load(object sender, EventArgs e) { ///显示组合框 this.txtTname.Text = Comm.name; List <RoomType> list = RoomTypeBLL.selectall(); this.cboRname.DisplayMember = "RTNAME"; string id = Comm.id; this.cboRname.ValueMember = "RTID"; ///默认显示 /// //this.comblou.Text = comm.qu; //this.cboRname.Text = comm.qu; this.comblou.Text = Comm.qu; this.cboRname.DataSource = list; //for (int i = 0; i < this.cboRname.Items.Count; i++) //{ // //this.cboRname.SelectedIndex = i; // if (this.cboRname.SelectedValue.ToString() == comm.leibie.ToString()) // { // //this.cboRname.ValueMember // if (i != 0) // this.cboRname.SelectedIndex = i - 1; // else // this.cboRname.SelectedIndex = i; // } //} string newname = this.txtTname.Text; // string lei = this.cboRname.Text; string shi = this.cboRname.DisplayMember; // int yin=Convert.ToInt32(this.cboRname.ValueMember); //查找类别 }
private void SX() { List <RoomType> list = RoomTypeBLL.selectall(); RoomType p = new RoomType(); p.RTID = "0"; p.RTName = "全部"; list.Add(p); list.Reverse(); this.cbotype.DisplayMember = "RTNAME"; //this.cbotype.ValueMember = " RTID"; string id = Comm.id; this.cbotype.ValueMember = "RTID"; this.cbotype.DataSource = list; foreach (var item in list) { ListViewItem lvi = new ListViewItem(item.RTName.ToString()); lvi.SubItems.Add(item.RTMount); this.lv1.Items.Add(lvi); } }