diff --git a/Confectionery/FormComponents.cs b/Confectionery/FormComponents.cs index c93c9ed..351a495 100644 --- a/Confectionery/FormComponents.cs +++ b/Confectionery/FormComponents.cs @@ -64,18 +64,15 @@ namespace ConfectioneryView { if (dataGridView.SelectedRows.Count == 1) { - var service = - Program.ServiceProvider?.GetService(typeof(FormComponent)); + var service = Program.ServiceProvider?.GetService(typeof(FormComponent)); if (service is FormComponent form) { - form.Id = - Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); + form.Id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); if (form.ShowDialog() == DialogResult.OK) { - + LoadData(); } } - LoadData(); } } private void ButtonDel_Click(object sender, EventArgs e) diff --git a/Confectionery/FormPastry.cs b/Confectionery/FormPastry.cs index f6fa367..7b09962 100644 --- a/Confectionery/FormPastry.cs +++ b/Confectionery/FormPastry.cs @@ -102,8 +102,7 @@ namespace ConfectioneryView { if (dataGridView.SelectedRows.Count == 1) { - var service = - Program.ServiceProvider?.GetService(typeof(FormPastryComponent)); + var service = Program.ServiceProvider?.GetService(typeof(FormPastryComponent)); if (service is FormPastryComponent form) { int id = @@ -118,8 +117,7 @@ namespace ConfectioneryView } _logger.LogInformation("Изменение компонента: { ComponentName} - { Count} ", form.ComponentModel.ComponentName, form.Count); - _pastryComponents[form.Id] = (form.ComponentModel, - form.Count); + _pastryComponents[form.Id] = (form.ComponentModel, form.Count); LoadData(); } }