Exemplo n.º 1
0
        public int calculateRiskProfileAbility(RiskProfile profile)
        {
            int measuringRiskTakingAbilityQuestion = 0;
            if (profile.measuringRiskTakingAbilityQuestion1 != null)
                measuringRiskTakingAbilityQuestion += Convert.ToInt32(profile.measuringRiskTakingAbilityQuestion1);

            if (profile.measuringRiskTakingAbilityQuestion2 != null)
                measuringRiskTakingAbilityQuestion += Convert.ToInt32(profile.measuringRiskTakingAbilityQuestion2);

            if (profile.measuringRiskTakingAbilityQuestion3 != null)
                measuringRiskTakingAbilityQuestion += Convert.ToInt32(profile.measuringRiskTakingAbilityQuestion3);

            if (profile.measuringRiskTakingAbilityQuestion4 != null)
                measuringRiskTakingAbilityQuestion += Convert.ToInt32(profile.measuringRiskTakingAbilityQuestion4);

            if (measuringRiskTakingAbilityQuestion < 7)
                return 0;
            else if (measuringRiskTakingAbilityQuestion >= 7 && measuringRiskTakingAbilityQuestion <= 10)
                return 1;
            else if (measuringRiskTakingAbilityQuestion > 10 && measuringRiskTakingAbilityQuestion <= 14)
                return 2;
            else if (measuringRiskTakingAbilityQuestion > 14 && measuringRiskTakingAbilityQuestion <= 17)
                return 3;
            else if (measuringRiskTakingAbilityQuestion > 17 && measuringRiskTakingAbilityQuestion <= 20)
                return 4;
            else
                return 0;
        }
Exemplo n.º 2
0
        public int calculateRiskProfileApetite(RiskProfile profile)
        {
            int riskProfileApetite = 0;
            if (profile.riskApetiteQuestion1 != null)
                riskProfileApetite += Convert.ToInt32(profile.riskApetiteQuestion1);

            if (profile.riskApetiteQuestion2 != null)
                riskProfileApetite += Convert.ToInt32(profile.riskApetiteQuestion2);

            if (profile.riskApetiteQuestion3 != null)
                riskProfileApetite += Convert.ToInt32(profile.riskApetiteQuestion3);

            if (profile.riskApetiteQuestion4 != null)
                riskProfileApetite += Convert.ToInt32(profile.riskApetiteQuestion4);

            if (riskProfileApetite < 0)
                return 0;
            else if (riskProfileApetite >= 0 && riskProfileApetite <= 8)
                return 1;
            else if (riskProfileApetite > 8 && riskProfileApetite <= 17)
                return 2;
            else if (riskProfileApetite > 17 && riskProfileApetite <= 22)
                return 3;
            else if (riskProfileApetite > 22 && riskProfileApetite <= 26)
                return 4;
            else if (riskProfileApetite > 26 && riskProfileApetite <= 32)
                return 5;
            else
                return 0;
        }
Exemplo n.º 3
0
        public RiskProfile populateRiskProfile(RiskProfileAnalysis RiskProfileDetails)
        {
            RiskProfile profile = new RiskProfile();
            if (RiskProfileDetails.riskApetiteQuestion1option1 == "true")
                profile.riskApetiteQuestion1 = "-16";
            if (RiskProfileDetails.riskApetiteQuestion1option2 == "true")
                profile.riskApetiteQuestion1 = "-3";
            if (RiskProfileDetails.riskApetiteQuestion1option3 == "true")
                profile.riskApetiteQuestion1 = "2";
            if (RiskProfileDetails.riskApetiteQuestion1option4 == "true")
                profile.riskApetiteQuestion1 = "8";
            if (RiskProfileDetails.riskApetiteQuestion1option5 == "true")
                profile.riskApetiteQuestion1 = "12";
            if (RiskProfileDetails.riskApetiteQuestion1option6 == "true")
                profile.riskApetiteQuestion1 = "16";

            if (RiskProfileDetails.riskApetiteQuestion2option1 == "true")
                profile.riskApetiteQuestion2 = "1";
            if (RiskProfileDetails.riskApetiteQuestion2option2 == "true")
                profile.riskApetiteQuestion2 = "2";
            if (RiskProfileDetails.riskApetiteQuestion2option3 == "true")
                profile.riskApetiteQuestion2 = "4";
            if (RiskProfileDetails.riskApetiteQuestion2option4 == "true")
                profile.riskApetiteQuestion2 = "5";

            if (RiskProfileDetails.riskApetiteQuestion3option1 == "true")
                profile.riskApetiteQuestion3 = "-4";
            if (RiskProfileDetails.riskApetiteQuestion3option2 == "true")
                profile.riskApetiteQuestion3 = "1";
            if (RiskProfileDetails.riskApetiteQuestion3option3 == "true")
                profile.riskApetiteQuestion3 = "4";
            if (RiskProfileDetails.riskApetiteQuestion3option4 == "true")
                profile.riskApetiteQuestion3 = "5";
            if (RiskProfileDetails.riskApetiteQuestion3option5 == "true")
                profile.riskApetiteQuestion3 = "6";

            if (RiskProfileDetails.riskApetiteQuestion4option1 == "true")
                profile.riskApetiteQuestion4 = "1";
            if (RiskProfileDetails.riskApetiteQuestion4option2 == "true")
                profile.riskApetiteQuestion4 = "3";
            if (RiskProfileDetails.riskApetiteQuestion4option3 == "true")
                profile.riskApetiteQuestion4 = "5";

            if (RiskProfileDetails.measuringRiskTakingAbilityQuestion1option1 == "true")
                profile.measuringRiskTakingAbilityQuestion1 = "-3";
            if (RiskProfileDetails.measuringRiskTakingAbilityQuestion1option2 == "true")
                profile.measuringRiskTakingAbilityQuestion1 = "0";
            if (RiskProfileDetails.measuringRiskTakingAbilityQuestion1option3 == "true")
                profile.measuringRiskTakingAbilityQuestion1 = "3";
            if (RiskProfileDetails.measuringRiskTakingAbilityQuestion1option4 == "true")
                profile.measuringRiskTakingAbilityQuestion1 = "5";

            if (RiskProfileDetails.measuringRiskTakingAbilityQuestion2option1 == "true")
                profile.measuringRiskTakingAbilityQuestion2 = "0";
            if (RiskProfileDetails.measuringRiskTakingAbilityQuestion2option2 == "true")
                profile.measuringRiskTakingAbilityQuestion2 = "3";
            if (RiskProfileDetails.measuringRiskTakingAbilityQuestion2option3 == "true")
                profile.measuringRiskTakingAbilityQuestion2 = "5";

            if (RiskProfileDetails.measuringRiskTakingAbilityQuestion3option1 == "true")
                profile.measuringRiskTakingAbilityQuestion3 = "0";
            if (RiskProfileDetails.measuringRiskTakingAbilityQuestion3option2 == "true")
                profile.measuringRiskTakingAbilityQuestion3 = "2";
            if (RiskProfileDetails.measuringRiskTakingAbilityQuestion3option3 == "true")
                profile.measuringRiskTakingAbilityQuestion3 = "3";
            if (RiskProfileDetails.measuringRiskTakingAbilityQuestion3option4 == "true")
                profile.measuringRiskTakingAbilityQuestion3 = "5";

            if (RiskProfileDetails.measuringRiskTakingAbilityQuestion4option1 == "true")
                profile.measuringRiskTakingAbilityQuestion4 = "0";
            if (RiskProfileDetails.measuringRiskTakingAbilityQuestion4option2 == "true")
                profile.measuringRiskTakingAbilityQuestion4 = "2";
            if (RiskProfileDetails.measuringRiskTakingAbilityQuestion4option3 == "true")
                profile.measuringRiskTakingAbilityQuestion4 = "3";
            if (RiskProfileDetails.measuringRiskTakingAbilityQuestion4option4 == "true")
                profile.measuringRiskTakingAbilityQuestion4 = "5";

            return profile;
        }