diff --git a/RenovationWork/ImplementationExtensions/RenovationWorkContracts.dll b/RenovationWork/ImplementationExtensions/RenovationWorkContracts.dll index ef88d75..f6f5bfd 100644 Binary files a/RenovationWork/ImplementationExtensions/RenovationWorkContracts.dll and b/RenovationWork/ImplementationExtensions/RenovationWorkContracts.dll differ diff --git a/RenovationWork/ImplementationExtensions/RenovationWorkDatabaseImplement.dll b/RenovationWork/ImplementationExtensions/RenovationWorkDatabaseImplement.dll index 333b835..a508fe1 100644 Binary files a/RenovationWork/ImplementationExtensions/RenovationWorkDatabaseImplement.dll and b/RenovationWork/ImplementationExtensions/RenovationWorkDatabaseImplement.dll differ diff --git a/RenovationWork/ImplementationExtensions/RenovationWorkFileImplement.dll b/RenovationWork/ImplementationExtensions/RenovationWorkFileImplement.dll index 8ffde2a..05c2400 100644 Binary files a/RenovationWork/ImplementationExtensions/RenovationWorkFileImplement.dll and b/RenovationWork/ImplementationExtensions/RenovationWorkFileImplement.dll differ diff --git a/RenovationWork/ImplementationExtensions/RenovationWorkListImplement.dll b/RenovationWork/ImplementationExtensions/RenovationWorkListImplement.dll index da6466c..e852011 100644 Binary files a/RenovationWork/ImplementationExtensions/RenovationWorkListImplement.dll and b/RenovationWork/ImplementationExtensions/RenovationWorkListImplement.dll differ diff --git a/RenovationWork/RenovationWork/FormComponents.cs b/RenovationWork/RenovationWork/FormComponents.cs index f3aff18..b234c6a 100644 --- a/RenovationWork/RenovationWork/FormComponents.cs +++ b/RenovationWork/RenovationWork/FormComponents.cs @@ -41,7 +41,8 @@ namespace RenovationWorkView dataGridView.Columns["ComponentName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; } _logger.LogInformation("Загрузка компонентов"); - } + dataGridView.FillAndConfigGrid(_logic.ReadList(null)); + } catch (Exception ex) { _logger.LogError(ex, "Ошибка загрузки компонентов"); diff --git a/RenovationWork/RenovationWork/FormImplementers.cs b/RenovationWork/RenovationWork/FormImplementers.cs index 79e8d2f..73920e3 100644 --- a/RenovationWork/RenovationWork/FormImplementers.cs +++ b/RenovationWork/RenovationWork/FormImplementers.cs @@ -31,17 +31,27 @@ namespace RenovationWorkView } private void LoadData() { - try - { - dataGridView.FillAndConfigGrid(_logic.ReadList(null)); - _logger.LogInformation("Загрузка компонентов"); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка загрузки компонентов"); - MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } + try + { + var list = _logic.ReadList(null); + if (list != null) + { + dataGridView.DataSource = list; + dataGridView.Columns["Id"].Visible = false; + dataGridView.Columns["ImplementerFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; + dataGridView.Columns["Password"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; + dataGridView.Columns["WorkExperience"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; + dataGridView.Columns["Qualification"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; + } + _logger.LogInformation("Загрузка исполнителей"); + dataGridView.FillAndConfigGrid(_logic.ReadList(null)); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка загрузки исполнителей"); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } private void buttonCreate_Click(object sender, EventArgs e) { @@ -79,7 +89,7 @@ namespace RenovationWorkView MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); - _logger.LogInformation("Удаление компонента"); + _logger.LogInformation("Удаление исполнителя"); try { if (!_logic.Delete(new ImplementerBindingModel