private void ClearCache()
        {
            if (_cacheExists)
            {
                FI.DataAccess.StorecheckReports dacObj = DataAccessFactory.Instance.GetStorecheckReportsDA();
                dacObj.DeleteReportCache(this.ID);
            }

            _cacheExists = false;
        }
        private void CreateCache()
        {
            if (_cacheExists && this._cacheTimestamp.Date == DateTime.Today)
            {
                return;                 //cache already exists
            }
            DateTime endDate   = DateTime.Today;
            DateTime startDate = endDate.Subtract(TimeSpan.FromDays(this.Days));

            FI.DataAccess.StorecheckReports dacObj = DataAccessFactory.Instance.GetStorecheckReportsDA();
            dacObj.DeleteReportCache(this.ID);
            dacObj.CreateReportCache(this.ID, this._oltpDatabase, this._productsSerNoList,
                                     (byte)this.ProductsJoinLogic, startDate, endDate, this.InSelOnly, this.InBSelOnly, (byte)this.DataSource);

            _cacheExists    = true;
            _cacheTimestamp = DateTime.Today;
            this.SaveHeader();
        }
 override protected internal void _Delete(bool DenyShared)
 {
     FI.DataAccess.StorecheckReports dacObj = DataAccessFactory.Instance.GetStorecheckReportsDA();
     dacObj.DeleteReportCache(this.ID);
     dacObj.DeleteReport(_owner.ID, this.ID, DenyShared);
 }