private void ExportToEx(String filename, string ext, BaseView exportView) { Cursor currentCursor = Cursor.Current; Cursor.Current = Cursors.WaitCursor; if (ext == "rtf") { exportView.ExportToRtf(filename); } if (ext == "pdf") { exportView.ExportToPdf(filename); } if (ext == "mht") { exportView.ExportToMht(filename); } if (ext == "htm") { exportView.ExportToHtml(filename); } if (ext == "txt") { exportView.ExportToText(filename); } if (ext == "xls") { exportView.ExportToXls(filename); } if (ext == "xlsx") { exportView.ExportToXlsx(filename); } Cursor.Current = currentCursor; }
private static void ExportGridAsRtf(this BaseView gridView, string fileType) { var exportFileName = GetFileNameViaSavePrompt(fileType, GlobalStrings.FileFilters.RTFFilter); if (!string.IsNullOrEmpty(exportFileName)) { gridView.ExportToRtf(exportFileName); } }
private void ExportToEx(String filename, string ext, BaseView exportView) { Cursor currentCursor = Cursor.Current; Cursor.Current = Cursors.WaitCursor; DevExpress.XtraPrinting.IPrintingSystem ps = DevExpress.XtraPrinting.PrintHelper.GetCurrentPS(); if (ext == "rtf") { exportView.ExportToRtf(filename); } if (ext == "pdf") { exportView.ExportToPdf(filename); } if (ext == "mht") { exportView.ExportToMht(filename); } if (ext == "htm") { exportView.ExportToHtml(filename); } if (ext == "txt") { exportView.ExportToText(filename); } if (ext == "xls") { exportView.ExportToXls(filename); } if (ext == "xlsx") { exportView.ExportToXlsx(filename); } Cursor.Current = currentCursor; }