some errors fixed
This commit is contained in:
parent
68f3837e64
commit
fa05cb1b6d
@ -43,10 +43,10 @@ namespace AbstractSoftwareInstallationBusinessLogic.BusinessLogic
|
||||
Softwares = new List<(string Blank, int Count)>(),
|
||||
TotalCount = 0
|
||||
};
|
||||
foreach (var blank in doc.PackageSoftware.Values)
|
||||
foreach (var software in doc.PackageSoftware.Values)
|
||||
{
|
||||
record.Softwares.Add((blank.Item1.SoftwareName, blank.Item2));
|
||||
record.TotalCount += blank.Item2;
|
||||
record.Softwares.Add((software.Item1.SoftwareName, software.Item2));
|
||||
record.TotalCount += software.Item2;
|
||||
|
||||
}
|
||||
list.Add(record);
|
||||
|
@ -38,8 +38,13 @@ namespace SoftwareInstallationView
|
||||
this.buttonRef = new System.Windows.Forms.Button();
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.guideToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.reportsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.packageToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.storageToolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.packagesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.ordersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.packageSoftwaresToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
@ -107,12 +112,13 @@ namespace SoftwareInstallationView
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.guideToolStripMenuItem});
|
||||
this.guideToolStripMenuItem, this.reportsToolStripMenuItem});
|
||||
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(803, 24);
|
||||
this.menuStrip1.TabIndex = 1;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
this.menuStrip1.Text = "Справочники";
|
||||
//
|
||||
// guideToolStripMenuItem
|
||||
//
|
||||
@ -125,34 +131,34 @@ namespace SoftwareInstallationView
|
||||
//
|
||||
// reportsToolStripMenuItem
|
||||
//
|
||||
//this.reportsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
//this.packagesToolStripMenuItem,
|
||||
//this.packageSoftwaresToolStripMenuItem,
|
||||
//this.ordersToolStripMenuItem});
|
||||
//this.reportsToolStripMenuItem.Name = "reportsToolStripMenuItem";
|
||||
//this.reportsToolStripMenuItem.Size = new System.Drawing.Size(73, 24);
|
||||
//this.reportsToolStripMenuItem.Text = "Отчеты";
|
||||
this.reportsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.packagesToolStripMenuItem,
|
||||
this.packageSoftwaresToolStripMenuItem,
|
||||
this.ordersToolStripMenuItem});
|
||||
this.reportsToolStripMenuItem.Name = "reportsToolStripMenuItem";
|
||||
this.reportsToolStripMenuItem.Size = new System.Drawing.Size(73, 24);
|
||||
this.reportsToolStripMenuItem.Text = "Отчеты";
|
||||
//
|
||||
// packagesToolStripMenuItem
|
||||
//
|
||||
//this.packagesToolStripMenuItem.Name = "packagesToolStripMenuItem";
|
||||
//this.packagesToolStripMenuItem.Size = new System.Drawing.Size(252, 26);
|
||||
//this.packagesToolStripMenuItem.Text = "Список пакетов";
|
||||
//this.packagesToolStripMenuItem.Click += new System.EventHandler(this.packagesToolStripMenuItem_Click);
|
||||
this.packagesToolStripMenuItem.Name = "packagesToolStripMenuItem";
|
||||
this.packagesToolStripMenuItem.Size = new System.Drawing.Size(252, 26);
|
||||
this.packagesToolStripMenuItem.Text = "Список пакетов";
|
||||
this.packagesToolStripMenuItem.Click += new System.EventHandler(this.packagesToolStripMenuItem_Click);
|
||||
//
|
||||
// packageSoftwaresToolStripMenuItem
|
||||
//
|
||||
//this.packageSoftwaresToolStripMenuItem.Name = "packageSoftwaresToolStripMenuItem";
|
||||
//this.packageSoftwaresToolStripMenuItem.Size = new System.Drawing.Size(252, 26);
|
||||
//this.packageSoftwaresToolStripMenuItem.Text = "ПО по пакетам";
|
||||
//this.packageSoftwaresToolStripMenuItem.Click += new System.EventHandler(this.packageSoftwaresToolStripMenuItem_Click);
|
||||
this.packageSoftwaresToolStripMenuItem.Name = "packageSoftwaresToolStripMenuItem";
|
||||
this.packageSoftwaresToolStripMenuItem.Size = new System.Drawing.Size(252, 26);
|
||||
this.packageSoftwaresToolStripMenuItem.Text = "ПО по пакетам";
|
||||
this.packageSoftwaresToolStripMenuItem.Click += new System.EventHandler(this.packageSoftwaresToolStripMenuItem_Click);
|
||||
//
|
||||
// ordersToolStripMenuItem
|
||||
//
|
||||
//this.ordersToolStripMenuItem.Name = "ordersToolStripMenuItem";
|
||||
//this.ordersToolStripMenuItem.Size = new System.Drawing.Size(252, 26);
|
||||
//this.ordersToolStripMenuItem.Text = "Список заказов";
|
||||
//this.ordersToolStripMenuItem.Click += new System.EventHandler(this.ordersToolStripMenuItem_Click);
|
||||
this.ordersToolStripMenuItem.Name = "ordersToolStripMenuItem";
|
||||
this.ordersToolStripMenuItem.Size = new System.Drawing.Size(252, 26);
|
||||
this.ordersToolStripMenuItem.Text = "Список заказов";
|
||||
this.ordersToolStripMenuItem.Click += new System.EventHandler(this.ordersToolStripMenuItem_Click);
|
||||
//
|
||||
// packageToolStripMenuItem2
|
||||
//
|
||||
|
@ -170,7 +170,7 @@ namespace SoftwareInstallationView
|
||||
private void packageSoftwaresToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormReportPackageSoftwares));
|
||||
if (service is FormReportOrders form)
|
||||
if (service is FormReportPackageSoftwares form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
|
@ -29,10 +29,10 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.dataGridView = new System.Windows.Forms.DataGridView();
|
||||
this.ColumnSoftware = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnPackage = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.buttonSaveToExcel = new System.Windows.Forms.Button();
|
||||
this.ColumPackage = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnSoftware = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@ -41,8 +41,8 @@
|
||||
this.dataGridView.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.ColumPackage,
|
||||
this.ColumnSoftware,
|
||||
this.ColumnPackage,
|
||||
this.ColumnCount});
|
||||
this.dataGridView.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.dataGridView.GridColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
@ -52,24 +52,6 @@
|
||||
this.dataGridView.Size = new System.Drawing.Size(750, 396);
|
||||
this.dataGridView.TabIndex = 0;
|
||||
//
|
||||
// ColumnSoftware
|
||||
//
|
||||
this.ColumnSoftware.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
this.ColumnSoftware.HeaderText = "ПО";
|
||||
this.ColumnSoftware.Name = "ColumnSoftware";
|
||||
//
|
||||
// ColumnPackage
|
||||
//
|
||||
this.ColumnPackage.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
this.ColumnPackage.HeaderText = "Пакет";
|
||||
this.ColumnPackage.Name = "ColumnPackage";
|
||||
//
|
||||
// ColumnCount
|
||||
//
|
||||
this.ColumnCount.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
this.ColumnCount.HeaderText = "Количество";
|
||||
this.ColumnCount.Name = "ColumnCount";
|
||||
//
|
||||
// buttonSaveToExcel
|
||||
//
|
||||
this.buttonSaveToExcel.Location = new System.Drawing.Point(25, 12);
|
||||
@ -80,6 +62,24 @@
|
||||
this.buttonSaveToExcel.UseVisualStyleBackColor = true;
|
||||
this.buttonSaveToExcel.Click += new System.EventHandler(this.buttonSaveToExcel_Click);
|
||||
//
|
||||
// ColumPackage
|
||||
//
|
||||
this.ColumPackage.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
this.ColumPackage.HeaderText = "Пакет";
|
||||
this.ColumPackage.Name = "ColumPackage";
|
||||
//
|
||||
// ColumnSoftware
|
||||
//
|
||||
this.ColumnSoftware.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
this.ColumnSoftware.HeaderText = "ПО";
|
||||
this.ColumnSoftware.Name = "ColumnSoftware";
|
||||
//
|
||||
// ColumnCount
|
||||
//
|
||||
this.ColumnCount.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
this.ColumnCount.HeaderText = "Количество";
|
||||
this.ColumnCount.Name = "ColumnCount";
|
||||
//
|
||||
// FormReportPackageSoftwares
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
@ -88,7 +88,8 @@
|
||||
this.Controls.Add(this.buttonSaveToExcel);
|
||||
this.Controls.Add(this.dataGridView);
|
||||
this.Name = "FormReportPackageSoftwares";
|
||||
this.Text = "FormReportPackageSoftwares";
|
||||
this.Text = "Пакеты по ПО";
|
||||
this.Load += new System.EventHandler(this.FormReportPackageSoftwares_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
@ -97,9 +98,9 @@
|
||||
#endregion
|
||||
|
||||
private DataGridView dataGridView;
|
||||
private DataGridViewTextBoxColumn ColumnSoftware;
|
||||
private DataGridViewTextBoxColumn ColumnPackage;
|
||||
private DataGridViewTextBoxColumn ColumnCount;
|
||||
private Button buttonSaveToExcel;
|
||||
private DataGridViewTextBoxColumn ColumPackage;
|
||||
private DataGridViewTextBoxColumn ColumnSoftware;
|
||||
private DataGridViewTextBoxColumn ColumnCount;
|
||||
}
|
||||
}
|
@ -25,7 +25,7 @@ namespace SoftwareInstallationView
|
||||
_logic = logic;
|
||||
}
|
||||
|
||||
private void FormReportDocumentBlanks_Load(object sender, EventArgs e)
|
||||
private void FormReportPackageSoftwares_Load(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -68,14 +68,14 @@ namespace SoftwareInstallationView
|
||||
{
|
||||
FileName = dialog.FileName
|
||||
});
|
||||
_logger.LogInformation("Сохранение списка документов по бланкам");
|
||||
_logger.LogInformation("Сохранение списка пакетов по ПО");
|
||||
|
||||
MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Information);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка сохранения списка документов по бланкам");
|
||||
_logger.LogError(ex, "Ошибка сохранения списка пакетов по ПО");
|
||||
|
||||
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
|
@ -57,10 +57,10 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="ColumnSoftware.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="ColumPackage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnPackage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="ColumnSoftware.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
|
@ -1,4 +1,4 @@
|
||||
using AbstractSoftwareInstallationDatabaseImplement.Implements;
|
||||
using AbstractSoftwareInstallationFileImplement.Implements;
|
||||
using AbstractSoftwareInstallationBusinessLogic;
|
||||
using AbstractSoftwareInstallationBusinessLogic.BusinessLogic;
|
||||
using AbstractSoftwareInstallationContracts.BusinessLogicsContracts;
|
||||
@ -55,6 +55,8 @@ namespace SoftwareInstallation
|
||||
services.AddTransient<FormPackage>();
|
||||
services.AddTransient<FormPackageSoftware>();
|
||||
services.AddTransient<FormPackages>();
|
||||
services.AddTransient<FormReportOrders>();
|
||||
services.AddTransient<FormReportPackageSoftwares>();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -23,6 +23,7 @@
|
||||
<ProjectReference Include="..\AbstractSoftwareInstallationBusinessLogic\AbstractSoftwareInstallationBusinessLogic.csproj" />
|
||||
<ProjectReference Include="..\AbstractSoftwareInstallationContracts\AbstractSoftwareInstallationContracts.csproj" />
|
||||
<ProjectReference Include="..\AbstractSoftwareInstallationDatabaseImplement\AbstractSoftwareInstallationDatabaseImplement.csproj" />
|
||||
<ProjectReference Include="..\AbstractSoftwareInstallationFileImplement\AbstractSoftwareInstallationFileImplement.csproj" />
|
||||
<ProjectReference Include="..\AbstractSoftwareInstallationListImplement\AbstractSoftwareInstallationListImplement.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user