예제 #1
0
        private void AddLaw(StringBuilder result)
        {
            decimal depositAmount = 350.00M;

            result.Append(string.Format(", we are delighted to offer you a place on our {0}.", CourseRefText));
            result.Append(string.Format("<br/> This offer will be subject to evidence of your qualifying {0} degree at grade: {1}.", DegreeSubject.ToDescription(), DegreeGrade.ToDescription()));
            result.Append(string.Format("<br/> Please contact us as soon as possible to confirm your acceptance of your place and arrange payment of the £{0} deposit fee to secure your place.", depositAmount.ToString()));
            result.Append(string.Format("<br/> We look forward to welcoming you to the University,<br/>"));
        }
예제 #2
0
        public string Process()
        {
            if (DegreeGrade == DegreeGradeEnum.None || DegreeSubject == DegreeSubjectEnum.None || string.IsNullOrWhiteSpace(Faculty) || string.IsNullOrWhiteSpace(CourseCode))
            {
                throw new Exception("Unspecified subject, grade, faculty, or course code!");
            }
            if (string.IsNullOrWhiteSpace(FirstName) || string.IsNullOrWhiteSpace(LastName))
            {
                throw new Exception("Unspecified student name");
            }
            if (!StartDate.HasValue)
            {
                throw new Exception("Unspecified start date for the course");
            }

            // The letter should include some reference
            // The letter does not mention that a VISA is required, where applicable.
            // the DateOfBirth is unused!

            var result = new StringBuilder("<html><body><h1>Your Recent Application from the University of Law</h1>");

            result.Append(string.IsNullOrWhiteSpace(Title) ? $"<p>Dear {FirstName} {LastName},</p>" : $"<p>Dear {Title} {FirstName} {LastName},</p>");

            if (DegreeGrade == DegreeGradeEnum.twoTwo)
            {
                result.Append($"<p>Further to your recent application for our course reference: {CourseCode} starting on {StartDate.Value.ToLongDateString()}, we are writing to inform you that we are currently assessing your information and will be in touch shortly.</p>");
                result.Append($"<br/><p>If you wish to discuss any aspect of your application, please contact us at {ContactEmail}.</p>");
            }
            else
            {
                if (DegreeGrade == DegreeGradeEnum.third)
                {
                    result.Append("<p>Further to your recent application, we are sorry to inform you that you have not been successful on this occasion.</p>");
                    result.Append($"<br/><p>If you wish to discuss the decision further, or discuss the possibility of applying for an alternative course with us, please contact us at {ContactEmail}.</p>");
                }
                else
                {
                    if (DegreeSubject == DegreeSubjectEnum.law || DegreeSubject == DegreeSubjectEnum.lawAndBusiness)
                    {
                        result.Append($"<p>Further to your recent application, we are delighted to offer you a place on our course reference: {CourseCode} starting on {StartDate.Value.ToLongDateString()}.</p>");
                        result.Append($"<br/><p>This offer will be subject to evidence of your qualifying {DegreeSubject.ToDescription()} degree at grade: {DegreeGrade.ToDescription()}.</p>");
                        result.Append($"<br/><p>Please contact us as soon as possible to confirm your acceptance of your place and arrange payment of the &pound;{_depositForLaw:0.00} deposit fee to secure your place.</p>");
                        result.Append("<br/><p>We look forward to welcoming you to the University,</p>");
                    }
                    else
                    {
                        result.Append($"<p>Further to your recent application for our course reference: {CourseCode} starting on {StartDate.Value.ToLongDateString()}, we are writing to inform you that we are currently assessing your information and will be in touch shortly.</p>");
                        result.Append($"<br/><p>If you wish to discuss any aspect of your application, please contact us at {ContactEmail}.</p>");
                    }
                }
            }

            result.Append("<br/><p>Yours sincerely,</p>");
            result.Append($"<p>The Admissions Team, Faculty of {Faculty}</p>");
            result.Append("</body></html>");

            return(result.ToString());
        }
예제 #3
0
        public string Process()
        {
            var result = new StringBuilder("<html><body><h1>Your Recent Application from the University of Law</h1>");

            if (DegreeGrade == DegreeGradeEnum.twoTwo)
            {
                result.Append(string.Format("<p> Dear {0}, </p>", FirstName));
                result.Append(string.Format("<p/> Further to your recent application for our course reference: {0} starting on {1}, we are writing to inform you that we are currently assessing your information and will be in touch shortly.", this.CourseCode, this.StartDate.ToLongDateString()));
                result.Append("<br/> If you wish to discuss any aspect of your application, please contact us at [email protected].");
                result.Append("<br/> Yours sincerely,");
                result.Append("<p/> The Admissions Team,");
            }
            else
            {
                if (DegreeGrade == DegreeGradeEnum.third)
                {
                    result.Append(string.Format("<p> Dear {0}, </p>", FirstName));
                    result.Append("<p/> Further to your recent application, we are sorry to inform you that you have not been successful on this occasion.");
                    result.Append("<br/> If you wish to discuss the decision further, or discuss the possibility of applying for an alternative course with us, please contact us at [email protected].");
                    result.Append("<br> Yours sincerely,");
                    result.Append("<p/> The Admissions Team,");
                }
                else
                {
                    if (DegreeSubject == DegreeSubjectEnum.law || DegreeSubject == DegreeSubjectEnum.lawAndBusiness)
                    {
                        decimal depositAmount = 350.00M;

                        result.Append(string.Format("<p> Dear {0}, </p>", FirstName));
                        result.Append(string.Format("<p/> Further to your recent application, we are delighted to offer you a place on our course reference: {0} starting on {1}.", this.CourseCode, this.StartDate.ToLongDateString()));
                        result.Append(string.Format("<br/> This offer will be subject to evidence of your qualifying {0} degree at grade: {1}.", DegreeSubject.ToDescription(), DegreeGrade.ToDescription()));
                        result.Append(string.Format("<br/> Please contact us as soon as possible to confirm your acceptance of your place and arrange payment of the £{0} deposit fee to secure your place.", depositAmount.ToString()));
                        result.Append(string.Format("<br/> We look forward to welcoming you to the University,"));
                        result.Append(string.Format("<br/> Yours sincerely,"));
                        result.Append(string.Format("<p/> The Admissions Team,"));
                    }
                    else
                    {
                        result.Append(string.Format("<p> Dear {0}, </p>", FirstName));
                        result.Append(string.Format("<p/> Further to your recent application for our course reference: {0} starting on {1}, we are writing to inform you that we are currently assessing your information and will be in touch shortly.", this.CourseCode, this.StartDate.ToLongDateString()));
                        result.Append("<br/> If you wish to discuss any aspect of your application, please contact us at [email protected].");
                        result.Append("<br/> Yours sincerely,");
                        result.Append("<p/> The Admissions Team,");
                    }
                }
            }

            result.Append(string.Format("</body></html>"));

            return(result.ToString());
        }