и еще один фикс
This commit is contained in:
parent
b3a6dff9c4
commit
5df83b8834
@ -33,8 +33,10 @@
|
||||
this.componentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.manufacturesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.storesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.отчетToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.componentsReportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.reportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.reportComponentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.reportManufactureComponentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.reportOrdersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.dataGridView = new System.Windows.Forms.DataGridView();
|
||||
this.buttonCreateOrder = new System.Windows.Forms.Button();
|
||||
this.buttonTakeOrderInWork = new System.Windows.Forms.Button();
|
||||
@ -43,8 +45,6 @@
|
||||
this.buttonRef = new System.Windows.Forms.Button();
|
||||
this.buttonFillStore = new System.Windows.Forms.Button();
|
||||
this.buttonSellManufacture = new System.Windows.Forms.Button();
|
||||
this.manufactureComponentsReportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.ordersReportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuStrip.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
@ -53,7 +53,7 @@
|
||||
//
|
||||
this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.refbooksToolStripMenuItem,
|
||||
this.отчетToolStripMenuItem});
|
||||
this.reportToolStripMenuItem});
|
||||
this.menuStrip.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip.Name = "menuStrip";
|
||||
this.menuStrip.Size = new System.Drawing.Size(1108, 24);
|
||||
@ -91,21 +91,36 @@
|
||||
this.storesToolStripMenuItem.Text = "Магазины";
|
||||
this.storesToolStripMenuItem.Click += new System.EventHandler(this.StoresToolStripMenuItem_Click);
|
||||
//
|
||||
// отчетToolStripMenuItem
|
||||
// reportToolStripMenuItem
|
||||
//
|
||||
this.отчетToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.componentsReportToolStripMenuItem,
|
||||
this.manufactureComponentsReportToolStripMenuItem,
|
||||
this.ordersReportToolStripMenuItem});
|
||||
this.отчетToolStripMenuItem.Name = "отчетToolStripMenuItem";
|
||||
this.отчетToolStripMenuItem.Size = new System.Drawing.Size(51, 20);
|
||||
this.отчетToolStripMenuItem.Text = "Отчет";
|
||||
this.reportToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.reportComponentsToolStripMenuItem,
|
||||
this.reportManufactureComponentsToolStripMenuItem,
|
||||
this.reportOrdersToolStripMenuItem});
|
||||
this.reportToolStripMenuItem.Name = "reportToolStripMenuItem";
|
||||
this.reportToolStripMenuItem.Size = new System.Drawing.Size(51, 20);
|
||||
this.reportToolStripMenuItem.Text = "Отчет";
|
||||
//
|
||||
// componentsReportToolStripMenuItem
|
||||
// reportComponentsToolStripMenuItem
|
||||
//
|
||||
this.componentsReportToolStripMenuItem.Name = "componentsReportToolStripMenuItem";
|
||||
this.componentsReportToolStripMenuItem.Size = new System.Drawing.Size(218, 22);
|
||||
this.componentsReportToolStripMenuItem.Text = "Список компонентов";
|
||||
this.reportComponentsToolStripMenuItem.Name = "reportComponentsToolStripMenuItem";
|
||||
this.reportComponentsToolStripMenuItem.Size = new System.Drawing.Size(218, 22);
|
||||
this.reportComponentsToolStripMenuItem.Text = "Список компонентов";
|
||||
this.reportComponentsToolStripMenuItem.Click += new System.EventHandler(this.ReportComponentsToolStripMenuItem_Click);
|
||||
//
|
||||
// reportManufactureComponentsToolStripMenuItem
|
||||
//
|
||||
this.reportManufactureComponentsToolStripMenuItem.Name = "reportManufactureComponentsToolStripMenuItem";
|
||||
this.reportManufactureComponentsToolStripMenuItem.Size = new System.Drawing.Size(218, 22);
|
||||
this.reportManufactureComponentsToolStripMenuItem.Text = "Компоненты по изделиям";
|
||||
this.reportManufactureComponentsToolStripMenuItem.Click += new System.EventHandler(this.ReportManufactureComponentsToolStripMenuItem_Click);
|
||||
//
|
||||
// reportOrdersToolStripMenuItem
|
||||
//
|
||||
this.reportOrdersToolStripMenuItem.Name = "reportOrdersToolStripMenuItem";
|
||||
this.reportOrdersToolStripMenuItem.Size = new System.Drawing.Size(218, 22);
|
||||
this.reportOrdersToolStripMenuItem.Text = "Список заказов";
|
||||
this.reportOrdersToolStripMenuItem.Click += new System.EventHandler(this.ReportOrdersToolStripMenuItem_Click);
|
||||
//
|
||||
// dataGridView
|
||||
//
|
||||
@ -193,18 +208,6 @@
|
||||
this.buttonSellManufacture.UseVisualStyleBackColor = true;
|
||||
this.buttonSellManufacture.Click += new System.EventHandler(this.ButtonSellManufacture_Click);
|
||||
//
|
||||
// manufactureComponentsReportToolStripMenuItem
|
||||
//
|
||||
this.manufactureComponentsReportToolStripMenuItem.Name = "manufactureComponentsReportToolStripMenuItem";
|
||||
this.manufactureComponentsReportToolStripMenuItem.Size = new System.Drawing.Size(218, 22);
|
||||
this.manufactureComponentsReportToolStripMenuItem.Text = "Компоненты по изделиям";
|
||||
//
|
||||
// ordersReportToolStripMenuItem
|
||||
//
|
||||
this.ordersReportToolStripMenuItem.Name = "ordersReportToolStripMenuItem";
|
||||
this.ordersReportToolStripMenuItem.Size = new System.Drawing.Size(218, 22);
|
||||
this.ordersReportToolStripMenuItem.Text = "Список заказов";
|
||||
//
|
||||
// FormMain
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
@ -246,9 +249,9 @@
|
||||
private ToolStripMenuItem storesToolStripMenuItem;
|
||||
private Button buttonFillStore;
|
||||
private Button buttonSellManufacture;
|
||||
private ToolStripMenuItem отчетToolStripMenuItem;
|
||||
private ToolStripMenuItem componentsReportToolStripMenuItem;
|
||||
private ToolStripMenuItem manufactureComponentsReportToolStripMenuItem;
|
||||
private ToolStripMenuItem ordersReportToolStripMenuItem;
|
||||
private ToolStripMenuItem reportToolStripMenuItem;
|
||||
private ToolStripMenuItem reportComponentsToolStripMenuItem;
|
||||
private ToolStripMenuItem reportManufactureComponentsToolStripMenuItem;
|
||||
private ToolStripMenuItem reportOrdersToolStripMenuItem;
|
||||
}
|
||||
}
|
@ -173,5 +173,32 @@ namespace BlacksmithWorkshopView
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
private void ReportComponentsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var dialog = new SaveFileDialog { Filter = "docx|*.docx" };
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
_reportLogic.SaveComponentsToWordFile(new ReportBindingModel { FileName = dialog.FileName });
|
||||
MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
private void ReportManufactureComponentsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormReportManufactureComponents));
|
||||
if (service is FormReportManufactureComponents form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
LoadData();
|
||||
}
|
||||
}
|
||||
private void ReportOrdersToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormReportOrders));
|
||||
if (service is FormReportOrders form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
LoadData();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -57,6 +57,8 @@ namespace BlacksmithWorkshopView
|
||||
services.AddTransient<FormStores>();
|
||||
services.AddTransient<FormFillStore>();
|
||||
services.AddTransient<FormSellManufacture>();
|
||||
services.AddTransient<FormReportManufactureComponents>();
|
||||
services.AddTransient<FormReportOrders>();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user