public override void SaveData(List <FieldNameMapper> mapper, object ExportObjectType) { DataTable dt = this.GetExportDataTable(this.ExportDataList, mapper, ExportObjectType); //if (ConvertFieldsToRows) //{ // dt = GetConvertedDataTable(dt); //} this.IOFileInfo.FileFullPath = this.FileFullPath; this.IOFileInfo.OutputDataSource = dt; this.IOFileInfo.Delimiter = ","; this.IOFileInfo.CreateHeader = true; this.IOFileInfo.WrappedWithQuotes = true; DataAccessBase eda = new FlatFileDataAccess(this.IOFileInfo); eda.ReportProgress += new EventHandler <DataAccessEventMessenger>(eda_ReportProgress); eda.Save(); }
public override void SaveData(List <FieldNameMapper> mapper, object ExportObjectType) { //List<Student> list = this.ExportDataList.ConvertAll(x => x as Student); //DataBase db = new StudentData(); //DataTable dt = db.GeteExportDatatable(this.ExportDataList); DataTable dt = this.GetExportDataTable(this.ExportDataList, mapper, ExportObjectType); //if (ConvertFieldsToRows) //{ // dt = GetConvertedDataTable(dt); //} this.IOFileInfo.FileFullPath = this.FileFullPath; this.IOFileInfo.OutputDataSource = dt; this.IOFileInfo.Delimiter = "|"; this.IOFileInfo.CreateHeader = true; DataAccessBase eda = new FlatFileDataAccess(this.IOFileInfo); eda.ReportProgress += new EventHandler <DataAccessEventMessenger>(eda_ReportProgress); eda.Save(); }