private void SetupGradeAndFinancialDueDate(FinancialReviewDetails financialReviewDetails)
        {
            FinancialReviewDetails = financialReviewDetails ?? new FinancialReviewDetails();

            OutstandingFinancialDueDate  = new FinancialDueDate();
            GoodFinancialDueDate         = new FinancialDueDate();
            SatisfactoryFinancialDueDate = new FinancialDueDate();

            if (FinancialReviewDetails.FinancialDueDate.HasValue)
            {
                var day   = FinancialReviewDetails.FinancialDueDate.Value.Day.ToString();
                var month = FinancialReviewDetails.FinancialDueDate.Value.Month.ToString();
                var year  = FinancialReviewDetails.FinancialDueDate.Value.Year.ToString();

                switch (FinancialReviewDetails.SelectedGrade)
                {
                case FinancialApplicationSelectedGrade.Outstanding:
                    OutstandingFinancialDueDate = new FinancialDueDate {
                        Day = day, Month = month, Year = year
                    };
                    break;

                case FinancialApplicationSelectedGrade.Good:
                    GoodFinancialDueDate = new FinancialDueDate {
                        Day = day, Month = month, Year = year
                    };
                    break;

                case FinancialApplicationSelectedGrade.Satisfactory:
                    SatisfactoryFinancialDueDate = new FinancialDueDate {
                        Day = day, Month = month, Year = year
                    };
                    break;

                default:
                    break;
                }
            }

            if (FinancialReviewDetails.SelectedGrade == FinancialApplicationSelectedGrade.Inadequate)
            {
                InadequateComments         = FinancialReviewDetails.Comments;
                InadequateExternalComments = FinancialReviewDetails.ExternalComments;
            }
            else if (FinancialReviewDetails.SelectedGrade == FinancialApplicationSelectedGrade.Clarification)
            {
                ClarificationComments = FinancialReviewDetails.Comments;
            }
        }
Exemple #2
0
        private void SetupGradeAndFinancialDueDate(FinancialGrade grade)
        {
            Grade = grade ?? new FinancialGrade();

            OutstandingFinancialDueDate  = new FinancialDueDate();
            GoodFinancialDueDate         = new FinancialDueDate();
            SatisfactoryFinancialDueDate = new FinancialDueDate();
            MonitoringFinancialDueDate   = new FinancialDueDate();

            if (Grade.FinancialDueDate.HasValue)
            {
                var day   = Grade.FinancialDueDate.Value.Day.ToString();
                var month = Grade.FinancialDueDate.Value.Month.ToString();
                var year  = Grade.FinancialDueDate.Value.Year.ToString();

                switch (Grade.SelectedGrade)
                {
                case FinancialApplicationSelectedGrade.Outstanding:
                    OutstandingFinancialDueDate = new FinancialDueDate {
                        Day = day, Month = month, Year = year
                    };
                    break;

                case FinancialApplicationSelectedGrade.Good:
                    GoodFinancialDueDate = new FinancialDueDate {
                        Day = day, Month = month, Year = year
                    };
                    break;

                case FinancialApplicationSelectedGrade.Satisfactory:
                    SatisfactoryFinancialDueDate = new FinancialDueDate {
                        Day = day, Month = month, Year = year
                    };
                    break;

                case FinancialApplicationSelectedGrade.Monitoring:
                    MonitoringFinancialDueDate = new FinancialDueDate {
                        Day = day, Month = month, Year = year
                    };
                    break;

                default:
                    break;
                }
            }
        }