Agliullov D. A. Lab work 1 Base #2

Closed
d.agliullov wants to merge 14 commits from Lab1_Base into main
Showing only changes of commit 9fd6e03690 - Show all commits

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)
{