Beispiel #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;
        }
        /// <summary>
        /// Computes relative path to root
        /// e.g. Root/SubDirectory/File.file would return "../"
        /// </summary>
        public static string ComputeRelativePathToRoot(string rootPath, string currentPath)
        {
            ArgumentChecker.ThrowIfNullOrEmpty(rootPath, "rootPath");
            ArgumentChecker.ThrowIfNullOrEmpty(currentPath, "currentPath");

            if (rootPath.EndsWith("\\"))
            {
                rootPath = rootPath.Substring(0, rootPath.Length - 1);
            }

            if (currentPath.IndexOf(rootPath) < 0)
            {
                throw new ArgumentException(currentPath, "currentPath");
            }

            string relativePathToRoot = string.Empty;
            string temp = currentPath.Substring(rootPath.Length);

            foreach (char c in temp)
            {
                if (c == '\\')
                {
                    relativePathToRoot += "../";
                }
            }

            return(relativePathToRoot);
        }
        private NoteType(int id, string name)
        {
            ArgumentChecker.ThrowIfLessThanZero(id, "id");
            ArgumentChecker.ThrowIfNullOrEmpty(name, "name");

            this.id   = id;
            this.name = name;
        }
        public CallbackParameter(string fieldName, int rowIndex)
        {
            ArgumentChecker.ThrowIfNullOrEmpty(fieldName, "fieldName");
            ArgumentChecker.ThrowIfLessThanZero(rowIndex, "rowIndex");

            this.fieldName = fieldName;
            this.rowIndex  = rowIndex;
        }
Beispiel #5
0
        private BatchType(int id, string name, bool isDateRangeDependant)
        {
            ArgumentChecker.ThrowIfLessThanZero(id, "id");
            ArgumentChecker.ThrowIfNullOrEmpty(name, "name");

            this.id   = id;
            this.name = name;
            this.isDateRangeDependant = isDateRangeDependant;
        }
Beispiel #6
0
        public CustomerNote(long noteId, Date created, ActivityType activityType, NoteType noteType, string comment,
                            int authorId, string createdByEmployeeName, int modifiedBy, string modifiedByEmployeeName,
                            Date modified)
            : base(noteId, created, comment, authorId, createdByEmployeeName, modifiedBy, modifiedByEmployeeName, modified)
        {
            ArgumentChecker.ThrowIfNullOrEmpty(createdByEmployeeName, "createdByEmployeeName");

            this.activityType = activityType;
            this.noteType     = noteType;
        }
Beispiel #7
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;
        }
Beispiel #8
0
        public BankDetails(string bankName, string branch, string accountNumber)
        {
            ArgumentChecker.ThrowIfNullOrEmpty(bankName, "bankName");
            ArgumentChecker.ThrowIfNullOrEmpty(branch, "branch");
            ArgumentChecker.ThrowIfNullOrEmpty(accountNumber, "accountNumber");

            this.bankName      = bankName;
            this.branch        = branch;
            this.accountNumber = accountNumber;
        }
Beispiel #9
0
        public EmployeeAdministratorUser(Guid userId, string userName, int employeeId, string displayName, long clientId)
        {
            ArgumentChecker.ThrowIfNullOrEmpty(userName, "userName");
            ArgumentChecker.ThrowIfNullOrEmpty(displayName, "displayName");

            this.userId      = userId;
            this.clientId    = clientId;
            this.userName    = userName;
            this.employeeId  = employeeId;
            this.displayName = displayName;
        }
        public static CallbackParameter Parse(string value)
        {
            ArgumentChecker.ThrowIfNullOrEmpty(value, "value");
            string[] splitValue = value.Split(Separator);
            if (splitValue.Length != 2)
            {
                throw new ArgumentException("Unrecognized CallbackParameter format");
            }

            return(new CallbackParameter(splitValue[0], int.Parse(splitValue[1])));
        }
Beispiel #11
0
        /// <summary>
        /// Parses year month string in yyyy MM format and returns a IDate
        /// for the start of the specified month
        /// </summary>
        public static Date Parse(string yearMonthString)
        {
            ArgumentChecker.ThrowIfNullOrEmpty(yearMonthString, "yearMonthString");
            if (!new Regex(@"^[0-9]{4}\s[0-9]{2}$").IsMatch(yearMonthString))
            {
                throw new ArgumentException("Year Month string is in an incorrect format");
            }

            string[] yearMonthComponents = yearMonthString.Split(' ');
            int      yearComponent       = Convert.ToInt32(yearMonthComponents[0]);
            int      monthComponent      = Convert.ToInt32(yearMonthComponents[1]);

            return(new Date(new DateTime(yearComponent, monthComponent, 1)));
        }
Beispiel #12
0
        public ClientStaffUser(Guid userId, string userName, int employeeId, string displayName, long clientId, long clientNumber, string clientName)
        {
            ArgumentChecker.ThrowIfNullOrEmpty(userName, "userName");
            ArgumentChecker.ThrowIfNullOrEmpty(displayName, "displayName");
            ArgumentChecker.ThrowIfNullOrEmpty(clientName, "clientName");

            this.userId       = userId;
            this.userName     = userName;
            this.employeeId   = employeeId;
            this.displayName  = displayName;
            this.clientId     = clientId;
            this.clientNumber = clientNumber;
            this.clientName   = clientName;
        }
Beispiel #13
0
        public RepurchasesLine(int transactionId, int customerId, int customerNumber, string customerName, string transactionNumber, Date dated, decimal amount, decimal sum, int batchId, Date created, Date modified, string modifiedBy)
        {
            ArgumentChecker.ThrowIfNullOrEmpty(customerName, "customerName");
            ArgumentChecker.ThrowIfNullOrEmpty(modifiedBy, "modifiedBy");

            this.transactionId     = transactionId;
            this.customerId        = customerId;
            this.customerNumber    = customerNumber;
            this.customerName      = customerName;
            this.transactionNumber = transactionNumber;
            this.dated             = dated;
            this.amount            = Math.Abs(amount);
            this.sum        = sum;
            this.batchId    = batchId;
            this.created    = created;
            this.modified   = modified;
            this.modifiedBy = modifiedBy;
        }
        public LikelyRepurchasesLine(int custid, int custNum, string custName, string theTitle, int theAge,
                                     decimal amt, decimal bal, decimal sum, Date thedate, Date procdate, string trans, string trxref)
        {
            ArgumentChecker.ThrowIfNullOrEmpty(customerName, "customerName");

            this.customerid     = custid;
            this.customerNumber = custNum;
            this.customerName   = custName;
            this.title          = theTitle;
            this.age            = theAge;
            this.amount         = amt;
            this.balance        = bal;
            this.sum            = sum;
            this.dated          = thedate;
            this.processed      = procdate;
            this.transaction    = trans;
            this.reference      = trxref;
        }
Beispiel #15
0
        public CreditLine(int transactionId, int customerId, int customerNumber, string customerName, string transactionNumber, IDate dated, decimal amount, decimal sum, int batch, IDate created, IDate modified, string modifiedBy)
            : base(TransactionType.Credit.Type, batch)
        {
            ArgumentChecker.ThrowIfNullOrEmpty(customerName, "customerName");
            ArgumentChecker.ThrowIfNullOrEmpty(transactionNumber, "transactionNumber");
            ArgumentChecker.ThrowIfNullOrEmpty(modifiedBy, "modifiedBy");

            this.transactionId     = transactionId;
            this.customerId        = customerId;
            this.customerNumber    = customerNumber;
            this.customerName      = customerName;
            this.transactionNumber = transactionNumber;
            this.dated             = dated;
            this.amount            = amount;
            this.sum        = sum;
            this.created    = created;
            this.modified   = modified;
            this.modifiedBy = modifiedBy;
        }
Beispiel #16
0
        public CustomerNote(long noteId, Date created, ActivityType activityType, NoteType noteType, string comment,
                            int authorId, string createdByEmployeeName, int modifiedBy, string modifiedByEmployeeName,
                            Date modified, string custName, int customerid, string authorRole, int clientID = 0)
            : base(noteId, created, comment, authorId, createdByEmployeeName, modifiedBy, modifiedByEmployeeName, modified)
        {
            ArgumentChecker.ThrowIfNullOrEmpty(createdByEmployeeName, "createdByEmployeeName");

            this.activityType = activityType;
            this.noteType     = noteType;
            this.customerId   = customerid;
            this.customerName = custName;
            this.authorRole   = authorRole;
            if (clientID == 0 && SessionWrapper.Instance.Get != null)
            {
                this._clientID = SessionWrapper.Instance.Get.ClientFromQueryString.Id;
            }
            else
            {
                this._clientID = clientID;
            }
        }
Beispiel #17
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;
            }
        }
 public void Debug(string message)
 {
     ArgumentChecker.ThrowIfNullOrEmpty(message, "message");
     log4NetLogger.Debug(message);
     eventLog.WriteEntry(message, EventLogEntryType.Information);
 }
 public void LogError(string message, Exception e)
 {
     ArgumentChecker.ThrowIfNullOrEmpty(message, "message");
     log4NetLogger.Error(message, e);
     eventLog.WriteEntry(GenerateExceptionMessage(e).ToString(), EventLogEntryType.Error);
 }