Eliseev E.E. LabWork05_Hard #11

Closed
ElEgEv wants to merge 46 commits from LabWork05_Hard into LabWork05
Showing only changes of commit e71b781749 - Show all commits

View File

@ -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();
}
}
}
}