示例#1
0
 public void Test_project()
 {
     try
     {
         FinancialActivity pf = new FinancialActivity();
         pf.Balance();
         pf.ExportCSV();
         pf.ExportPDF(""); // TODO : see why this one have parameter
         pf.ExportTXT();
         pf.ExportWEB();
         pf.ExportXML();
         Assert.IsTrue(true);
     }
     catch (System.Exception exp)
     {
         Assert.Fail(exp.Message);
     }
 }
示例#2
0
        private void LaunchExportCsv()
        {
            string exportStr = _currentActivity.ExportCSV();

            using (SaveFileDialog sfd = new SaveFileDialog())
            {
                sfd.FileName = "Export_" + _currentActivity.Name + ".csv";
                sfd.Filter   = "CSV files (*.csv)|*.txt|All files (*.*)|*.*";
                if (sfd.ShowDialog() == DialogResult.OK)
                {
                    using (StreamWriter sw = new StreamWriter(sfd.FileName))
                    {
                        sw.Write(exportStr);
                        sw.Close();
                    }
                }
            }
            SheetDisplayRequested?.Invoke(null);
        }