diff --git a/PluginsConventionLibrary/MainPluginConvention.cs b/PluginsConventionLibrary/MainPluginConvention.cs index c997f4f..b4cf92f 100644 --- a/PluginsConventionLibrary/MainPluginConvention.cs +++ b/PluginsConventionLibrary/MainPluginConvention.cs @@ -38,6 +38,24 @@ namespace PluginsConventionLibrary }; tableOfValues.ContextMenuStrip = menu; ReloadData(); + Configure(); + } + + public void ReloadData() + { + try + { + tableOfValues.ClearRows(); + var list = _studentLogic.Read(null); + if (list != null) + { + tableOfValues.SetCellValueFromList(list); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } } /// Название плагина @@ -93,7 +111,7 @@ namespace PluginsConventionLibrary return true; } - public void ReloadData() + public void Configure() { var columnConfigs = new List { diff --git a/PluginsConventionLibrary/Plugins/IPluginsConvention.cs b/PluginsConventionLibrary/Plugins/IPluginsConvention.cs index f85aa18..af3c095 100644 --- a/PluginsConventionLibrary/Plugins/IPluginsConvention.cs +++ b/PluginsConventionLibrary/Plugins/IPluginsConvention.cs @@ -35,6 +35,7 @@ /// Обновление набора данных в контроле /// void ReloadData(); + void Configure(); /// /// Создание простого документа