示例#1
0
        //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;
        }
示例#2
0
 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);
         }
     }
 }
示例#3
0
 private void ShowRooms()
 {
     room = RoomModel.SelectAll();
     dataGridViewRooms.DataSource = room;
 }