Реализована логика отображения клиента на главной форме
This commit is contained in:
parent
7fbe743e1a
commit
165d7df93f
@ -42,6 +42,7 @@
|
||||
buttonOrderReady = new Button();
|
||||
button4 = new Button();
|
||||
buttonRefresh = new Button();
|
||||
клиентыToolStripMenuItem = new ToolStripMenuItem();
|
||||
menuStrip.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||
SuspendLayout();
|
||||
@ -58,7 +59,7 @@
|
||||
//
|
||||
// справочникиToolStripMenuItem
|
||||
//
|
||||
справочникиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { ComponentsToolStripMenuItem, SecuresToolStripMenuItem });
|
||||
справочникиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { ComponentsToolStripMenuItem, SecuresToolStripMenuItem, клиентыToolStripMenuItem });
|
||||
справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
|
||||
справочникиToolStripMenuItem.Size = new Size(117, 24);
|
||||
справочникиToolStripMenuItem.Text = "Справочники";
|
||||
@ -66,14 +67,14 @@
|
||||
// ComponentsToolStripMenuItem
|
||||
//
|
||||
ComponentsToolStripMenuItem.Name = "ComponentsToolStripMenuItem";
|
||||
ComponentsToolStripMenuItem.Size = new Size(182, 26);
|
||||
ComponentsToolStripMenuItem.Size = new Size(224, 26);
|
||||
ComponentsToolStripMenuItem.Text = "Компоненты";
|
||||
ComponentsToolStripMenuItem.Click += ComponentsToolStripMenuItem_Click;
|
||||
//
|
||||
// SecuresToolStripMenuItem
|
||||
//
|
||||
SecuresToolStripMenuItem.Name = "SecuresToolStripMenuItem";
|
||||
SecuresToolStripMenuItem.Size = new Size(182, 26);
|
||||
SecuresToolStripMenuItem.Size = new Size(224, 26);
|
||||
SecuresToolStripMenuItem.Text = "Изделия";
|
||||
SecuresToolStripMenuItem.Click += SecuresToolStripMenuItem_Click;
|
||||
//
|
||||
@ -174,6 +175,13 @@
|
||||
buttonRefresh.UseVisualStyleBackColor = true;
|
||||
buttonRefresh.Click += ButtonRefresh_Click;
|
||||
//
|
||||
// клиентыToolStripMenuItem
|
||||
//
|
||||
клиентыToolStripMenuItem.Name = "клиентыToolStripMenuItem";
|
||||
клиентыToolStripMenuItem.Size = new Size(224, 26);
|
||||
клиентыToolStripMenuItem.Text = "Клиенты";
|
||||
клиентыToolStripMenuItem.Click += ClientsToolStripMenuItem_Click;
|
||||
//
|
||||
// FormMain
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||
@ -213,5 +221,6 @@
|
||||
private ToolStripMenuItem списокКомпонентовToolStripMenuItem;
|
||||
private ToolStripMenuItem компонентыПоИзделиямToolStripMenuItem;
|
||||
private ToolStripMenuItem списокЗаказовToolStripMenuItem;
|
||||
private ToolStripMenuItem клиентыToolStripMenuItem;
|
||||
}
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SecuritySystemContracts.BindingModels;
|
||||
using SecuritySystemContracts.BusinessLogicsContracts;
|
||||
using SecuritySystemView.Client;
|
||||
using SecuritySystemView.Report;
|
||||
|
||||
namespace SecuritySystemView
|
||||
@ -31,6 +32,7 @@ namespace SecuritySystemView
|
||||
{
|
||||
dataGridView.DataSource = list;
|
||||
dataGridView.Columns["SecureId"].Visible = false;
|
||||
dataGridView.Columns["ClientId"].Visible = false;
|
||||
|
||||
}
|
||||
_logger.LogInformation("Загрузка заказов");
|
||||
@ -171,5 +173,14 @@ namespace SecuritySystemView
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void ClientsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormClients));
|
||||
if (service is FormClients form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ namespace SecuritySystemView
|
||||
try
|
||||
{
|
||||
var listClients = _clientLogic.ReadList(null);
|
||||
if (listSecures != null)
|
||||
if (listClients != null)
|
||||
{
|
||||
comboBoxClients.DisplayMember = "ClientFIO";
|
||||
comboBoxClients.ValueMember = "Id";
|
||||
|
@ -7,6 +7,7 @@ using SecuritySystemBusinessLogic.OfficePackage.Implements;
|
||||
using SecuritySystemContracts.BusinessLogicsContracts;
|
||||
using SecuritySystemContracts.StoragesContracts;
|
||||
using SecuritySystemDatabaseImplement.Implements;
|
||||
using SecuritySystemView.Client;
|
||||
using SecuritySystemView.Report;
|
||||
|
||||
namespace SecuritySystemView
|
||||
@ -39,10 +40,12 @@ namespace SecuritySystemView
|
||||
services.AddTransient<IComponentStorage, ComponentStorage>();
|
||||
services.AddTransient<IOrderStorage, OrderStorage>();
|
||||
services.AddTransient<ISecureStorage, SecureStorage>();
|
||||
services.AddTransient<IClientStorage, ClientStorage>();
|
||||
services.AddTransient<IComponentLogic, ComponentLogic>();
|
||||
services.AddTransient<IOrderLogic, OrderLogic>();
|
||||
services.AddTransient<ISecureLogic, SecureLogic>();
|
||||
services.AddTransient<IReportLogic, ReportLogic>();
|
||||
services.AddTransient<IClientLogic, ClientLogic>();
|
||||
services.AddTransient<AbstractSaveToWord, SaveToWord>();
|
||||
services.AddTransient<AbstractSaveToExcel, SaveToExcel>();
|
||||
services.AddTransient<AbstractSaveToPdf, SaveToPdf>();
|
||||
@ -55,6 +58,7 @@ namespace SecuritySystemView
|
||||
services.AddTransient<FormSecures>();
|
||||
services.AddTransient<FormReportOrders>();
|
||||
services.AddTransient<FormReportSecureComponents>();
|
||||
services.AddTransient<FormClients>();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user