예제 #1
0
        public RetentionDetails(int retentionId, IDate releasedDate, Date endOfMonth, decimal nonFactored, decimal factored, RetentionInfo retentionInfo, RetentionDeductable retentionDeductable, decimal nonFactoredReceipts, TransactionsAfterEndOfMonth transactionsAfterEndOfMonth, RetentionSummary retentionSummary, ChargeCollection charges, OverdueFee overdueFee, string status, Int16 hold, int clientFacilityType)
        {
            ArgumentChecker.ThrowIfNull(releasedDate, "releasedDate");
            ArgumentChecker.ThrowIfNull(endOfMonth, "endOfMonth");
            ArgumentChecker.ThrowIfNull(retentionInfo, "retentionInfo");
            ArgumentChecker.ThrowIfNull(retentionDeductable, "deductable");
            ArgumentChecker.ThrowIfNull(transactionsAfterEndOfMonth, "transactionsAfterEndOfMonth");
            ArgumentChecker.ThrowIfNull(retentionSummary, "retentionSummary");
            ArgumentChecker.ThrowIfNull(charges, "charges");
            ArgumentChecker.ThrowIfNull(overdueFee, "overdueFee");
            ArgumentChecker.ThrowIfNullOrEmpty(status, "status");

            this.retentionId                 = retentionId;
            this.releasedDate                = releasedDate;
            this.endOfMonth                  = endOfMonth;
            this.nonFactored                 = nonFactored;
            this.factored                    = factored;
            this.retentionInfo               = retentionInfo;
            this.retentionDeductable         = retentionDeductable;
            this.nonFactoredReceipts         = nonFactoredReceipts;
            this.transactionsAfterEndOfMonth = transactionsAfterEndOfMonth;
            this.retentionSummary            = retentionSummary;
            this.charges             = charges;
            this.overdueFee          = overdueFee;
            this.status              = status;
            this._hold               = hold;
            this._clientFacilityType = clientFacilityType;
        }
        public CffPrincipal(IPrincipal rolePrincipal, ICffUser cffUser)
        {
            ArgumentChecker.ThrowIfNull(rolePrincipal, "rolePrincipal");
            ArgumentChecker.ThrowIfNull(cffUser, "cffUser");

            this.rolePrincipal = rolePrincipal;
            this.cffUser       = cffUser;
        }
예제 #3
0
        public CustomerTransactionReport(ICalendar calendar, string title, string customerName, IList <CustomerTransactionReportRecord> records, string name)
            : base(calendar, name, customerName)
        {
            ArgumentChecker.ThrowIfNull(calendar, "calendar");
            ArgumentChecker.ThrowIfNull(records, "records");
            ArgumentChecker.ThrowIfNullOrEmpty(title, "title");

            this.title   = title;
            this.records = records;
        }
예제 #4
0
        public PurchaserDetails(CffClient client, CffCustomer customer, Address customerAddress)
        {
            ArgumentChecker.ThrowIfNull(customer, "customer");
            ArgumentChecker.ThrowIfNull(client, "client");
            ArgumentChecker.ThrowIfNull(customerAddress, "customerAddress");

            this.customer        = customer;
            this.customerAddress = customerAddress;
            this.client          = client;
        }
예제 #5
0
        public RetentionInfo(decimal retentionHeld, Percentage factoredInvoicesPercentage, decimal factoredInvoices)
        {
            ArgumentChecker.ThrowIfNull(factoredInvoicesPercentage, "factoredInvoicesPercentage");

            this.retentionHeld = retentionHeld;
            this.factoredInvoicesPercentage = factoredInvoicesPercentage;
            this.factoredInvoices           = factoredInvoices;

            factoredRetention = factoredInvoicesPercentage.Of(factoredInvoices);
            surplus           = retentionHeld - factoredRetention;
        }
예제 #6
0
        public Charge(int id, ChargeType type, decimal amount, string description, Date modifiedDate, string modifiedBy)
        {
            ArgumentChecker.ThrowIfNull(type, "type");

            this.id           = id;
            this.type         = type;
            this.amount       = amount;
            this.description  = description;
            this.modifiedDate = modifiedDate;
            this.modifiedBy   = modifiedBy;
        }
예제 #7
0
        public ManagementDetails(string name, string legalEntityOne, string legalEntityTwo, string phone, string fax, string email,
                                 string website, Address address, BankDetails bankDetails, string gstCode)
        {
            ArgumentChecker.ThrowIfNull(address, "address");
            ArgumentChecker.ThrowIfNullOrEmpty(gstCode, "gstCode");

            this.address        = address;
            this.bankDetails    = bankDetails;
            this.gstCode        = gstCode;
            this.name           = name;
            this.legalEntityOne = legalEntityOne;
            this.legalEntityTwo = legalEntityTwo;
            this.phone          = phone;
            this.fax            = fax;
            this.email          = email;
            this.website        = website;

            if (!string.IsNullOrEmpty(email))
            {
                emailLink = "mailto:" + email;
            }
        }
예제 #8
0
 // Reads nicely but is only used in tests :(
 public bool IsWithin(DateRange dateRange)
 {
     ArgumentChecker.ThrowIfNull(dateRange, "dateRange");
     return(this >= dateRange.StartDate && this <= dateRange.EndDate);
 }
 public void LogError(Exception e)
 {
     ArgumentChecker.ThrowIfNull(e, "e");
     log4NetLogger.Error(e);
     eventLog.WriteEntry(GenerateExceptionMessage(e).ToString(), EventLogEntryType.Error);
 }
예제 #10
0
 public static IList <T> ReturnMaximumRecords <T>(IList <T> records)
 {
     ArgumentChecker.ThrowIfNull(records, "records");
     return(records.Take(1000).ToList());
 }