diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs index 4aceec9..2d0dce3 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs @@ -260,12 +260,27 @@ namespace BlacksmithWorkshop private void ReportManufactureToolStripMenuItem_Click(object sender, EventArgs e) { + using var dialog = new SaveFileDialog { Filter = "docx|*.docx" }; + if (dialog.ShowDialog() == DialogResult.OK) + { + _reportLogic.SaveManufacturesToWordFile(new ReportBindingModel + { + FileName = dialog.FileName + }); + + MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information); + } } private void WorkPieceManufacturesToolStripMenuItem_Click(object sender, EventArgs e) { + var service = Program.ServiceProvider?.GetService(typeof(FormReportManufactureWorkPieces)); + if (service is FormReportManufactureWorkPieces form) + { + form.ShowDialog(); + } } } } \ No newline at end of file