название форм

This commit is contained in:
antoc0der 2024-02-28 13:38:21 +03:00
parent 54eed0d5d7
commit 6e237994d4
4 changed files with 9 additions and 9 deletions

View File

@ -1,6 +1,6 @@
namespace ProjectFlowerShop namespace ProjectFlowerShop
{ {
partial class FormProduct partial class FormFlower
{ {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.

View File

@ -15,7 +15,7 @@ using System.Windows.Forms;
namespace ProjectFlowerShop namespace ProjectFlowerShop
{ {
public partial class FormProduct : Form public partial class FormFlower : Form
{ {
private readonly ILogger _logger; private readonly ILogger _logger;
private readonly IFlowerLogic _logic; private readonly IFlowerLogic _logic;
@ -23,7 +23,7 @@ namespace ProjectFlowerShop
private Dictionary<int, (IComponentModel, int)> _flowerComponents; private Dictionary<int, (IComponentModel, int)> _flowerComponents;
public int Id { set { _id = value; } } public int Id { set { _id = value; } }
public FormProduct(ILogger<FormProduct> logger, IFlowerLogic logic) public FormFlower(ILogger<FormFlower> logger, IFlowerLogic logic)
{ {
InitializeComponent(); InitializeComponent();
_logger = logger; _logger = logger;

View File

@ -53,8 +53,8 @@ namespace ProjectFlowerShop
private void AddButton_Click(object sender, EventArgs e) private void AddButton_Click(object sender, EventArgs e)
{ {
var service = Program.ServiceProvider?.GetService(typeof(FormProduct)); var service = Program.ServiceProvider?.GetService(typeof(FormFlower));
if (service is FormProduct form) if (service is FormFlower form)
{ {
if (form.ShowDialog() == DialogResult.OK) if (form.ShowDialog() == DialogResult.OK)
{ {
@ -67,8 +67,8 @@ namespace ProjectFlowerShop
{ {
if (DataGridView.SelectedRows.Count == 1) if (DataGridView.SelectedRows.Count == 1)
{ {
var service = Program.ServiceProvider?.GetService(typeof(FormProduct)); var service = Program.ServiceProvider?.GetService(typeof(FormFlower));
if (service is FormProduct form) if (service is FormFlower form)
{ {
var tmp = Convert.ToInt32(DataGridView.SelectedRows[0].Cells["Id"].Value); var tmp = Convert.ToInt32(DataGridView.SelectedRows[0].Cells["Id"].Value);
form.Id = Convert.ToInt32(DataGridView.SelectedRows[0].Cells["Id"].Value); form.Id = Convert.ToInt32(DataGridView.SelectedRows[0].Cells["Id"].Value);

View File

@ -44,8 +44,8 @@ namespace ProjectFlowerShop
services.AddTransient<ComponentForm>(); services.AddTransient<ComponentForm>();
services.AddTransient<FormComponents>(); services.AddTransient<FormComponents>();
services.AddTransient<FormCreateOrder>(); services.AddTransient<FormCreateOrder>();
services.AddTransient<FormProduct>(); services.AddTransient<FormFlower>();
services.AddTransient<FormProductComponent>(); services.AddTransient<FormFlowerComponent>();
services.AddTransient<FormFlowers>(); services.AddTransient<FormFlowers>();
} }