//void Dicplay() //{ // dt.Columns.Add(new DataColumn("Отчёты")); // dataGridViewTotalRoom.DataSource = dt; // for (int i = 0; i < dataGridViewTotalRoom.Columns.Count; i++) // { // dataGridViewTotalRoom.Columns[i].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; // } //} private void ComboBoxRooms() { room = RoomModel.SelectAll(); cbxRooms.DisplayMember = "Name"; cbxRooms.ValueMember = "Id"; cbxRooms.DataSource = room; }
private void ShowRooms() { if (this.tabControlRooms.TabPages.Count == 0) { room = RoomModel.SelectAll(); foreach (RoomModel r in room) { TabPage tabpage = new TabPage(r.Name); userControl = new UserContrElems(); userControl.RoomId = tabControlRooms.TabPages.Count + 1; userControl.UserId = userId; tabpage.Controls.Add(userControl); this.tabControlRooms.TabPages.Add(tabpage); } } }
private void ShowRooms() { room = RoomModel.SelectAll(); dataGridViewRooms.DataSource = room; }