Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string caseId = Request.QueryString["caseId"].ToString();

            RiskProfileDAO dao = new RiskProfileDAO();
            RiskProfileAnalysis riskProfileAnalysis = dao.getRiskProfileForCase(caseId);
            String url = "~/_layouts/Zurich/images/Content/";

            String core_image = "";
            String non_core_image = "";

            switch (riskProfileAnalysis.riskProfileName)
            {

                case "Adventurous":
                    {
                        core_image = "core_adventurous.png";
                        non_core_image = "noncore_adventurous.png";
                        break;
                    }
                case "Balanced":
                    {
                        core_image = "core_balanced.png";
                        non_core_image = "noncore_balanced.png";
                        break;
                    }
                case "Cautious":
                    {
                        core_image = "core_cautious.png";
                        non_core_image = "noncore_cautious.png";
                        break;
                    }
                case "Moderately Adventurous":
                    {
                        core_image = "core_moderately_adventorous.png";
                        non_core_image = "noncore_moderately_adventurous.png";
                        break;
                    }
                case "Moderately Cautious":
                    {
                        core_image = "core_moderately_cautious.png";
                        non_core_image = "noncore_moderately_cautious.png";
                        break;
                    }
                default:
                    {
                        core_image = "";
                        non_core_image = "";
                        break;
                    }
            }

            String coreurl = url + core_image;
            String noncoreurl = url + non_core_image;

            sectionAImage.ImageUrl = coreurl;
            sectionBImage.ImageUrl = noncoreurl;
        }
Ejemplo n.º 2
0
        protected void riskProfileSubmit(object sender, EventArgs e)
        {
            string caseId = "";
            if (ViewState["caseId"] != null)
            {
                caseId = ViewState["caseId"].ToString();
            }

            caseNumber.Value = caseId;

            RiskProfileAnalysis riskProfile = new RiskProfileAnalysis();

            RiskProfileDAO dao = new RiskProfileDAO();

            RiskProfileAnalysis riskProfileAnalysis = dao.getRiskProfileForCase(caseId);

            string status = "new";

            if (riskProfileAnalysis != null)
            {
                status = "update";
                copyRiskProfileBaseClass(riskProfile);

            }
            else
            {
                riskProfile.caseId = caseId;
                copyRiskProfileBaseClass(riskProfile);
            }

            if (status == "new")
            {
                dao.saveNewRiskProfile(riskProfile);
            }
            else
            {
                riskProfile.caseId = caseId;
                dao.updateRiskProfileDetails(riskProfile, "riskApetite");
            }

            string actv = "";
            if (ViewState["activity"] != null)
            {
                actv = ViewState["activity"].ToString();
            }

            string cstatus = activityStatusCheck.getRiskProfileStatus(riskProfile);
            activityStatusDao.saveOrUpdateActivityStatus(caseId, actv, cstatus);

            PortFolioModellingDAO poftFolioDAO = new PortFolioModellingDAO();
            poftFolioDAO.DeletePoftFolioBuilderForCapitalPreservation(caseId);

            markStatusOnTab(caseId);

            string caseStatus = activityStatusCheck.getZPlanStatus(caseId);

            string url = Server.MapPath("~/_layouts/Zurich/Printpages/");
            pdfData = activityStatusCheck.sendDataToSalesPortal(caseId, caseStatus, url, sendPdf);

            populateRiskProfile(riskProfile,caseId);
            riskProfileSaveSuccess.Visible = true;
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            activity = activityStatusDao.getActivity(9);
            ViewState["activity"] = activity;
            riskProfileSaveSuccess.Visible = false;

            if (!IsPostBack)
            {
                string nextCaseId = Request.Form["caseid"];
                string menuCaseId = Request.QueryString["caseid"];
                string helperUsed = Request.Form["helperUsed"];

                if (nextCaseId != null && nextCaseId != "")
                {
                    caseId = nextCaseId;
                }

                if (menuCaseId != null && menuCaseId != "")
                {
                    caseId = menuCaseId;
                }

                if (Session["fnacaseid"] != null)
                {
                    caseId = Session["fnacaseid"].ToString();
                }

                //string url = "popitup('/_layouts/Zurich/RiskProfile/ShowPortfolioModel.aspx?caseId=" + caseId + "');";
                //ShowPortfolioModelButton.Attributes.Add("onClick", url);

                ViewState["caseId"] = caseId;
                activityId.Value = caseId;
                RiskProfileDAO dao = new RiskProfileDAO();
                RiskProfileAnalysis riskProfileAnalysis=null;
                if (caseId != null || caseId != "")
                {
                    riskProfileAnalysis = dao.getRiskProfileForCase(caseId);

                }

                if (riskProfileAnalysis != null)
                {
                    populateRiskProfile(riskProfileAnalysis, caseId);
                }

            }

            markStatusOnTab(caseId);
        }
Ejemplo n.º 4
0
        public List<string> printErrorMessages(RiskProfileAnalysis riskProfileAnalysis)
        {
            List<string> list = new List<string>();

            if (riskProfileAnalysis != null)
            {
                RiskProfileDAO dao = new RiskProfileDAO();
                DAO.DTO.RiskProfile profile= dao.populateRiskProfile(riskProfileAnalysis);
                Utility.checkEmptyField(profile.riskApetiteQuestion1, list, "Please enter the Risk Appetite Question 1");
                Utility.checkEmptyField(profile.riskApetiteQuestion2, list, "Please enter the Risk Appetite Question 2");
                Utility.checkEmptyField(profile.riskApetiteQuestion3, list, "Please enter the Risk Appetite Question 3");
                Utility.checkEmptyField(profile.riskApetiteQuestion4, list, "Please enter the Risk Appetite Question 4");
                Utility.checkEmptyField(profile.measuringRiskTakingAbilityQuestion1, list, "Please enter the risk Taking Ability Question 5");
                Utility.checkEmptyField(profile.measuringRiskTakingAbilityQuestion2, list, "Please enter the risk Taking Ability Question 6");
                Utility.checkEmptyField(profile.measuringRiskTakingAbilityQuestion3, list, "Please enter the risk Taking Ability Question 7");
                Utility.checkEmptyField(profile.measuringRiskTakingAbilityQuestion4, list, "Please enter the risk Taking Ability Question 8");

            }
            return list;
        }
Ejemplo n.º 5
0
        public void populateRiskProfile(RiskProfileAnalysis riskProfile,string caseId)
        {
            int riskApetiteQuestions = 0;
            int riskTakingAbilityQuestions = 0;

            int riskApetiteQuestionsScore = 0;
            int riskTakingAbilityquestionsScore = 0;

            RiskProfileDAO dao = new RiskProfileDAO();

            RiskProfileAnalysis riskProfileAnalysis = dao.getRiskProfileForCase(riskProfile.caseId);

            if (riskProfileAnalysis.riskApetiteQuestion1option1 == "true")
            {
                riskApetiteQuestions += 1;
                riskApetiteQuestionsScore += -16;
                riskApetiteQuestion1option1.Checked = true;
            }

            if (riskProfileAnalysis.riskApetiteQuestion1option2 == "true")
            {
                riskApetiteQuestionsScore += -3;
                riskApetiteQuestions += 1;
                riskApetiteQuestion1option2.Checked = true;
            }

            if (riskProfileAnalysis.riskApetiteQuestion1option3 == "true")
            {
                riskApetiteQuestionsScore += 2;
                riskApetiteQuestions += 1;
                riskApetiteQuestion1option3.Checked = true;
            }

            if (riskProfileAnalysis.riskApetiteQuestion1option4 == "true")
            {
                riskApetiteQuestionsScore += 8;
                riskApetiteQuestions += 1;
                riskApetiteQuestion1option4.Checked = true;
            }
            if (riskProfileAnalysis.riskApetiteQuestion1option5 == "true")
            {
                riskApetiteQuestionsScore += 12;
                riskApetiteQuestions += 1;
                riskApetiteQuestion1option5.Checked = true;
            }

            if (riskProfileAnalysis.riskApetiteQuestion1option6 == "true")
            {
                riskApetiteQuestionsScore += 16;
                riskApetiteQuestions += 1;
                riskApetiteQuestion1option6.Checked = true;
            }

            if (riskProfileAnalysis.riskApetiteQuestion2option1 == "true")
            {
                riskApetiteQuestionsScore += 1;
                riskApetiteQuestions += 1;
                riskApetiteQuestion2option1.Checked = true;
            }

            if (riskProfileAnalysis.riskApetiteQuestion2option2 == "true")
            {
                riskApetiteQuestionsScore += 2;
                riskApetiteQuestions += 1;
                riskApetiteQuestion2option2.Checked = true;
            }

            if (riskProfileAnalysis.riskApetiteQuestion2option3 == "true")
            {
                riskApetiteQuestionsScore += 4;
                riskApetiteQuestions += 1;
                riskApetiteQuestion2option3.Checked = true;
            }

            if (riskProfileAnalysis.riskApetiteQuestion2option4 == "true")
            {
                riskApetiteQuestionsScore += 5;
                riskApetiteQuestions += 1;
                riskApetiteQuestion2option4.Checked = true;
            }

            if (riskProfileAnalysis.riskApetiteQuestion3option1 == "true")
            {
                riskApetiteQuestionsScore += -4;
                riskApetiteQuestions += 1;
                riskApetiteQuestion3option1.Checked = true;
            }

            if (riskProfileAnalysis.riskApetiteQuestion3option2 == "true")
            {
                riskApetiteQuestionsScore += 1;
                riskApetiteQuestions += 1;
                riskApetiteQuestion3option2.Checked = true;
            }

            if (riskProfileAnalysis.riskApetiteQuestion3option3 == "true")
            {
                riskApetiteQuestionsScore += 4;
                riskApetiteQuestions += 1;
                riskApetiteQuestion3option3.Checked = true;
            }

            if (riskProfileAnalysis.riskApetiteQuestion3option4 == "true")
            {
                riskApetiteQuestionsScore += 5;
                riskApetiteQuestions += 1;
                riskApetiteQuestion3option4.Checked = true;
            }

            if (riskProfileAnalysis.riskApetiteQuestion3option5 == "true")
            {
                riskApetiteQuestionsScore += 6;
                riskApetiteQuestions += 1;
                riskApetiteQuestion3option5.Checked = true;
            }

            if (riskProfileAnalysis.riskApetiteQuestion4option1 == "true")
            {
                riskApetiteQuestionsScore += 1;
                riskApetiteQuestions += 1;
                riskApetiteQuestion4option1.Checked = true;
            }

            if (riskProfileAnalysis.riskApetiteQuestion4option2 == "true")
            {
                riskApetiteQuestionsScore += 3;
                riskApetiteQuestions += 1;
                riskApetiteQuestion4option2.Checked = true;
            }

            if (riskProfileAnalysis.riskApetiteQuestion4option3 == "true")
            {
                riskApetiteQuestionsScore += 5;
                riskApetiteQuestions += 1;
                riskApetiteQuestion4option3.Checked = true;
            }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion1option1 == "true")
            {
                riskTakingAbilityquestionsScore += -3;
                riskTakingAbilityQuestions += 1;
                measuringRiskTakingAbilityQuestion1option1.Checked = true;
            }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion1option2 == "true")
            {
                riskTakingAbilityquestionsScore += 0;
                riskTakingAbilityQuestions += 1;
                measuringRiskTakingAbilityQuestion1option2.Checked = true;
            }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion1option3 == "true")
            {
                riskTakingAbilityquestionsScore += 3;
                riskTakingAbilityQuestions += 1;
                measuringRiskTakingAbilityQuestion1option3.Checked = true;
            }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion1option4 == "true")
            {
                riskTakingAbilityquestionsScore += 5;
                riskTakingAbilityQuestions += 1;
                measuringRiskTakingAbilityQuestion1option4.Checked = true;
            }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion2option1 == "true")
            {
                riskTakingAbilityquestionsScore += 0;
                riskTakingAbilityQuestions += 1;
                measuringRiskTakingAbilityQuestion2option1.Checked = true;
            }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion2option2 == "true")
            {
                riskTakingAbilityquestionsScore += 3;
                riskTakingAbilityQuestions += 1;
                measuringRiskTakingAbilityQuestion2option2.Checked = true;
            }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion2option3 == "true")
            {
                riskTakingAbilityquestionsScore += 5;
                riskTakingAbilityQuestions += 1;
                measuringRiskTakingAbilityQuestion2option3.Checked = true;
            }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion3option1 == "true")
            {
                riskTakingAbilityquestionsScore += 0;
                riskTakingAbilityQuestions += 1;
                measuringRiskTakingAbilityQuestion3option1.Checked = true;
            }
            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion3option2 == "true")
            {
                riskTakingAbilityquestionsScore += 2;
                riskTakingAbilityQuestions += 1;
                measuringRiskTakingAbilityQuestion3option2.Checked = true;
            }
            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion3option3 == "true")
            {
                riskTakingAbilityquestionsScore += 3;
                riskTakingAbilityQuestions += 1;
                measuringRiskTakingAbilityQuestion3option3.Checked = true;
            }
            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion3option4 == "true")
            {
                riskTakingAbilityquestionsScore += 5;
                riskTakingAbilityQuestions += 1;
                measuringRiskTakingAbilityQuestion3option4.Checked = true;
            }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion4option1 == "true")
            {
                riskTakingAbilityquestionsScore += 0;
                riskTakingAbilityQuestions += 1;
                measuringRiskTakingAbilityQuestion4option1.Checked = true;
            }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion4option2 == "true")
            {
                riskTakingAbilityquestionsScore += 2;
                riskTakingAbilityQuestions += 1;
                measuringRiskTakingAbilityQuestion4option2.Checked = true;
            }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion4option3 == "true")
            {
                riskTakingAbilityquestionsScore += 3;
                riskTakingAbilityQuestions += 1;
                measuringRiskTakingAbilityQuestion4option3.Checked = true;
            }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion4option4 == "true")
            {
                riskTakingAbilityquestionsScore += 5;
                riskTakingAbilityQuestions += 1;
                measuringRiskTakingAbilityQuestion4option4.Checked = true;
            }

            if (riskProfileAnalysis.agreeWithRiskProfileoption2 == "true")
            {
                isPreferredRiskProfile.Value = "true";
            }
            else
                isPreferredRiskProfile.Value = "false";

            if (riskProfileAnalysis != null)
            {
                if (riskApetiteQuestions == 4)
                riskTakingAppetiteLabel.InnerText = riskApetiteQuestionsScore + "";

                if (riskTakingAbilityQuestions == 4)
                riskTakingAbilityLabel.InnerText = riskTakingAbilityquestionsScore + "";
                if (riskProfileAnalysis.riskProfileName != null)
                {
                    if ((riskApetiteQuestions == 4) && (riskTakingAbilityQuestions == 4))
                    {
                        finalRiskProfile.InnerText = riskProfileAnalysis.riskProfileName;
                    }
                }
            }

            activityId.Value = caseId;
            if (riskProfileAnalysis != null)
            {
                List<string> errors = printErrorMessages(riskProfileAnalysis);
                this.ErrorRepeater.DataSource = errors;
                this.ErrorRepeater.DataBind();
            }
        }
Ejemplo n.º 6
0
        protected string LoadRiskProfileDetails(string caseID)
        {
            RiskProfileDAO riskProfile = new RiskProfileDAO();
            RiskProfileAnalysis riskProfileDetails = riskProfile.getRiskProfileForCase(caseID);

            if (riskProfileDetails != null)
            {
                if (riskProfileDetails.riskProfileValue != null)
                {
                    ViewState["strRiskProfileID"] = riskProfileDetails.riskProfileValue;
                }
                if (riskProfileDetails.riskProfileName != null)
                {
                    ViewState["strProfileName"] = riskProfileDetails.riskProfileName;
                }

                return riskProfileDetails.riskProfileName;
            }
            else
            {
                return string.Empty;
            }
        }
Ejemplo n.º 7
0
        protected string GetRiskProfileName()
        {
            string strRiskProfileName = string.Empty;
            RiskProfileDAO riskProfile = new RiskProfileDAO();
            RiskProfileAnalysis riskProfileDetails = riskProfile.getRiskProfileForCase(caseID);

            if (riskProfileDetails != null)
            {
                if (riskProfileDetails.riskProfileName != null)
                {
                    strRiskProfileName = riskProfileDetails.riskProfileName;
                }
            }

            return strRiskProfileName;
        }
Ejemplo n.º 8
0
        public void populateRiskProfile(RiskProfileAnalysis riskProfileAnalysis, string caseId)
        {
            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion1option1 == "true")
            {
                measuringRiskTakingAbilityQuestion1option1.Checked = true;
            }

               if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion1option2 == "true")
               {
               measuringRiskTakingAbilityQuestion1option2.Checked = true;
               }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion1option3 == "true")
            {
                measuringRiskTakingAbilityQuestion1option3.Checked = true;
            }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion1option4 == "true")
            {
                measuringRiskTakingAbilityQuestion1option4.Checked = true;
            }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion2option1 == "true")
            {
                measuringRiskTakingAbilityQuestion2option1.Checked = true;
            }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion2option2 == "true")
            {
                measuringRiskTakingAbilityQuestion2option2.Checked = true;
            }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion2option3 == "true")
            {
                measuringRiskTakingAbilityQuestion2option3.Checked = true;
            }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion3option1 == "true")
            {
                measuringRiskTakingAbilityQuestion3option1.Checked = true;
            }
            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion3option2 == "true")
            {
                measuringRiskTakingAbilityQuestion3option2.Checked = true;
            }
            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion3option3 == "true")
            {
                measuringRiskTakingAbilityQuestion3option3.Checked = true;
            }
            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion3option4 == "true")
            {
                measuringRiskTakingAbilityQuestion3option4.Checked = true;
            }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion4option1 == "true")
            {
                measuringRiskTakingAbilityQuestion4option1.Checked = true;
            }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion4option2 == "true")
            {
                measuringRiskTakingAbilityQuestion4option2.Checked = true;
            }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion4option3 == "true")
            {
                measuringRiskTakingAbilityQuestion4option3.Checked = true;
            }

            if (riskProfileAnalysis.measuringRiskTakingAbilityQuestion4option4 == "true")
            {
                measuringRiskTakingAbilityQuestion4option4.Checked = true;
            }

            if (riskProfileAnalysis.agreeWithRiskProfileoption2 == "true")
            {
                isPreferredRiskProfile.Value = "true";
            }
            else
                isPreferredRiskProfile.Value = "false";

            if (riskProfileAnalysis != null)
            {
                RiskProfileDAO dao = new RiskProfileDAO();
                int score = dao.calculateRiskProfileAbilityForPopulate(riskProfileAnalysis);
                //RiskProfileValue.InnerText = score + "";
            }

            activityId.Value = caseId;
        }
Ejemplo n.º 9
0
        protected void riskProfileSubmit(object sender, EventArgs e)
        {
            string caseId = "";
            if (ViewState["caseId"] != null)
            {
                caseId = ViewState["caseId"].ToString();
            }
            //string caseId="2020";
            caseNumber.Value = caseId;

            RiskProfileAnalysis riskProfile = new RiskProfileAnalysis();

            RiskProfileDAO dao = new RiskProfileDAO();

            RiskProfileAnalysis riskProfileAnalysis = dao.getRiskProfileForCase(caseId);

            string status = "new";

            if (riskProfileAnalysis != null)
            {
                status = "update";
                copyRiskProfileBaseClass(riskProfile);

            }
            else
            {
                riskProfile.caseId = caseId;
                copyRiskProfileBaseClass(riskProfile);
            }

            if (status == "new")
            {
                dao.saveNewRiskProfile(riskProfile);
            }
            else
            {
                riskProfile.caseId = caseId;
                dao.updateRiskProfileDetails(riskProfile,"measuringRiskTakingAbility");
            }

            populateRiskProfile(riskProfile, caseId);
        }
Ejemplo n.º 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string caseId = "";

            if (!IsPostBack)
            {
                string nextCaseId = Request.Form["caseid"];
                string menuCaseId = Request.QueryString["caseid"];
                string helperUsed = Request.Form["helperUsed"];

                if (nextCaseId != null && nextCaseId != "")
                {
                    caseId = nextCaseId;
                }

                if (menuCaseId != null && menuCaseId != "")
                {
                    caseId = menuCaseId;
                }

                string url = "popitup('/_layouts/Zurich/RiskProfile/ShowPortfolioModel.aspx?caseId=" + caseId + "');";
                ShowPortfolioModelButton.Attributes.Add("onClick", url);

                ViewState["caseId"] = caseId;
                activityId.Value = caseId;
                RiskProfileDAO dao = new RiskProfileDAO();
                RiskProfileAnalysis riskProfileAnalysis = null;
                if (caseId != null || caseId != "")
                {
                    riskProfileAnalysis = dao.getRiskProfileForCase(caseId);

                }

                if (riskProfileAnalysis != null)
                {
                    populateRiskProfile(riskProfileAnalysis, caseId);
                }

            }
        }