исправлен FormComponents
This commit is contained in:
parent
9fd6e03690
commit
50364962ec
@ -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)
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user