diff --git a/ComputersShop/ComputersShopRestApi/Program.cs b/ComputersShop/ComputersShopRestApi/Program.cs index c4b5ab6..578ebc2 100644 --- a/ComputersShop/ComputersShopRestApi/Program.cs +++ b/ComputersShop/ComputersShopRestApi/Program.cs @@ -23,6 +23,8 @@ builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); +builder.Services.AddSingleton(); + builder.Services.AddControllers(); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle builder.Services.AddEndpointsApiExplorer(); diff --git a/ComputersShop/ComputersShopView/FormMails.Designer.cs b/ComputersShop/ComputersShopView/FormMails.Designer.cs index aa7f97a..12ef89b 100644 --- a/ComputersShop/ComputersShopView/FormMails.Designer.cs +++ b/ComputersShop/ComputersShopView/FormMails.Designer.cs @@ -51,6 +51,7 @@ this.Name = "FormMails"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Письма"; + this.Load += new System.EventHandler(this.FormMails_Load); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); this.ResumeLayout(false); diff --git a/ComputersShop/ComputersShopView/FormMain.cs b/ComputersShop/ComputersShopView/FormMain.cs index 1cc0894..f72a866 100644 --- a/ComputersShop/ComputersShopView/FormMain.cs +++ b/ComputersShop/ComputersShopView/FormMain.cs @@ -44,6 +44,7 @@ namespace ComputersShopView dataGridView.Columns["ComputerId"].Visible = false; dataGridView.Columns["ComputerName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; dataGridView.Columns["ClientId"].Visible = false; + dataGridView.Columns["ClientEmail"].Visible = false; dataGridView.Columns["ClientFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; dataGridView.Columns["ImplementerId"].Visible = false; dataGridView.Columns["ImplementerFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; diff --git a/ComputersShop/ComputersShopView/FormReportComputerComponents.cs b/ComputersShop/ComputersShopView/FormReportComputerComponents.cs index ca71cbd..fc86288 100644 --- a/ComputersShop/ComputersShopView/FormReportComputerComponents.cs +++ b/ComputersShop/ComputersShopView/FormReportComputerComponents.cs @@ -61,12 +61,12 @@ namespace ComputersShopView { FileName = dialog.FileName }); - _logger.LogInformation("Saving list of ice creams with components"); + _logger.LogInformation("Saving list of computers with components"); MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { - _logger.LogError(ex, "Saving list of ice creams with components error"); + _logger.LogError(ex, "Saving list of computers with components error"); MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } }