Example #1
0
        public ReportBase CloneSchema()
        {
            ReportBase dts = new ReportBase();

            dts._dt           = this._dt.Clone();
            dts._columnsTitle = this._columnsTitle;

            return(dts);
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }
Example #4
0
        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;
        }
Example #5
0
 public void CopyTo(ReportBase data)
 {
     data._dt.Merge(this._dt);
     //this._dt.Merge(	data._dt);
 }