Exemple #1
0
        public static AgedBalancesReportType Instantiate(int id)
        {
            AgedBalancesReportType reportType = null;

            foreach (AgedBalancesReportType knownReportType in knownTypes)
            {
                if (id == knownReportType.id)
                {
                    reportType = knownReportType;
                    break;
                }
            }

            if (reportType == null)
            {
                foreach (AgedBalancesReportType knownReportType in knownTypesWithNotes)
                {
                    if (id == knownReportType.id)
                    {
                        reportType = knownReportType;
                        break;
                    }
                }
            }

            if (reportType == null)
            {
                throw new InvalidOperationException("Unknown aged balance report ID");
            }
            return(reportType);
        }
        public AgedBalancesReport(ICalendar calendar, string title, IList <AgedBalancesReportRecord> records, AgedBalancesReportType type, string clientName, Date endDate)
            : base(calendar, "Aged Balances - " + type.Text, clientName)
        {
            ArgumentChecker.ThrowIfNull(calendar, "calendar");
            ArgumentChecker.ThrowIfNull(records, "records");
            ArgumentChecker.ThrowIfNullOrEmpty(title, "title");

            this.records = records;
            this.title   = title;
        }