private bool GenerateOutputFiles() { var invoiceNoValue = CSVGenerator.Generate(InvoiceNoValue, nameof(InvoiceNoValue), true); var invoiceUpToSixPages = CSVGenerator.Generate(InvoiceUpToSixPages, nameof(InvoiceUpToSixPages), true); var invoiceUpToTwelvePages = CSVGenerator.Generate(InvoiceUpToTwelvePages, nameof(InvoiceUpToTwelvePages), true); var invoiceMoreThanTwelvePages = CSVGenerator.Generate(InvoiceMoreThanTwelvePages, nameof(InvoiceMoreThanTwelvePages), true); return(invoiceNoValue && invoiceUpToSixPages && invoiceUpToTwelvePages && invoiceMoreThanTwelvePages); }
private void cSVToolStripMenuItem_Click(object sender, EventArgs e) { var dialog = new SaveFileDialog { Filter = @"CSV|*.csv", Title = @"Save as CSV file" }; var dialogResult = dialog.ShowDialog(); if (dialogResult == DialogResult.OK) { if (dialog.FileName != "") { using (new WaitCursor()) { CSVGenerator.Generate(TableInformation, dialog.FileName); } MessageBox.Show($"Data saved as:\r\n\r\n{dialog.FileName}", @"Succsess", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }