From e71b781749f0887fbc1849bd075231dadfc5a6cd Mon Sep 17 00:00:00 2001 From: Programmist73 Date: Wed, 19 Apr 2023 23:25:23 +0400 Subject: [PATCH] =?UTF-8?q?=D0=AD=D1=8D=D1=8D=D1=8D,=20=D0=BE=D0=BD=D0=BE?= =?UTF-8?q?=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D0=B5=D1=82=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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