Ejemplo n.º 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);
     }
 }
Ejemplo n.º 2
0
        private void LaunchExportTxt()
        {
            string exportStr = _currentActivity.ExportTXT();

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