Beispiel #1
0
        public static string getiMingleDescription(this int marketBrand, Referral referral)
        {
            string discountText = "";

            if (marketBrand == 1 || marketBrand == 0)
            {
                discountText = "Kemper Direct";
            }
            else if (marketBrand == 2)
            {
                discountText = "iMingle Network Discount";
            }
            else if (marketBrand == 3)
            {
                discountText = "Teachers' Network™ Discount";
            }
            if (referral != null)
            {
                string firstName = StringExtensions.CapitalizeFirstLetter(referral.FirstName);
                string lastName  = StringExtensions.CapitalizeFirstLetter(referral.LastName);
                if (marketBrand == 2)
                {
                    return("You have already been connected to " + firstName + " " + lastName + "'s policy.  Once you buy and agree to the Safety Pledge, you get a 10% discount and " + firstName + "'s 10% discount is locked in.  High Five’s all around!");
                }
                else
                {
                    return("When you buy your policy, " + firstName + " " + lastName + "’s discount will be locked in as well. We'll give you a tool to help more friends join the savings too!");
                }
            }
            if (marketBrand == 2)
            {
                return("Bring a friend to iMingle (you’ll have 40 days), and if they purchase a policy and take the Safety Pledge … Bam!  You get a 10% discount and they get a 10% discount.  High-fives all around!");
            }
            else
            {
                return("You will have 40 days from the day you buy your policy to establish your " + discountText + " by bringing another policyholder to " + GetCompanyName(marketBrand) + ". Don’t worry. It’s easy, and we’ll help you.");
            }
        }
Beispiel #2
0
        //rules taken from Flex UDQuoteLibrary DiscountServices.as
        public static string FormatDiscountDescription(string input, int marketBrand, Referral referral)
        {
            if (input == null)
            {
                return(null);
            }

            string result;

            result = input.Replace("{iMingleDescription}", getiMingleDescription(marketBrand, referral));
            result = result.Replace("{CompanyName}", GetCompanyName(marketBrand));
            result = result.Replace("{Group}", GetGroupName(marketBrand));
            result = result.Replace("<sup>™</sup>", "™");
            result = result.Replace("<sup>®</sup>", "™");
            result = result.Replace("<sup>&trade;</sup>", "™");
            result = result.Replace("<sup>&reg;</sup>", "™");
            result = result.Replace("&lt;span style='font-weight:bold;'&gt;", "");
            result = result.Replace("<span style='font-weight:bold;'>", "");
            result = result.Replace("&lt;/span&gt;", "");
            result = result.Replace("</span>", "");
            result = result.Replace("&amp;nbsp;", " ");
            result = result.Replace("&nbsp;", " ");
            result = result.Replace("[Kemper Direct/Teachers/Partnership Direct]", GetGroupName(marketBrand));
            if (result == "iMingle Network<sup>&trade;</sup> Discount" || result == "iMingle Network<sup>&reg;</sup> Discount" || result == "iMingle Network™")
            {
                if (marketBrand == 1 || marketBrand == 0)
                {
                    result = "Network Discount";
                }
                else if (marketBrand == 3)
                {
                    result = "Teachers' Network™ Discount";
                }
            }
            return(result);
        }