//===================================================================== // FunctionName : ExportToFile /// <summary> /// 重载导出到文件函数 /// </summary> //===================================================================== protected override void ExportToFile() { appData = new T_BG_0601ApplicationData(); CountRecord(); gvPrint.DataSource = appData.ResultSet; gvPrint.DataBind(); // 创建信息标题 gvPrint.Caption = GetTableCaption(); gvPrint.CaptionAlign = TableCaptionAlign.Left; switch (ddlExportFileFormat.SelectedValue.ToLower()) { case "xls": FileLibrary.ExportToExcelFileWithoutControl(gvPrint, "Result"); break; case "doc": FileLibrary.ExportToWordFileWithoutControl(gvPrint, "Result"); break; default: FileLibrary.ExportToExcelFileWithoutControl(gvPrint, "Result"); break; } }