public FI.Common.Data.FIDataTable GetDistributionsWithContactsPage(Report report, int CurrentPage, int RowCount, string FilterExpression, string SortExpression)
        {
            int StartIndex = (CurrentPage - 1) * RowCount;

            FI.DataAccess.Distributions dacObj = DataAccessFactory.Instance.GetDistributionsDA();
            FI.Common.Data.FIDataTable  table  = new FI.Common.Data.FIDataTable();

            table = dacObj.ReadDistributionsWithContactsPage(_owner.ID, report.ID, report.GetTypeCode(), StartIndex, RowCount, FilterExpression, SortExpression);
            ConvertEnums(ref table);
            return(table);
        }
        public FI.Common.Data.FIDataTable GetDistributionLogPage(Report report, int CurrentPage, int RowCount, string FilterExpression, string SortExpression)
        {
            int StartIndex = (CurrentPage - 1) * RowCount;

            FI.Common.DataAccess.IDistributionsDA dacObj = DataAccessFactory.Instance.GetDistributionsDA();
            FI.Common.Data.FIDataTable            table  = null;

            table = dacObj.ReadReportDistributionLog(_owner.ID, report.ID, report.GetTypeCode(), StartIndex, RowCount, FilterExpression, SortExpression);

            return(table);
        }
        internal Distribution(User Owner, Report report, Contact contact, Report.ExportFormat format)
        {
            _owner       = Owner;
            this.Report  = report;
            this.Contact = contact;
            this.Format  = format;

            FI.DataAccess.Distributions dacObj = DataAccessFactory.Instance.GetDistributionsDA();
            _id = dacObj.InsertDistribution(_owner.ID, report.ID, contact.ID, report.GetTypeCode(), this.FrequencyType.ToString(), this.FrequencyValue.ToString(), (int)this.Format);

            _isProxy = false;
            _isDirty = false;
        }
 public void DeleteDistributions(Report report)
 {
     FI.DataAccess.Distributions dacObj = DataAccessFactory.Instance.GetDistributionsDA();
     dacObj.DeleteDistributionsByReport(report.ID, report.GetTypeCode());
 }