protected internal override Report _Clone(string Name, string Description) { string productsXml = null; string filterXml = null; this.SaveToXml(ref productsXml, ref filterXml); FI.DataAccess.StorecheckReports dacObj = DataAccessFactory.Instance.GetStorecheckReportsDA(); decimal newId = dacObj.InsertReport(this.Owner.ID, 0, 0, Name, Description, false, productsXml, (byte)this.ProductsJoinLogic, this.Days, filterXml, this._cacheTimestamp, this.InSelOnly, this.InBSelOnly, (byte)this.DataSource); return(_owner.ReportSystem.GetReport(newId, typeof(StorecheckReport), false)); }
internal StorecheckReport(decimal ID, User Owner) : base(ID, Owner) { if (ID == 0) //if new { string productsXml = null; string filterXml = null; this.SaveToXml(ref productsXml, ref filterXml); FI.DataAccess.StorecheckReports dacObj = DataAccessFactory.Instance.GetStorecheckReportsDA(); _id = dacObj.InsertReport(_owner.ID, 0, 0, "New Report", "", this.IsSelected, productsXml, (byte)this.ProductsJoinLogic, this.Days, filterXml, this._cacheTimestamp, this.InSelOnly, this.InBSelOnly, (byte)this.DataSource); _isProxy = false; _isDirty = false; } _oltpDatabase = Owner.OltpDatabase; }