Exemple #1
0
 private void IntuitExportClickHandler(object sender, EventArgs e)
 {
     try
     {
         ExportEngine engine = new ExportEngine(HostUI);
         using (ExportForm frm = new ExportForm())
         {
             if (frm.ShowDialog(engine, HostUI) != System.Windows.Forms.DialogResult.OK)
             {
                 HostUI.InfoMessageBox("Export canceled.");
                 return;
             }
         }
         if (engine.Run())
         {
             HostUI.InfoMessageBox("Exported to " + engine.OutputPath);
         }
         else
         {
             HostUI.ErrorMessageBox("Export canceled.");
         }
     }
     catch (Exception ex)
     {
         ErrorHandling.TopException(ex);
     }
 }
Exemple #2
0
        public DialogResult ShowDialog(ExportEngine exportEngine, IHostUI hostUI)
        {
            ExportEngine       = exportEngine;
            HostUI             = hostUI;
            ctlStartDate.Value = new DateTime(1980, 1, 1);
            ctlEndDate.Value   = DateTime.Today;
            DialogResult result = this.ShowDialog();

            if (result == DialogResult.OK)
            {
                // Set ExportEngine properties
                ExportEngine.StartDate        = ctlStartDate.Value;
                ExportEngine.EndDate          = ctlEndDate.Value;
                ExportEngine.BalanceSheetMaps = BalanceSheetMaps;
                ExportEngine.CategoryMaps     = CategoryMaps;
            }
            return(result);
        }