Beispiel #1
0
        protected void Export()
        {
            string fileName = UIHelper.GetSaveFile("Excel files (*.xls)|*.xls|CSV files (*.csv)|*.csv");

            if (string.IsNullOrEmpty(fileName))
            {
                return;
            }

            string ext = FileHelper.GetFileExtension(fileName);

            switch (ext)
            {
            case ".xls":
                ExcelExporter.Generate(fListView, fileName);
                break;

            case ".csv":
                CSVExporter.Generate(fListView, fileName);
                break;

            default:
                return;
            }

            AppHost.LoadExtFile(fileName);
        }