/// <summary> /// Insert battery into existing file without any dialogs /// </summary> /// <param name="path">path to existing template</param> public void InsertTableInTemplateDOC(string path) { try { DocReportCreator creatorDOC = new DocReportCreator(); creatorDOC.InsertBatteryInfoIntoTemplate(path, properties.ToList()); } catch (Exception e) { DefaultDialogs.ShowMessage(e.Message, "Ошибка"); } }
/// <summary> /// Insert battery information (table) into existing file with showing OpenFileDialog /// </summary> public void InsertTableInTemplateDOC() { try { DefaultDialogs dialogs = new DefaultDialogs(); if (dialogs.OpenFileDialog(DefaultDialogs.TargetFileType.DOC_DOCX) == true) { DocReportCreator creatorDOC = new DocReportCreator(); creatorDOC.InsertBatteryInfoIntoTemplate(dialogs.FilePath, properties.ToList()); } } catch (Exception e) { DefaultDialogs.ShowMessage(e.Message, "Ошибка"); } }