예제 #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 LaunchExportXml()
        {
            string exportStr = _currentActivity.ExportXML();

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