Example #1
0
        public LoanProduct FindProductByName(string name)
        {
            LoanProduct product = _productManager.SelectByName(name);

            if (product == null)
            {
                return(null);
            }
            if (product.FundingLine != null)
            {
                product.FundingLine = _fundingLineManager.SelectFundingLineById(product.FundingLine.Id, false);
            }
            if (product.UseEntryFeesCycles)
            {
                product.EntryFeeCycles = _productManager.SelectEntryFeeCycles(product.Id, false);
                product.EntryFees      = _productManager.SelectEntryFeesWithCycles(product.Id, false);
            }
            else
            {
                product.EntryFees = _productManager.SelectEntryFeesWithoutCycles(product.Id, false);
            }
            return(product);
        }