コード例 #1
0
 public OctopusContractSaveException(OctopusContractSaveExceptionEnum exceptionCode)
 {
     _code = FindException(exceptionCode);
 }
コード例 #2
0
        private static string FindException(OctopusContractSaveExceptionEnum exceptionId)
        {
            string returned = String.Empty;
            switch(exceptionId)
            {
                case OctopusContractSaveExceptionEnum.ContractIsNull:
                    returned = "ContractExceptionContractIsNull.Text";
                    break;

                case OctopusContractSaveExceptionEnum.AmountIsNull:
                    returned = "ContractExceptionAmountIsNull.Text";
                    break;

                case OctopusContractSaveExceptionEnum.EntryFeesIsNull:
                    returned = "ContractExceptionEntryFeesIsNull.Text";
                    break;

                case OctopusContractSaveExceptionEnum.AnticipatedRepaymentPenaltiesIsNull:
                    returned = "ContractExceptionAnticipatedRepaymentPenaltiesIsNull.Text";
                    break;

                case OctopusContractSaveExceptionEnum.NonRepaymentPenaltiesIsNull:
                    returned = "ContractExceptionNonRepaymentPenaltiesIsNull.Text";
                    break;

                case OctopusContractSaveExceptionEnum.NumberOfInstallmentIsNull:
                    returned = "ContractExceptionNumberOfInstallmentsIsNull.Text";
                    break;

                case OctopusContractSaveExceptionEnum.GracePeriodIsNull:
                    returned = "ContractExceptionGracePeriodIsNull.Text";
                    break;

                case OctopusContractSaveExceptionEnum.InterestRateIsNull:
                    returned = "ContractExceptionInterestRateIsNull.Text";
                    break;

                case OctopusContractSaveExceptionEnum.InstallmentTypeIsNull:
                    returned = "ContractExceptionInstallmentTypeIsNull.Text";
                    break;

                case OctopusContractSaveExceptionEnum.FundingLineIsNull:
                    returned = "ContractExceptionFundingLineIsNull.Text";
                    break;

                case OctopusContractSaveExceptionEnum.LoanOfficerIsNull:
                    returned = "ContractExceptionLoanOfficerIsNull.Text";
                    break;

                case OctopusContractSaveExceptionEnum.BeneficiaryIsNull:
                    returned = "ContractExceptionBeneficiaryIsNull.Text";
                    break;

                case OctopusContractSaveExceptionEnum.BeneficiaryIsActive:
                    returned = "ContractExceptionBeneficiaryIsActive.Text";
                    break;

                case OctopusContractSaveExceptionEnum.DisburseIsNull:
                    returned = "ContractExceptionDisburseDate.Text";
                    break;

                case OctopusContractSaveExceptionEnum.BeneficiaryIsBad:
                    returned = "ContractExceptionBeneficiaryIsBad.Text";
                    break;

                case OctopusContractSaveExceptionEnum.EventIsNull:
                    returned = "ContractExceptionEventIsNull.Text";
                    break;

                case OctopusContractSaveExceptionEnum.EventNotCancelable:
                    returned = "ContractExceptionEventNotCancelable.Text";
                    break;

                case OctopusContractSaveExceptionEnum.EventCommentIsEmpty:
                    returned = "ContractExceptionEventCommentIsEmpty.Text";
                    break;

                case OctopusContractSaveExceptionEnum.BeneficiaryIsAllowOneLoans:
                    returned = "ContractExceptionBeneficiaryIsAllowOneLoans.Text";
                    break;

                case OctopusContractSaveExceptionEnum.ProjectIsNull:
                    returned = "ContractExceptionProjectIsNull.Text";
                    break;

                case OctopusContractSaveExceptionEnum.CorporateIsNull:
                    returned = "ContractExceptionCorporateIsNull.Text";
                    break;

                case OctopusContractSaveExceptionEnum.CreditCommiteeCommentNotModified:
                    returned = "ContractExceptionCreditCommiteeCommentNotModified.Text";
                    break;

                case OctopusContractSaveExceptionEnum.StatusNotModified:
                    returned = "ContractExceptionStatusNotModified.Text";
                    break;
                case OctopusContractSaveExceptionEnum.CurrencyMisMatch:
                    returned = "CurrencyMisMatch.Text";
                    break;
                case OctopusContractSaveExceptionEnum.LoanShareAmountIsEmpty:
                    returned = "LoanShareAmountIsEmpty.Text";
                    break;
                case OctopusContractSaveExceptionEnum.LoanWasValidatedLaterThanDisbursed:
                    returned = "LoanWasValidatedLaterThanDisbursed.Text";
                    break;
                case OctopusContractSaveExceptionEnum.TrancheDate:
                    returned = "TrancheDateError.Text";
                    break;
                case OctopusContractSaveExceptionEnum.TrancheAmount:
                    returned = "TrancheAmountError.Text";
                    break;
                case OctopusContractSaveExceptionEnum.LoanHasNoCompulsorySavings:
                    returned = "LoanHasNoCompulsorySavingsError.Text";
                    break;
            }
            return returned;
        }