//Заполнение chooseBat4Equip private void UpdatechangeBrig4Equip(string bridName) { UpdateDb update = new UpdateDb(); DataTable newBatDb = update.UpdateBattalions(bridName); List <string> batpList = new List <string>(); foreach (DataRow ii in newBatDb.Rows) { batpList.Add(ii.ItemArray[0].ToString()); } chooseBat4Equip.DataSource = batpList; }
//////////ЗАПОЛНЕНИЕ ЭЛЕМЕНТОВ ИЗ БАЗЫ ДАННЫХ\\\\\\\\\\\\\\\ //Заполнение DataGridViewBattalions private void UpdateDataGridViewBattalions(string bridName) { UpdateDb update = new UpdateDb(); DataTable newBatDb = update.UpdateBattalions(bridName); battalionsDataGridView.DataSource = newBatDb; battalionsDataGridView.Columns[0].Width = 550; battalionsDataGridView.Columns[0].ReadOnly = true; battalionsDataGridView.Columns[0].Resizable = DataGridViewTriState.False; battalionsDataGridView.Columns[1].Width = 80; battalionsDataGridView.Columns[1].Resizable = DataGridViewTriState.False; battalionsDataGridView.Columns[2].Visible = false; battalionsDataGridView.Columns[3].Visible = false; battalionsDataGridView.Columns[4].Visible = false; battalionsDataGridView.Columns[5].Visible = false; }