private static void Main(string[] args) { Parser.Default.ParseArguments <Options, Schema.Options>(args) .MapResult( (Options opts) => ExportToCsv.Export(opts), (Schema.Options opts) => PrintSchema.Print(opts), errs => 1); }
private void Export(DataTable dataTable) { if (csvRadioButton.Checked) { ExportToCsv.Export(dataTable, _fileName, _dataViewerParameters); } else if (sqlRadioButton.Checked) { ExportToSql.Export(dataTable, _fileName, _dataViewerParameters); } else { ExportToPtt.Export(dataTable, databaseNameTextBox.Text.Trim(), _fileName); } }