public virtual void ImportData(DataTable dt) { IOFileInfo ei = new IOFileInfo(); ei.FileFullPath = FileFullPath; ei.FileName = FileName; DataAccessBase eda = new FlatFileDataAccess(ei); eda.ReportProgress += eda_ReportProgress; DataSource = eda.Import(dt); }
//public void SetDefaults() //{ // IOFileInfo = new IOFileInfo(); // IOFileInfo.WrappedWithQuotes = true; // IOFileInfo.CreateHeader = true; // IOFileInfo.Delimiter = ","; // IOFileInfo.WrappedWithQuotes = true; // if (CurrentJob.Encoding == CurrentJob.EncodingType.Default) // IOFileInfo.Encoding = IOFileInfo.EncodingType.Default; // else // IOFileInfo.Encoding = IOFileInfo.EncodingType.UTF8; //} public virtual void ImportData() { IOFileInfo ei = new IOFileInfo(); ei.FileFullPath = FileFullPath; ei.FileName = FileName; DataAccessBase eda = new FlatFileDataAccess(ei); eda.ReportProgress += eda_ReportProgress; DataSource = eda.Import(); // RemoveSpecialCharactersFromColumns(); }
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(); }