public ReportBase CloneSchema() { ReportBase dts = new ReportBase(); dts._dt = this._dt.Clone(); dts._columnsTitle = this._columnsTitle; return(dts); }
public ReportBase Select(String filter) { ReportBase dts = new ReportBase(); dts._dt = this._dt.Clone(); dts._columnsTitle = this._columnsTitle; foreach (DataRow dr in this._dt.Select(filter)) { dts._dt.Rows.Add(dr.ItemArray); } return(dts); }
public ReportBase Clone() { ReportBase dts = new ReportBase(); dts._dt = this._dt.Clone(); dts._columnsTitle = this._columnsTitle; foreach (DataRow dr in this._dt.Rows) { dts._dt.Rows.Add(dr.ItemArray); } return(dts); }
public void LoadFromFile(String filename) { IFormatter formato = new BinaryFormatter(); MemoryStream file = null; Int32 cnt = 0; FileInfo iFile = new FileInfo(filename); while ((cnt < 5) && (file == null)) { try { file = new MemoryStream(File.ReadAllBytes(filename)); //file = File.Open(filename, FileMode.Open, FileAccess.Read); } catch (Exception ex) { cnt++; if (cnt == 5) { throw ex; } } } ReportBase item = (ReportBase)formato.Deserialize(file); file.Dispose(); file.Dispose(); file.Close(); file = null; this._dt = item._dt; this._columnsTitle = item._columnsTitle; }
public void CopyTo(ReportBase data) { data._dt.Merge(this._dt); //this._dt.Merge( data._dt); }