Начало работ.
This commit is contained in:
parent
a10ef889f9
commit
324a621815
@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace TransportCompamyMongoDBImplementer
|
||||||
|
{
|
||||||
|
public class DBMSContext
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -11,7 +11,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TransportCompanyContracts",
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TransportCompanyBusinessLogic", "TransportCompanyBusinessLogic\TransportCompanyBusinessLogic.csproj", "{5FD7F1C8-0B2C-4AD4-91FD-A4475274FD3A}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TransportCompanyBusinessLogic", "TransportCompanyBusinessLogic\TransportCompanyBusinessLogic.csproj", "{5FD7F1C8-0B2C-4AD4-91FD-A4475274FD3A}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TransportCompanyDatabaseImplements", "TransportCompanyDatabaseImplements\TransportCompanyDatabaseImplements.csproj", "{E421890B-5501-4A4D-931A-1B8139FDDB24}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TransportCompanyDatabaseImplements", "TransportCompanyDatabaseImplements\TransportCompanyDatabaseImplements.csproj", "{E421890B-5501-4A4D-931A-1B8139FDDB24}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TransportCompamyMongoDBImplementer", "TransportCompamyMongoDBImplementer\TransportCompamyMongoDBImplementer.csproj", "{5315CD03-FC5D-4ECB-9973-38989C1B02EE}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@ -39,6 +41,10 @@ Global
|
|||||||
{E421890B-5501-4A4D-931A-1B8139FDDB24}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{E421890B-5501-4A4D-931A-1B8139FDDB24}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{E421890B-5501-4A4D-931A-1B8139FDDB24}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{E421890B-5501-4A4D-931A-1B8139FDDB24}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{E421890B-5501-4A4D-931A-1B8139FDDB24}.Release|Any CPU.Build.0 = Release|Any CPU
|
{E421890B-5501-4A4D-931A-1B8139FDDB24}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{5315CD03-FC5D-4ECB-9973-38989C1B02EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{5315CD03-FC5D-4ECB-9973-38989C1B02EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{5315CD03-FC5D-4ECB-9973-38989C1B02EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{5315CD03-FC5D-4ECB-9973-38989C1B02EE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="connectToDb" value="Host=192.168.56.101;Port=6000;Database=elegev;Username=elegev;Password=user"/>
|
<add key="connectToDb" value="Host=192.168.56.103;Port=6000;Database=sit;Username=elegev;Password=user"/>
|
||||||
</appSettings>
|
</appSettings>
|
||||||
</configuration>
|
</configuration>
|
@ -1,261 +1,270 @@
|
|||||||
namespace TransportCompany
|
namespace TransportCompany
|
||||||
{
|
{
|
||||||
partial class FormTrucking
|
partial class FormTrucking
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Clean up any resources being used.
|
/// Clean up any resources being used.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
{
|
{
|
||||||
components.Dispose();
|
components.Dispose();
|
||||||
}
|
}
|
||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required method for Designer support - do not modify
|
/// Required method for Designer support - do not modify
|
||||||
/// the contents of this method with the code editor.
|
/// the contents of this method with the code editor.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
dataGridView = new DataGridView();
|
dataGridView = new DataGridView();
|
||||||
buttonCreateTrucking = new Button();
|
buttonCreateTrucking = new Button();
|
||||||
menuStrip = new MenuStrip();
|
menuStrip = new MenuStrip();
|
||||||
toolStripMenuItem = new ToolStripMenuItem();
|
toolStripMenuItem = new ToolStripMenuItem();
|
||||||
transportToolStripMenuItem = new ToolStripMenuItem();
|
transportToolStripMenuItem = new ToolStripMenuItem();
|
||||||
typeTransportationToolStripMenuItem = new ToolStripMenuItem();
|
typeTransportationToolStripMenuItem = new ToolStripMenuItem();
|
||||||
cargoToolStripMenuItem = new ToolStripMenuItem();
|
cargoToolStripMenuItem = new ToolStripMenuItem();
|
||||||
clientToolStripMenuItem = new ToolStripMenuItem();
|
clientToolStripMenuItem = new ToolStripMenuItem();
|
||||||
rndGenerationToolStripMenuItem = new ToolStripMenuItem();
|
rndGenerationToolStripMenuItem = new ToolStripMenuItem();
|
||||||
generationClientsToolStripMenuItem = new ToolStripMenuItem();
|
generationClientsToolStripMenuItem = new ToolStripMenuItem();
|
||||||
generationTruckingsToolStripMenuItem = new ToolStripMenuItem();
|
generationTruckingsToolStripMenuItem = new ToolStripMenuItem();
|
||||||
testTimeGetDataToolStripMenuItem = new ToolStripMenuItem();
|
testTimeGetDataToolStripMenuItem = new ToolStripMenuItem();
|
||||||
buttonUpdate = new Button();
|
testComplexQueriesToolStripMenuItem = new ToolStripMenuItem();
|
||||||
comboBoxEmails = new ComboBox();
|
buttonUpdate = new Button();
|
||||||
label1 = new Label();
|
comboBoxEmails = new ComboBox();
|
||||||
checkBoxSorted = new CheckBox();
|
label1 = new Label();
|
||||||
checkBoxForFilterMode = new CheckBox();
|
checkBoxSorted = new CheckBox();
|
||||||
testComplexQueriesToolStripMenuItem = new ToolStripMenuItem();
|
checkBoxForFilterMode = new CheckBox();
|
||||||
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
createJsonFilesToolStripMenuItem = new ToolStripMenuItem();
|
||||||
menuStrip.SuspendLayout();
|
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||||
SuspendLayout();
|
menuStrip.SuspendLayout();
|
||||||
//
|
SuspendLayout();
|
||||||
// dataGridView
|
//
|
||||||
//
|
// dataGridView
|
||||||
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
//
|
||||||
dataGridView.Location = new Point(11, 67);
|
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
dataGridView.Name = "dataGridView";
|
dataGridView.Location = new Point(11, 67);
|
||||||
dataGridView.RowHeadersWidth = 51;
|
dataGridView.Name = "dataGridView";
|
||||||
dataGridView.RowTemplate.Height = 29;
|
dataGridView.RowHeadersWidth = 51;
|
||||||
dataGridView.Size = new Size(937, 417);
|
dataGridView.RowTemplate.Height = 29;
|
||||||
dataGridView.TabIndex = 0;
|
dataGridView.Size = new Size(937, 417);
|
||||||
//
|
dataGridView.TabIndex = 0;
|
||||||
// buttonCreateTrucking
|
//
|
||||||
//
|
// buttonCreateTrucking
|
||||||
buttonCreateTrucking.Location = new Point(1014, 67);
|
//
|
||||||
buttonCreateTrucking.Name = "buttonCreateTrucking";
|
buttonCreateTrucking.Location = new Point(1014, 67);
|
||||||
buttonCreateTrucking.Size = new Size(235, 29);
|
buttonCreateTrucking.Name = "buttonCreateTrucking";
|
||||||
buttonCreateTrucking.TabIndex = 1;
|
buttonCreateTrucking.Size = new Size(235, 29);
|
||||||
buttonCreateTrucking.Text = "Создать перевозку";
|
buttonCreateTrucking.TabIndex = 1;
|
||||||
buttonCreateTrucking.UseVisualStyleBackColor = true;
|
buttonCreateTrucking.Text = "Создать перевозку";
|
||||||
buttonCreateTrucking.Click += ButtonCreateTrucking_Click;
|
buttonCreateTrucking.UseVisualStyleBackColor = true;
|
||||||
//
|
buttonCreateTrucking.Click += ButtonCreateTrucking_Click;
|
||||||
// menuStrip
|
//
|
||||||
//
|
// menuStrip
|
||||||
menuStrip.ImageScalingSize = new Size(20, 20);
|
//
|
||||||
menuStrip.Items.AddRange(new ToolStripItem[] { toolStripMenuItem, rndGenerationToolStripMenuItem, testTimeGetDataToolStripMenuItem, testComplexQueriesToolStripMenuItem });
|
menuStrip.ImageScalingSize = new Size(20, 20);
|
||||||
menuStrip.Location = new Point(0, 0);
|
menuStrip.Items.AddRange(new ToolStripItem[] { toolStripMenuItem, rndGenerationToolStripMenuItem, testTimeGetDataToolStripMenuItem, testComplexQueriesToolStripMenuItem, createJsonFilesToolStripMenuItem });
|
||||||
menuStrip.Name = "menuStrip";
|
menuStrip.Location = new Point(0, 0);
|
||||||
menuStrip.Padding = new Padding(6, 3, 0, 3);
|
menuStrip.Name = "menuStrip";
|
||||||
menuStrip.Size = new Size(1297, 30);
|
menuStrip.Padding = new Padding(6, 3, 0, 3);
|
||||||
menuStrip.TabIndex = 6;
|
menuStrip.Size = new Size(1297, 30);
|
||||||
menuStrip.Text = "menuStrip1";
|
menuStrip.TabIndex = 6;
|
||||||
//
|
menuStrip.Text = "menuStrip1";
|
||||||
// toolStripMenuItem
|
//
|
||||||
//
|
// toolStripMenuItem
|
||||||
toolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { transportToolStripMenuItem, typeTransportationToolStripMenuItem, cargoToolStripMenuItem, clientToolStripMenuItem });
|
//
|
||||||
toolStripMenuItem.Name = "toolStripMenuItem";
|
toolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { transportToolStripMenuItem, typeTransportationToolStripMenuItem, cargoToolStripMenuItem, clientToolStripMenuItem });
|
||||||
toolStripMenuItem.Size = new Size(117, 24);
|
toolStripMenuItem.Name = "toolStripMenuItem";
|
||||||
toolStripMenuItem.Text = "Справочники";
|
toolStripMenuItem.Size = new Size(117, 24);
|
||||||
//
|
toolStripMenuItem.Text = "Справочники";
|
||||||
// transportToolStripMenuItem
|
//
|
||||||
//
|
// transportToolStripMenuItem
|
||||||
transportToolStripMenuItem.Name = "transportToolStripMenuItem";
|
//
|
||||||
transportToolStripMenuItem.Size = new Size(245, 26);
|
transportToolStripMenuItem.Name = "transportToolStripMenuItem";
|
||||||
transportToolStripMenuItem.Text = "Транспорт";
|
transportToolStripMenuItem.Size = new Size(245, 26);
|
||||||
transportToolStripMenuItem.Click += TransportToolStripMenuItem_Click;
|
transportToolStripMenuItem.Text = "Транспорт";
|
||||||
//
|
transportToolStripMenuItem.Click += TransportToolStripMenuItem_Click;
|
||||||
// typeTransportationToolStripMenuItem
|
//
|
||||||
//
|
// typeTransportationToolStripMenuItem
|
||||||
typeTransportationToolStripMenuItem.Name = "typeTransportationToolStripMenuItem";
|
//
|
||||||
typeTransportationToolStripMenuItem.Size = new Size(245, 26);
|
typeTransportationToolStripMenuItem.Name = "typeTransportationToolStripMenuItem";
|
||||||
typeTransportationToolStripMenuItem.Text = "Тип транспортировки";
|
typeTransportationToolStripMenuItem.Size = new Size(245, 26);
|
||||||
typeTransportationToolStripMenuItem.Click += TypeTransportationToolStripMenuItem_Click;
|
typeTransportationToolStripMenuItem.Text = "Тип транспортировки";
|
||||||
//
|
typeTransportationToolStripMenuItem.Click += TypeTransportationToolStripMenuItem_Click;
|
||||||
// cargoToolStripMenuItem
|
//
|
||||||
//
|
// cargoToolStripMenuItem
|
||||||
cargoToolStripMenuItem.Name = "cargoToolStripMenuItem";
|
//
|
||||||
cargoToolStripMenuItem.Size = new Size(245, 26);
|
cargoToolStripMenuItem.Name = "cargoToolStripMenuItem";
|
||||||
cargoToolStripMenuItem.Text = "Груз";
|
cargoToolStripMenuItem.Size = new Size(245, 26);
|
||||||
cargoToolStripMenuItem.Click += CargoToolStripMenuItem_Click;
|
cargoToolStripMenuItem.Text = "Груз";
|
||||||
//
|
cargoToolStripMenuItem.Click += CargoToolStripMenuItem_Click;
|
||||||
// clientToolStripMenuItem
|
//
|
||||||
//
|
// clientToolStripMenuItem
|
||||||
clientToolStripMenuItem.Name = "clientToolStripMenuItem";
|
//
|
||||||
clientToolStripMenuItem.Size = new Size(245, 26);
|
clientToolStripMenuItem.Name = "clientToolStripMenuItem";
|
||||||
clientToolStripMenuItem.Text = "Клиенты";
|
clientToolStripMenuItem.Size = new Size(245, 26);
|
||||||
clientToolStripMenuItem.Click += ClientToolStripMenuItem_Click;
|
clientToolStripMenuItem.Text = "Клиенты";
|
||||||
//
|
clientToolStripMenuItem.Click += ClientToolStripMenuItem_Click;
|
||||||
// rndGenerationToolStripMenuItem
|
//
|
||||||
//
|
// rndGenerationToolStripMenuItem
|
||||||
rndGenerationToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { generationClientsToolStripMenuItem, generationTruckingsToolStripMenuItem });
|
//
|
||||||
rndGenerationToolStripMenuItem.Name = "rndGenerationToolStripMenuItem";
|
rndGenerationToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { generationClientsToolStripMenuItem, generationTruckingsToolStripMenuItem });
|
||||||
rndGenerationToolStripMenuItem.Size = new Size(179, 24);
|
rndGenerationToolStripMenuItem.Name = "rndGenerationToolStripMenuItem";
|
||||||
rndGenerationToolStripMenuItem.Text = "Рандомная генерация";
|
rndGenerationToolStripMenuItem.Size = new Size(179, 24);
|
||||||
//
|
rndGenerationToolStripMenuItem.Text = "Рандомная генерация";
|
||||||
// generationClientsToolStripMenuItem
|
//
|
||||||
//
|
// generationClientsToolStripMenuItem
|
||||||
generationClientsToolStripMenuItem.Name = "generationClientsToolStripMenuItem";
|
//
|
||||||
generationClientsToolStripMenuItem.Size = new Size(245, 26);
|
generationClientsToolStripMenuItem.Name = "generationClientsToolStripMenuItem";
|
||||||
generationClientsToolStripMenuItem.Text = "Генерация клиентов";
|
generationClientsToolStripMenuItem.Size = new Size(245, 26);
|
||||||
generationClientsToolStripMenuItem.Click += GenerationClientsToolStripMenuItem_Click;
|
generationClientsToolStripMenuItem.Text = "Генерация клиентов";
|
||||||
//
|
generationClientsToolStripMenuItem.Click += GenerationClientsToolStripMenuItem_Click;
|
||||||
// generationTruckingsToolStripMenuItem
|
//
|
||||||
//
|
// generationTruckingsToolStripMenuItem
|
||||||
generationTruckingsToolStripMenuItem.Name = "generationTruckingsToolStripMenuItem";
|
//
|
||||||
generationTruckingsToolStripMenuItem.Size = new Size(245, 26);
|
generationTruckingsToolStripMenuItem.Name = "generationTruckingsToolStripMenuItem";
|
||||||
generationTruckingsToolStripMenuItem.Text = "Генерация перевозок";
|
generationTruckingsToolStripMenuItem.Size = new Size(245, 26);
|
||||||
generationTruckingsToolStripMenuItem.Click += GenerationTruckingsToolStripMenuItem_Click;
|
generationTruckingsToolStripMenuItem.Text = "Генерация перевозок";
|
||||||
//
|
generationTruckingsToolStripMenuItem.Click += GenerationTruckingsToolStripMenuItem_Click;
|
||||||
// testTimeGetDataToolStripMenuItem
|
//
|
||||||
//
|
// testTimeGetDataToolStripMenuItem
|
||||||
testTimeGetDataToolStripMenuItem.Name = "testTimeGetDataToolStripMenuItem";
|
//
|
||||||
testTimeGetDataToolStripMenuItem.Size = new Size(227, 24);
|
testTimeGetDataToolStripMenuItem.Name = "testTimeGetDataToolStripMenuItem";
|
||||||
testTimeGetDataToolStripMenuItem.Text = "Тест скорости чтения данных";
|
testTimeGetDataToolStripMenuItem.Size = new Size(227, 24);
|
||||||
testTimeGetDataToolStripMenuItem.Click += TestTimeGetDataToolStripMenuItem_Click;
|
testTimeGetDataToolStripMenuItem.Text = "Тест скорости чтения данных";
|
||||||
//
|
testTimeGetDataToolStripMenuItem.Click += TestTimeGetDataToolStripMenuItem_Click;
|
||||||
// buttonUpdate
|
//
|
||||||
//
|
// testComplexQueriesToolStripMenuItem
|
||||||
buttonUpdate.Location = new Point(1014, 138);
|
//
|
||||||
buttonUpdate.Name = "buttonUpdate";
|
testComplexQueriesToolStripMenuItem.Name = "testComplexQueriesToolStripMenuItem";
|
||||||
buttonUpdate.Size = new Size(235, 29);
|
testComplexQueriesToolStripMenuItem.Size = new Size(188, 24);
|
||||||
buttonUpdate.TabIndex = 7;
|
testComplexQueriesToolStripMenuItem.Text = "Тест сложных запросов";
|
||||||
buttonUpdate.Text = "Обновить";
|
testComplexQueriesToolStripMenuItem.Click += TestComplexQueriesToolStripMenuItem_Click;
|
||||||
buttonUpdate.UseVisualStyleBackColor = true;
|
//
|
||||||
buttonUpdate.Click += ButtonUpdate_Click;
|
// buttonUpdate
|
||||||
//
|
//
|
||||||
// comboBoxEmails
|
buttonUpdate.Location = new Point(1014, 138);
|
||||||
//
|
buttonUpdate.Name = "buttonUpdate";
|
||||||
comboBoxEmails.FormattingEnabled = true;
|
buttonUpdate.Size = new Size(235, 29);
|
||||||
comboBoxEmails.Location = new Point(142, 33);
|
buttonUpdate.TabIndex = 7;
|
||||||
comboBoxEmails.Name = "comboBoxEmails";
|
buttonUpdate.Text = "Обновить";
|
||||||
comboBoxEmails.Size = new Size(208, 28);
|
buttonUpdate.UseVisualStyleBackColor = true;
|
||||||
comboBoxEmails.TabIndex = 8;
|
buttonUpdate.Click += ButtonUpdate_Click;
|
||||||
comboBoxEmails.SelectedIndexChanged += ComboBoxEmails_SelectedIndexChanged;
|
//
|
||||||
//
|
// comboBoxEmails
|
||||||
// label1
|
//
|
||||||
//
|
comboBoxEmails.FormattingEnabled = true;
|
||||||
label1.AutoSize = true;
|
comboBoxEmails.Location = new Point(142, 33);
|
||||||
label1.Location = new Point(12, 36);
|
comboBoxEmails.Name = "comboBoxEmails";
|
||||||
label1.Name = "label1";
|
comboBoxEmails.Size = new Size(208, 28);
|
||||||
label1.Size = new Size(124, 20);
|
comboBoxEmails.TabIndex = 8;
|
||||||
label1.TabIndex = 9;
|
comboBoxEmails.SelectedIndexChanged += ComboBoxEmails_SelectedIndexChanged;
|
||||||
label1.Text = "Выберите почту:";
|
//
|
||||||
//
|
// label1
|
||||||
// checkBoxSorted
|
//
|
||||||
//
|
label1.AutoSize = true;
|
||||||
checkBoxSorted.AutoSize = true;
|
label1.Location = new Point(12, 36);
|
||||||
checkBoxSorted.Location = new Point(632, 35);
|
label1.Name = "label1";
|
||||||
checkBoxSorted.Name = "checkBoxSorted";
|
label1.Size = new Size(124, 20);
|
||||||
checkBoxSorted.Size = new Size(316, 24);
|
label1.TabIndex = 9;
|
||||||
checkBoxSorted.TabIndex = 10;
|
label1.Text = "Выберите почту:";
|
||||||
checkBoxSorted.Text = "Сортировать по возрастанию стоимости";
|
//
|
||||||
checkBoxSorted.UseVisualStyleBackColor = true;
|
// checkBoxSorted
|
||||||
checkBoxSorted.CheckedChanged += CheckBoxSorted_CheckedChanged;
|
//
|
||||||
//
|
checkBoxSorted.AutoSize = true;
|
||||||
// checkBoxForFilterMode
|
checkBoxSorted.Location = new Point(632, 35);
|
||||||
//
|
checkBoxSorted.Name = "checkBoxSorted";
|
||||||
checkBoxForFilterMode.AutoSize = true;
|
checkBoxSorted.Size = new Size(316, 24);
|
||||||
checkBoxForFilterMode.Location = new Point(370, 35);
|
checkBoxSorted.TabIndex = 10;
|
||||||
checkBoxForFilterMode.Name = "checkBoxForFilterMode";
|
checkBoxSorted.Text = "Сортировать по возрастанию стоимости";
|
||||||
checkBoxForFilterMode.Size = new Size(212, 24);
|
checkBoxSorted.UseVisualStyleBackColor = true;
|
||||||
checkBoxForFilterMode.TabIndex = 11;
|
checkBoxSorted.CheckedChanged += CheckBoxSorted_CheckedChanged;
|
||||||
checkBoxForFilterMode.Text = "Включить режим фильтра";
|
//
|
||||||
checkBoxForFilterMode.UseVisualStyleBackColor = true;
|
// checkBoxForFilterMode
|
||||||
//
|
//
|
||||||
// testComplexQueriesToolStripMenuItem
|
checkBoxForFilterMode.AutoSize = true;
|
||||||
//
|
checkBoxForFilterMode.Location = new Point(370, 35);
|
||||||
testComplexQueriesToolStripMenuItem.Name = "testComplexQueriesToolStripMenuItem";
|
checkBoxForFilterMode.Name = "checkBoxForFilterMode";
|
||||||
testComplexQueriesToolStripMenuItem.Size = new Size(188, 24);
|
checkBoxForFilterMode.Size = new Size(212, 24);
|
||||||
testComplexQueriesToolStripMenuItem.Text = "Тест сложных запросов";
|
checkBoxForFilterMode.TabIndex = 11;
|
||||||
testComplexQueriesToolStripMenuItem.Click += TestComplexQueriesToolStripMenuItem_Click;
|
checkBoxForFilterMode.Text = "Включить режим фильтра";
|
||||||
//
|
checkBoxForFilterMode.UseVisualStyleBackColor = true;
|
||||||
// FormTrucking
|
//
|
||||||
//
|
// createJsonFilesToolStripMenuItem
|
||||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
//
|
||||||
AutoScaleMode = AutoScaleMode.Font;
|
createJsonFilesToolStripMenuItem.Name = "createJsonFilesToolStripMenuItem";
|
||||||
ClientSize = new Size(1297, 496);
|
createJsonFilesToolStripMenuItem.Size = new Size(209, 24);
|
||||||
Controls.Add(checkBoxForFilterMode);
|
createJsonFilesToolStripMenuItem.Text = "Сформировать json файлы";
|
||||||
Controls.Add(checkBoxSorted);
|
createJsonFilesToolStripMenuItem.Click += CreateJsonFilesToolStripMenuItem_Click;
|
||||||
Controls.Add(label1);
|
//
|
||||||
Controls.Add(comboBoxEmails);
|
// FormTrucking
|
||||||
Controls.Add(buttonUpdate);
|
//
|
||||||
Controls.Add(buttonCreateTrucking);
|
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||||
Controls.Add(dataGridView);
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
Controls.Add(menuStrip);
|
ClientSize = new Size(1297, 496);
|
||||||
MainMenuStrip = menuStrip;
|
Controls.Add(checkBoxForFilterMode);
|
||||||
Name = "FormTrucking";
|
Controls.Add(checkBoxSorted);
|
||||||
Text = "Перевозки";
|
Controls.Add(label1);
|
||||||
Load += FormMain_Load;
|
Controls.Add(comboBoxEmails);
|
||||||
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
|
Controls.Add(buttonUpdate);
|
||||||
menuStrip.ResumeLayout(false);
|
Controls.Add(buttonCreateTrucking);
|
||||||
menuStrip.PerformLayout();
|
Controls.Add(dataGridView);
|
||||||
ResumeLayout(false);
|
Controls.Add(menuStrip);
|
||||||
PerformLayout();
|
MainMenuStrip = menuStrip;
|
||||||
}
|
Name = "FormTrucking";
|
||||||
|
Text = "Перевозки";
|
||||||
|
Load += FormMain_Load;
|
||||||
|
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
|
||||||
|
menuStrip.ResumeLayout(false);
|
||||||
|
menuStrip.PerformLayout();
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private DataGridView dataGridView;
|
private DataGridView dataGridView;
|
||||||
private Button buttonCreateTrucking;
|
private Button buttonCreateTrucking;
|
||||||
private Button buttonTakeOrderInWork;
|
private Button buttonTakeOrderInWork;
|
||||||
private Button buttonOrderReady;
|
private Button buttonOrderReady;
|
||||||
private Button buttonIssuedOrder;
|
private Button buttonIssuedOrder;
|
||||||
private Button buttonRef;
|
private Button buttonRef;
|
||||||
private MenuStrip menuStrip;
|
private MenuStrip menuStrip;
|
||||||
private ToolStripMenuItem toolStripMenuItem;
|
private ToolStripMenuItem toolStripMenuItem;
|
||||||
private ToolStripMenuItem transportToolStripMenuItem;
|
private ToolStripMenuItem transportToolStripMenuItem;
|
||||||
private ToolStripMenuItem workPieceToolStripMenuItem;
|
private ToolStripMenuItem workPieceToolStripMenuItem;
|
||||||
private ToolStripMenuItem typeTransportationToolStripMenuItem;
|
private ToolStripMenuItem typeTransportationToolStripMenuItem;
|
||||||
private ToolStripMenuItem cargoToolStripMenuItem;
|
private ToolStripMenuItem cargoToolStripMenuItem;
|
||||||
private ToolStripMenuItem clientToolStripMenuItem;
|
private ToolStripMenuItem clientToolStripMenuItem;
|
||||||
private ToolStripMenuItem shopToolStripMenuItem;
|
private ToolStripMenuItem shopToolStripMenuItem;
|
||||||
private ToolStripMenuItem addManufactureToolStripMenuItem;
|
private ToolStripMenuItem addManufactureToolStripMenuItem;
|
||||||
private Button buttonSellManufacture;
|
private Button buttonSellManufacture;
|
||||||
private ToolStripMenuItem reportToolStripMenuItem;
|
private ToolStripMenuItem reportToolStripMenuItem;
|
||||||
private ToolStripMenuItem groupedOrdersReportToolStripMenuItem;
|
private ToolStripMenuItem groupedOrdersReportToolStripMenuItem;
|
||||||
private ToolStripMenuItem ordersReportToolStripMenuItem;
|
private ToolStripMenuItem ordersReportToolStripMenuItem;
|
||||||
private ToolStripMenuItem manufactureWorkPiecesReportToolStripMenuItem;
|
private ToolStripMenuItem manufactureWorkPiecesReportToolStripMenuItem;
|
||||||
private ToolStripMenuItem shopsReportToolStripMenuItem;
|
private ToolStripMenuItem shopsReportToolStripMenuItem;
|
||||||
private ToolStripMenuItem rndGenerationToolStripMenuItem;
|
private ToolStripMenuItem rndGenerationToolStripMenuItem;
|
||||||
private ToolStripMenuItem generationClientsToolStripMenuItem;
|
private ToolStripMenuItem generationClientsToolStripMenuItem;
|
||||||
private ToolStripMenuItem generationTruckingsToolStripMenuItem;
|
private ToolStripMenuItem generationTruckingsToolStripMenuItem;
|
||||||
private Button buttonUpdate;
|
private Button buttonUpdate;
|
||||||
private ComboBox comboBoxEmails;
|
private ComboBox comboBoxEmails;
|
||||||
private Label label1;
|
private Label label1;
|
||||||
private CheckBox checkBoxSorted;
|
private CheckBox checkBoxSorted;
|
||||||
private CheckBox checkBoxForFilterMode;
|
private CheckBox checkBoxForFilterMode;
|
||||||
private ToolStripMenuItem testTimeGetDataToolStripMenuItem;
|
private ToolStripMenuItem testTimeGetDataToolStripMenuItem;
|
||||||
private ToolStripMenuItem testComplexQueriesToolStripMenuItem;
|
private ToolStripMenuItem testComplexQueriesToolStripMenuItem;
|
||||||
}
|
private ToolStripMenuItem createJsonFilesToolStripMenuItem;
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,6 +1,8 @@
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.Json;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using TransportCompanyContracts.BusinessLogicsContracts;
|
using TransportCompanyContracts.BusinessLogicsContracts;
|
||||||
using TransportCompanyContracts.SearchModels;
|
using TransportCompanyContracts.SearchModels;
|
||||||
@ -8,184 +10,222 @@ using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
|||||||
|
|
||||||
namespace TransportCompany
|
namespace TransportCompany
|
||||||
{
|
{
|
||||||
public partial class FormTrucking : Form
|
public partial class FormTrucking : Form
|
||||||
{
|
{
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
|
|
||||||
private readonly ITruckingLogic _truckingLogic;
|
private readonly ITruckingLogic _truckingLogic;
|
||||||
|
|
||||||
private readonly IClientLogic _clientLogic;
|
private readonly IClientLogic _clientLogic;
|
||||||
|
|
||||||
public FormTrucking(ILogger<FormTrucking> logger, ITruckingLogic truckingLogic, IClientLogic clientLogic)
|
private readonly ICargoLogic _cargoLogic;
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
|
|
||||||
_logger = logger;
|
private readonly ITransportLogic _transportLogic;
|
||||||
_truckingLogic = truckingLogic;
|
|
||||||
_clientLogic = clientLogic;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FormMain_Load(object sender, EventArgs e)
|
private readonly ITransportationLogic _transportationLogic;
|
||||||
{
|
|
||||||
LoadData();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void LoadData()
|
public FormTrucking(ILogger<FormTrucking> logger, ITruckingLogic truckingLogic, IClientLogic clientLogic,
|
||||||
{
|
ICargoLogic cargoLogic, ITransportLogic transportLogic, ITransportationLogic transportationLogic)
|
||||||
_logger.LogInformation("Çàãðóçêà ïåðåâîçîê");
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
try
|
_logger = logger;
|
||||||
{
|
_truckingLogic = truckingLogic;
|
||||||
var list = _truckingLogic.ReadList(null);
|
_clientLogic = clientLogic;
|
||||||
|
_cargoLogic = cargoLogic;
|
||||||
|
_transportLogic = transportLogic;
|
||||||
|
_transportationLogic = transportationLogic;
|
||||||
|
}
|
||||||
|
|
||||||
var listClients = _clientLogic.ReadList(null);
|
private void FormMain_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
LoadData();
|
||||||
|
}
|
||||||
|
|
||||||
if (list != null)
|
private void LoadData()
|
||||||
{
|
{
|
||||||
dataGridView.DataSource = list;
|
_logger.LogInformation("Çàãðóçêà ïåðåâîçîê");
|
||||||
dataGridView.Columns["ClientId"].Visible = false;
|
|
||||||
dataGridView.Columns["CargoId"].Visible = false;
|
|
||||||
dataGridView.Columns["TransportId"].Visible = false;
|
|
||||||
dataGridView.Columns["TransportationId"].Visible = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (listClients != null)
|
try
|
||||||
{
|
{
|
||||||
comboBoxEmails.DisplayMember = "Email";
|
var list = _truckingLogic.ReadList(null);
|
||||||
comboBoxEmails.ValueMember = "Id";
|
|
||||||
comboBoxEmails.DataSource = listClients;
|
|
||||||
comboBoxEmails.SelectedItem = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
_logger.LogInformation("Çàãðóçêà ïåðåâîçîê");
|
var listClients = _clientLogic.ReadList(null);
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Îøèáêà çàãðóçêè ïåðåâîçîê");
|
|
||||||
MessageBox.Show(ex.Message, "Îøèáêà", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ButtonCreateTrucking_Click(object sender, EventArgs e)
|
if (list != null)
|
||||||
{
|
{
|
||||||
var service = Program.ServiceProvider?.GetService(typeof(FormCreateTrucking));
|
dataGridView.DataSource = list;
|
||||||
|
dataGridView.Columns["ClientId"].Visible = false;
|
||||||
|
dataGridView.Columns["CargoId"].Visible = false;
|
||||||
|
dataGridView.Columns["TransportId"].Visible = false;
|
||||||
|
dataGridView.Columns["TransportationId"].Visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (service is FormCreateTrucking form)
|
if (listClients != null)
|
||||||
{
|
{
|
||||||
form.ShowDialog();
|
comboBoxEmails.DisplayMember = "Email";
|
||||||
LoadData();
|
comboBoxEmails.ValueMember = "Id";
|
||||||
}
|
comboBoxEmails.DataSource = listClients;
|
||||||
}
|
comboBoxEmails.SelectedItem = null;
|
||||||
|
}
|
||||||
|
|
||||||
private void TransportToolStripMenuItem_Click(object sender, EventArgs e)
|
_logger.LogInformation("Çàãðóçêà ïåðåâîçîê");
|
||||||
{
|
}
|
||||||
var service = Program.ServiceProvider?.GetService(typeof(FormTransport));
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Îøèáêà çàãðóçêè ïåðåâîçîê");
|
||||||
|
MessageBox.Show(ex.Message, "Îøèáêà", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (service is FormTransport form)
|
private void ButtonCreateTrucking_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
form.ShowDialog();
|
var service = Program.ServiceProvider?.GetService(typeof(FormCreateTrucking));
|
||||||
LoadData();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CargoToolStripMenuItem_Click(object sender, EventArgs e)
|
if (service is FormCreateTrucking form)
|
||||||
{
|
{
|
||||||
var service = Program.ServiceProvider?.GetService(typeof(FormCargo));
|
form.ShowDialog();
|
||||||
|
LoadData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (service is FormCargo form)
|
private void TransportToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
form.ShowDialog();
|
var service = Program.ServiceProvider?.GetService(typeof(FormTransport));
|
||||||
LoadData();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ClientToolStripMenuItem_Click(object sender, EventArgs e)
|
if (service is FormTransport form)
|
||||||
{
|
{
|
||||||
var service = Program.ServiceProvider?.GetService(typeof(FormClients));
|
form.ShowDialog();
|
||||||
|
LoadData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (service is FormClients form)
|
private void CargoToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
form.ShowDialog();
|
var service = Program.ServiceProvider?.GetService(typeof(FormCargo));
|
||||||
LoadData();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void TypeTransportationToolStripMenuItem_Click(object sender, EventArgs e)
|
if (service is FormCargo form)
|
||||||
{
|
{
|
||||||
var service = Program.ServiceProvider?.GetService(typeof(FormTypeTransportation));
|
form.ShowDialog();
|
||||||
|
LoadData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (service is FormTypeTransportation form)
|
private void ClientToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
form.ShowDialog();
|
var service = Program.ServiceProvider?.GetService(typeof(FormClients));
|
||||||
LoadData();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void GenerationClientsToolStripMenuItem_Click(object sender, EventArgs e)
|
if (service is FormClients form)
|
||||||
{
|
{
|
||||||
var service = Program.ServiceProvider?.GetService(typeof(FormRandomCreateClient));
|
form.ShowDialog();
|
||||||
|
LoadData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (service is FormRandomCreateClient form)
|
private void TypeTransportationToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
form.ShowDialog();
|
var service = Program.ServiceProvider?.GetService(typeof(FormTypeTransportation));
|
||||||
LoadData();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void GenerationTruckingsToolStripMenuItem_Click(object sender, EventArgs e)
|
if (service is FormTypeTransportation form)
|
||||||
{
|
{
|
||||||
var service = Program.ServiceProvider?.GetService(typeof(FormRandomCreateTrucking));
|
form.ShowDialog();
|
||||||
|
LoadData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (service is FormRandomCreateTrucking form)
|
private void GenerationClientsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
form.ShowDialog();
|
var service = Program.ServiceProvider?.GetService(typeof(FormRandomCreateClient));
|
||||||
LoadData();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ButtonUpdate_Click(object sender, EventArgs e)
|
if (service is FormRandomCreateClient form)
|
||||||
{
|
{
|
||||||
LoadData();
|
form.ShowDialog();
|
||||||
}
|
LoadData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void ComboBoxEmails_SelectedIndexChanged(object sender, EventArgs e)
|
private void GenerationTruckingsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!checkBoxForFilterMode.Checked)
|
var service = Program.ServiceProvider?.GetService(typeof(FormRandomCreateTrucking));
|
||||||
{
|
|
||||||
//dataGridView.DataSource = _truckingLogic.ReadList(null);
|
|
||||||
LoadData();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dataGridView.DataSource = _truckingLogic.ReadList(null).Where(x => x.ClientId == comboBoxEmails.SelectedIndex).ToList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CheckBoxSorted_CheckedChanged(object sender, EventArgs e)
|
if (service is FormRandomCreateTrucking form)
|
||||||
{
|
{
|
||||||
dataGridView.DataSource = _truckingLogic.ReadList(null).OrderByDescending(x => x.Price).ToList();
|
form.ShowDialog();
|
||||||
}
|
LoadData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void TestTimeGetDataToolStripMenuItem_Click(object sender, EventArgs e)
|
private void ButtonUpdate_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var service = Program.ServiceProvider?.GetService(typeof(FormTimeCheck));
|
LoadData();
|
||||||
|
}
|
||||||
|
|
||||||
if (service is FormTimeCheck form)
|
private void ComboBoxEmails_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
form.ShowDialog();
|
if (!checkBoxForFilterMode.Checked)
|
||||||
LoadData();
|
{
|
||||||
}
|
//dataGridView.DataSource = _truckingLogic.ReadList(null);
|
||||||
}
|
LoadData();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dataGridView.DataSource = _truckingLogic.ReadList(null).Where(x => x.ClientId == comboBoxEmails.SelectedIndex).ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void TestComplexQueriesToolStripMenuItem_Click(object sender, EventArgs e)
|
private void CheckBoxSorted_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var service = Program.ServiceProvider?.GetService(typeof(FormCheckTimeJoin));
|
dataGridView.DataSource = _truckingLogic.ReadList(null).OrderByDescending(x => x.Price).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
if (service is FormCheckTimeJoin form)
|
private void TestTimeGetDataToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
form.ShowDialog();
|
var service = Program.ServiceProvider?.GetService(typeof(FormTimeCheck));
|
||||||
LoadData();
|
|
||||||
}
|
if (service is FormTimeCheck form)
|
||||||
}
|
{
|
||||||
}
|
form.ShowDialog();
|
||||||
|
LoadData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TestComplexQueriesToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var service = Program.ServiceProvider?.GetService(typeof(FormCheckTimeJoin));
|
||||||
|
|
||||||
|
if (service is FormCheckTimeJoin form)
|
||||||
|
{
|
||||||
|
form.ShowDialog();
|
||||||
|
LoadData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CreateJsonFilesToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var listTrucking = _truckingLogic.ReadList(null);
|
||||||
|
var listClients = _clientLogic.ReadList(null);
|
||||||
|
var listCargos = _cargoLogic.ReadList(null);
|
||||||
|
var listTransport = _transportLogic.ReadList(null);
|
||||||
|
var listTransportation = _transportationLogic.ReadList(null);
|
||||||
|
|
||||||
|
string jsonList = JsonSerializer.Serialize(listClients).ToString();
|
||||||
|
|
||||||
|
string path = @"C:\Users\Programmist73\Desktop\JSON\"; // ïóòü ê ôàéëó
|
||||||
|
|
||||||
|
string realPath;
|
||||||
|
|
||||||
|
for(int i = 0; i < listClients.Count; i++)
|
||||||
|
{
|
||||||
|
realPath = path + "json" + i.ToString() + ".json";
|
||||||
|
|
||||||
|
File.Create(realPath).Close();
|
||||||
|
|
||||||
|
StreamWriter writetext = new StreamWriter(realPath);
|
||||||
|
|
||||||
|
writetext.WriteLine("{\n\t" + "\"client\" : " + "{\n\t" + "\t\"Name\" : " + "\"" + listClients[i].Name + "\"" + "\n\t}\n}");
|
||||||
|
|
||||||
|
writetext.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -22,6 +22,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\TransportCompamyMongoDBImplementer\TransportCompamyMongoDBImplementer.csproj" />
|
||||||
<ProjectReference Include="..\TransportCompanyBusinessLogic\TransportCompanyBusinessLogic.csproj" />
|
<ProjectReference Include="..\TransportCompanyBusinessLogic\TransportCompanyBusinessLogic.csproj" />
|
||||||
<ProjectReference Include="..\TransportCompanyContracts\TransportCompanyContracts.csproj" />
|
<ProjectReference Include="..\TransportCompanyContracts\TransportCompanyContracts.csproj" />
|
||||||
<ProjectReference Include="..\TransportCompanyDatabaseImplements\TransportCompanyDatabaseImplements.csproj" />
|
<ProjectReference Include="..\TransportCompanyDatabaseImplements\TransportCompanyDatabaseImplements.csproj" />
|
||||||
|
@ -3,6 +3,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Text.Json;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using TransportCompanyContracts.BindingModels;
|
using TransportCompanyContracts.BindingModels;
|
||||||
using TransportCompanyContracts.BusinessLogicsContracts;
|
using TransportCompanyContracts.BusinessLogicsContracts;
|
||||||
|
@ -154,6 +154,7 @@ public partial class ElegevContext : DbContext
|
|||||||
.HasMaxLength(255)
|
.HasMaxLength(255)
|
||||||
.HasColumnName("transportation_type");
|
.HasColumnName("transportation_type");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.HasSequence("seq_cargo");
|
modelBuilder.HasSequence("seq_cargo");
|
||||||
modelBuilder.HasSequence("seq_client");
|
modelBuilder.HasSequence("seq_client");
|
||||||
modelBuilder.HasSequence("seq_trucking");
|
modelBuilder.HasSequence("seq_trucking");
|
||||||
|
Loading…
Reference in New Issue
Block a user