Exemplo n.º 1
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 (Session["fnacaseid"] != null)
                {
                    caseId = Session["fnacaseid"].ToString();
                }

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

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

                ViewState["caseId"] = caseId;
                activityId.Value = caseId;
                CkaDao dao = new CkaDao();
                CkaAssessment assessment = null;
                if (caseId != null || caseId != "")
                {
                    assessment = dao.getCkaProfile(caseId);

                }

                if (assessment != null)
                {
                    populateCka(assessment,caseId);
                }

            }

            markStatusOnTab(caseId);
        }
Exemplo n.º 2
0
        protected void ckaSubmit(object sender, EventArgs e)
        {
            activity = activityStatusDao.getActivity(10);
            ViewState["activity"] = activity;

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

            CkaAssessment cka = new CkaAssessment();

            CkaDao dao = new CkaDao();

            CkaAssessment ckaAnalysis = dao.getCkaProfile(caseId);

            string status = "new";

            if (ckaAnalysis != null)
            {
                status = "update";
                copyRiskProfileBaseClass(cka);

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

            if (status == "new")
            {
                dao.saveNewCkaProfile(cka);
            }
            else
            {
                cka.caseId = caseId;
                dao.updateCkaDetails(cka);
            }

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

            string cstatus = activityStatusCheck.getCkaStatus(cka);
            activityStatusDao.saveOrUpdateActivityStatus(caseId, actv, cstatus);

            markStatusOnTab(caseId);

            string caseStatus = activityStatusCheck.getZPlanStatus(caseId);

            string url = Server.MapPath("~/_layouts/Zurich/Printpages/");

            pdfData = activityStatusCheck.sendDataToSalesPortal(caseId, caseStatus, url, sendPdf);

            populateCka(cka, caseId);
        }