Esempio n. 1
0
        public void ExportAuditTrail()
        {
            SaveFileDialog saveFileDialog = new SaveFileDialog();

            saveFileDialog.Filter = "PDF Files(.pdf)|*.pdf";
            Common.SetDefaultPathForSaveFileDialog(saveFileDialog, SavingFileType.AuditTrail);
            if (saveFileDialog.ShowDialog(this) == DialogResult.OK)
            {
                try
                {
                    new AuditTrailExporter(saveFileDialog.FileName, "", this.list).GenerateReport();
                }
                catch (IOException)
                {
                    Utils.ShowMessageBox(Messages.SameNameFileOpened, Messages.TitleError);
                }
                catch (Exception e)
                {
                    Utils.ShowMessageBox(e.Message, Messages.TitleError);
                }
            }
        }