diff --git a/Confectionery/FormViewPastry.cs b/Confectionery/FormViewPastry.cs index c622d3f..cdcbec6 100644 --- a/Confectionery/FormViewPastry.cs +++ b/Confectionery/FormViewPastry.cs @@ -64,16 +64,15 @@ namespace ConfectioneryView { if (dataGridView.SelectedRows.Count == 1) { - var service = Program.ServiceProvider?.GetService(typeof(FormPastryComponent)); - if (service is FormPastryComponent form) + var service = Program.ServiceProvider?.GetService(typeof(FormPastry)); + if (service is FormPastry form) { 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)