изменена вызывающая форма в FormViewPastry

This commit is contained in:
Данияр Аглиуллов 2023-02-05 20:17:16 +04:00
parent 52ba150765
commit 9fd6e03690

View File

@ -63,12 +63,10 @@ namespace ConfectioneryView
{
if (dataGridView.SelectedRows.Count == 1)
{
var service =
Program.ServiceProvider?.GetService(typeof(FormComponent));
if (service is FormComponent form)
var service = Program.ServiceProvider?.GetService(typeof(FormPastryComponent));
if (service is FormPastryComponent 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)
{