Ejemplo n.º 1
1
        protected void Page_Load(object sender, EventArgs e)
        {
            #region Properties For The Base Class and Check Login
            LoginID = Request.QueryString["LoginID"];
            LoginInfo = CCLib.Login.GetLoginInfo(LoginID);
            Redirect();
            PageTitle = GetPortText(5372, false);
            Section = "portfolio_tool";
            CSS = "student";
            HeadTag = "<STYLE TYPE='TEXT/CSS'><!--.btnDescription {  font: 11px Verdana, Arial, Helvetica, sans-serif; margin: 0px 15px}--></STYLE>";
            BodyTag = " alink='#990000' style='background-image:url(/media/shared/bg_left_bar_grey.gif);background-repeat:repeat-y;' bgcolor='#ffffff' leftmargin=0 link='#003366' text='#000000' topmargin=0 vlink='#003366' marginwidth='0' marginheight='0'";
            LeftBar = "<TABLE WIDTH='100%' BORDER='0' CELLSPACING='0' CELLPADDING='0'><TR VALIGN='TOP' BGCOLOR='#669966'><td background='/media/portfolio_tool/bg_bar_tan_top.gif'><img height=23 src='/media/student_parent/icons/icon_arrow.gif' alt='' width=24><img height=23 src='/media1/" + this.PortType + "/h_h_main" + this.SuffixCode() + ".gif' alt='' width=141>";
            #endregion Properties For The Base Class and Check Login

            #region Initialize Values and Form Execution
            CheckPortSession();

            if (!Page.IsPostBack)
            {
                strSQL = "select c.SectionNameCapital" + SuffixCode() + " Ability,Convert(varchar(10),DBO.fn_ConvertTimeZone(StartTime," + PortInfo["SchoolID"].ToString() + ",1),101) [Test Date], Percentile,CorrectAnswers Correct,TotalQuestions,a.APTestID from AP_SavedTest a join AP_SavedSection b on a.APTestID = b.APTestID join AP_Section c on b.SectionID = c.SectionID where PortfolioID = " + PortInfo["PortfolioID"].ToString() + " and IsActiveStatus = 1 order by b.SectionID";
                dtSummary = CCLib.Common.DataAccess.GetDataTable(strSQL);

                // Prevent user manually change url from browser
                if (dtSummary.Rows.Count == 0)
                    Response.Redirect("AP_Portfolio2.aspx?LoginID=" + LoginID);
                if (dtSummary.Rows.Count > 0 && dtSummary.Rows.Count < 6)
                    Response.Redirect("AP_Portfolio3.aspx?LoginID=" + LoginID);

                //Check if Matchmaker results deleted
                divMM.Visible = false;
                ClientStorage clientStorage = new ClientStorage();
                clientStorage.Retrieve(LoginID);

                if (clientStorage.AspectIndicator < 2)
                {
                    divMM.Visible = true;
                    divLinkMM.Visible = false;
                }
                if (dtSummary.Rows[0]["Percentile"].ToString() == "")
                {
                    UpdateScore();
                    strSQL = "select c.SectionNameCapital" + SuffixCode() + " Ability,Convert(varchar(10),DBO.fn_ConvertTimeZone(StartTime," + PortInfo["SchoolID"].ToString() + ",1),101) [Test Date], Percentile,CorrectAnswers Correct,TotalQuestions,a.APTestID from AP_SavedTest a join AP_SavedSection b on a.APTestID = b.APTestID join AP_Section c on b.SectionID = c.SectionID where PortfolioID = " + PortInfo["PortfolioID"].ToString() + " and SchoolID = " + PortInfo["SchoolID"].ToString() + " and IsActiveStatus = 1 order by b.SectionID";
                    dtSummary = CCLib.Common.DataAccess.GetDataTable(strSQL);
                }
                rptSummary.DataSource = dtSummary;
                rptSummary.DataBind();
                AssignToUserControl();
            }
            #endregion Initialize Values and Form Execution

            #region Properties For The Individual Base Class
            SetCustomJS();
            PortTitle = GetPortText(5372,false);
            SetTitleBar();
            SetLeftButtons();
            PortSubTitle = GetPortText(8804, false);
            SetSubTitleBar();
            SetFooter();
            #endregion Properties For The Individual Base Class
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            LoginID = Request.QueryString["LoginID"];
            LoginInfo = CCLib.Login.GetLoginInfo(LoginID);
            Redirect();
            PageTitle = "Ability Profiler";
            Section = "mm";
            CSS = "global_css";
            HeadTag = "<style type='TEXT/CSS'><!--.btnDescription {  font: 11px Verdana, Arial, Helvetica, sans-serif; margin: 0px 15px}--></style>";
            BodyTag = " alink='#990000' style='background-image:url(/media/shared/bg_else.gif); background-repeat:no-repeat; background-color:#FFFFFF;' leftmargin=0 link='#003366' text='#000000' topmargin=0 vlink='#003366' marginwidth='0' marginheight='0'";
            LeftBar = "<table border='0' cellpadding='0' cellspacing='0' style='width:100%;'><tr style='background-color:#336699; vertical-align:top;'><td style='background-image:url(/media/mm/i_top_bar_bg.gif);'><img src='/media/mm/i_c_mm_icon.gif' alt=''><img src='/media/mm/h_c_mm.gif' alt='" + TextCode(273) + "'>";

            StringBuilder sbSQL = new StringBuilder();
            sbSQL.Append("SELECT s.AbilityName_EN, ss.Percentile, ss.Percentile*227/100 PBar, ss.CorrectAnswers, s.TotalQuestions");
            sbSQL.Append(" FROM AP_SavedTest st");
            sbSQL.Append(" LEFT JOIN AP_SavedSection ss ON st.APTestID = ss.APTestID");
            sbSQL.Append(" LEFT JOIN AP_Section s ON ss.SectionID = s.SectionID");
            sbSQL.Append(" WHERE st.IsActiveStatus = 1 and st.PortfolioID = '" + LoginInfo["PID"].ToString() + "' ORDER BY ss.SectionID");

            dtSection = CCLib.Common.DataAccess.GetDataTable(sbSQL.ToString());
            sbSQL = null;

            if (dtSection.Rows[0]["Percentile"].ToString() == "")
            {
                UpdateScore();
                StringBuilder sbSQL1 = new StringBuilder();
                sbSQL1.Append("SELECT s.AbilityName_EN, ss.Percentile, ss.Percentile*227/100 PBar, ss.CorrectAnswers, s.TotalQuestions");
                sbSQL1.Append(" FROM AP_SavedTest st");
                sbSQL1.Append(" LEFT JOIN AP_SavedSection ss ON st.APTestID = ss.APTestID");
                sbSQL1.Append(" LEFT JOIN AP_Section s ON ss.SectionID = s.SectionID");
                sbSQL1.Append(" WHERE st.IsActiveStatus = 1 and st.PortfolioID = '" + LoginInfo["PID"].ToString() + "' ORDER BY ss.SectionID");
                dtSection = CCLib.Common.DataAccess.GetDataTable(sbSQL1.ToString());
                sbSQL1 = null;

            }

            rptBar.DataSource = dtSection;
            rptBar.DataBind();

            rptChart.DataSource = dtSection;
            rptChart.DataBind();

            strSectionName = "Your Ability Profile";

            ClientStorage clientStorage = new ClientStorage();
            clientStorage.Retrieve(LoginID);

            if (clientStorage.AspectIndicator >= 2)
            {
                bHasMatchmaker = true;
                aMatchMaker.Attributes.Add("HREF", "/Matchmaker/k_list_matched.aspx?LoginID=" + LoginID + "&BM=1");
            }
            else
            {
                bHasMatchmaker = false;
                aMatchMaker.Attributes.Add("HREF", "/Individual/AP_Portfolio1.aspx?LoginID=" + LoginID);
                aMatchMaker.Attributes.Add("onclick", "alert('You do not currently have any saved Matchmaker Results. Please complete Career Matchmaker to see how your abilities match up with those of the careers you may be interested in.');");

            }
        }
Ejemplo n.º 3
0
 public DataTable PopulateSkillData()
 {
     ClientStorage clientStorage = new ClientStorage();
     clientStorage.Retrieve(LoginID);
     intTotalAspectCount = clientStorage.ClientSkills.Count;
     return clientStorage.ClientSkills.GetAsDataTable();
 }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region Properties For The Base Class and Check Login
            LoginID = Request.QueryString["LoginID"];
            LoginInfo = CCLib.Login.GetLoginInfo(LoginID);
            Redirect();
            PageTitle = "Ability Profiler";
            Section = "portfolio_tool";
            CSS = "student";
            HeadTag = "<STYLE TYPE='TEXT/CSS'><!--.btnDescription {  font: 11px Verdana, Arial, Helvetica, sans-serif; margin: 0px 15px}--></STYLE>";
            BodyTag = " alink='#990000' background='/media/shared/bg_else.gif' bgcolor='#ffffff' leftmargin=0 link='#003366' text='#000000' topmargin=0 vlink='#003366' marginwidth='0' marginheight='0'";
            LeftBar = "<TABLE WIDTH='100%' BORDER='0' CELLSPACING='0' CELLPADDING='0'><TR VALIGN='TOP' BGCOLOR='#669966'><td background='/media/portfolio_tool/bg_bar_tan_top.gif'><img height=23 src='/media/student_parent/icons/icon_arrow.gif' alt='' width=24><img height=23 src='/media1/" + this.PortType + "/h_h_main" + this.SuffixCode() + ".gif' alt='' width=141>";
            #endregion Properties For The Base Class and Check Login

            #region Initialize Values and Form Execution
            CheckPortSession();
            if (!Page.IsPostBack)
            {
                ClientStorage clientStorage = new ClientStorage();
                clientStorage.Retrieve(LoginID);

                strSQL = "select * from AP_SavedTest a join AP_SavedSection b on a.APTestID = b.APTestID where PortfolioID = " + PortInfo["PortfolioID"].ToString() + " and a.Gradenumber= " + PortInfo["GradeNumber"].ToString() + " and IsActiveStatus = 1";
                dtSections = CCLib.Common.DataAccess.GetDataTable(strSQL);
                if (dtSections.Rows.Count == 6)
                    Response.Redirect("AP_Portfolio4.aspx?LoginID=" + LoginID, false);

                if (clientStorage.AspectIndicator >= 2)
                {
                    if (dtSections.Rows.Count == 0)
                        Response.Redirect("AP_Portfolio2.aspx?LoginID=" + LoginID, false);
                    if (dtSections.Rows.Count > 0 && dtSections.Rows.Count < 6)
                        Response.Redirect("AP_Portfolio3.aspx?LoginID=" + LoginID, false);
                }
            }
            #endregion Initialize Values and Form Execution

            #region MyComments User Control
            UC.Caller = "/Parent/AP_Portfolio1";
            UC.LoginID = LoginID;
            UC.SectionID = "48";
            UC.ParentID = PortInfo["ParentID"].ToString();
            UC.PortfolioID = PortInfo["PortfolioID"].ToString();
            UC.Title = Server.UrlEncode(TextCode(4030));
            UC.SubTitle = TextCode(4034);
            #endregion MyComments User Control

            #region Properties For The Individual Base Class
            SetCustomJS();
            PortTitle = "Assessments";
            SetTitleBar();
            SetLeftButtons();
            AddParentComment = false;
            PortSubTitle = "Ability Profiler";
            SetSubTitleBar();
            SetFooter();
            #endregion Properties For The Individual Base Class
        }
Ejemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region Properties For The Base Class and Check Login
            LoginID = Request.QueryString["LoginID"];
            base.LoginInfo = CCLib.Login.GetLoginInfo(LoginID);
            base.Redirect();
            base.PageTitle = TextCode(330);
            base.Section = "mm";
            base.CSS = "global_css";
            base.HeadTag = "<STYLE TYPE='TEXT/CSS'><!--.MMBackLink {text-decoration:none;}.MMBackLink:hover {text-decoration:underline}.PrintLink {color: #FFFFFF; font-size:10px; text-decoration:underline;}.PrintLink:hover {color: #FFFFFF;font-size:10px; font-weight:bold}--></STYLE>";
            base.BodyTag = @"  alink=#990000 style='background-image:url(/media/shared/bg_else.gif); background-repeat:no-repeat; background-color:#FFFFFF;' leftmargin=0 link=#003366 text=#000000 topmargin=0 vlink=#666666 marginwidth='0' marginheight='0'";
            base.LeftBar = @"<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH='100%'><TR BGCOLOR=#336699 VALIGN=top><TD BACKGROUND='../media/mm/i_top_bar_bg.gif'><IMG HEIGHT=23 SRC='../media/mm/i_c_mm_icon.gif' WIDTH=24 alt=''><IMG HEIGHT=23 SRC='../media/mm/h_c_mm.gif' WIDTH=141 alt='" + TextCode(330) + "'>";
            IsLongPage = false;
            #endregion Properties For The Base Class and Check Login

            strMMID = Request.QueryString["MMID"];//SavedMatchMakerID

            bool bValidEntry = true;
            if ((Request.Form["txtFirstName"]=="") || (Request.Form["txtFirstName"]==null)) {bValidEntry = false;};
            if ((Request.Form["Pass1"]=="") || (Request.Form["Pass1"]==null)) {bValidEntry = false;};
            if ((Request.Form["Pass2"]=="") || (Request.Form["Pass2"]==null)) {bValidEntry = false;};
            ClientStorage clientStorage = new ClientStorage();
            clientStorage.Retrieve(LoginID);

            if(bValidEntry == true)
            {
                //Check to see that both passwords are the same
                if (Request.Form["Pass1"] == Request.Form["Pass2"])
                {
                    //Open the database to update this record
                    clientStorage.FirstName =  txtFirstName.Value;
                    clientStorage.LastName = txtLastName.Value;
                    clientStorage.SaveToDB(Request.Form["Pass1"].ToString(),base.LoginInfo["Username"].ToString(), base.LoginInfo["Password"].ToString());
                    clientStorage.Save(LoginID);
                    Response.Redirect("k_list_matched.aspx?LoginID=" + LoginID + "&MMID=" + strMMID);

                }
                else
                {
                    Response.Write("Please enter the same password in both password boxes");
                }

            }

            txtFirstName.Value = clientStorage.FirstName;
            txtLastName.Value = clientStorage.LastName;
        }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region Properties For The Base Class and Check Login
            LoginID = Request.QueryString["LoginID"];
            LoginInfo = CCLib.Login.GetLoginInfo(LoginID);
            Redirect();
            PageTitle = GetPortText(5372, false);
            Section = "portfolio_tool";
            CSS = "student";
            HeadTag = "<STYLE TYPE='TEXT/CSS'><!--.btnDescription {  font: 11px Verdana, Arial, Helvetica, sans-serif; margin: 0px 15px}--></STYLE>";
            BodyTag = " alink='#990000' style='background-image:url(/media/shared/bg_left_bar_grey.gif);background-repeat:repeat-y;' bgcolor='#ffffff' leftmargin=0 link='#003366' text='#000000' topmargin=0 vlink='#003366' marginwidth='0' marginheight='0'";
            LeftBar = "<TABLE WIDTH='100%' BORDER='0' CELLSPACING='0' CELLPADDING='0'><TR VALIGN='TOP' BGCOLOR='#669966'><td background='/media/portfolio_tool/bg_bar_tan_top.gif'><img height=23 src='/media/student_parent/icons/icon_arrow.gif' alt='' width=24><img height=23 src='/media1/" + this.PortType + "/h_h_main" + this.SuffixCode() + ".gif' alt='' width=141>";
            #endregion Properties For The Base Class and Check Login

            #region Initialize Values and Form Execution
            CheckPortSession();
            if (!Page.IsPostBack)
            {
                ClientStorage clientStorage = new ClientStorage();
                clientStorage.Retrieve(LoginID);

                strSQL = "select count(SavedSectionID) from AP_SavedTest a join AP_SavedSection b on a.APTestID = b.APTestID where PortfolioID = " + PortInfo["PortfolioID"].ToString() + " and IsActiveStatus = 1";
                intCompletedSection = Convert.ToInt16(CCLib.Common.DataAccess.GetValue(strSQL));
                if (intCompletedSection >= 6)
                    Response.Redirect("AP_Portfolio4.aspx?LoginID=" + LoginID);

                if (clientStorage.AspectIndicator >= 2)
                {
                    if (intCompletedSection == 0)
                        Response.Redirect("AP_Portfolio2.aspx?LoginID=" + LoginID);
                    if (intCompletedSection > 0 && intCompletedSection < 6)
                        Response.Redirect("AP_Portfolio3.aspx?LoginID=" + LoginID);
                }
            }
            #endregion Initialize Values and Form Execution

            #region Properties For The Individual Base Class
            SetCustomJS();
            PortTitle = GetPortText(5372, false);
            SetTitleBar();
            SetLeftButtons();
            PortSubTitle = GetPortText(8804,false);
            SetSubTitleBar();
            SetFooter();
            #endregion Properties For The Individual Base Class
        }
Ejemplo n.º 7
0
        //int intTotalAspectCount = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            // Put user code to initialize the page here

            #region Properties For The Base Class and Check Login
            LoginID = Request.QueryString["LoginID"];
            base.LoginInfo = CCLib.Login.GetLoginInfo(LoginID);

            base.Redirect();
            base.PageTitle = TextCode(295);
            base.Section = "mm";
            base.CSS = "global_css";
            base.HeadTag = "<STYLE TYPE='TEXT/CSS'><!--.MMBackLink {text-decoration:none;}.MMBackLink:hover {text-decoration:underline}.PrintLink {color: #FFFFFF; font-size:10px; text-decoration:underline;}.PrintLink:hover {color: #FFFFFF;font-size:10px; font-weight:bold}--></STYLE>";
            base.BodyTag = @" ALINK=#990000 style='background-image:url(/media/shared/bg_else.gif); background-repeat:no-repeat; background-color:#FFFFFF;' LEFTMARGIN=0 LINK=#003366 TEXT=#000000 TOPMARGIN=0 VLINK=#666666 MARGINWIDTH='0' MARGINHEIGHT='0'";
            base.LeftBar = @"<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH='100%'><TR BGCOLOR=#336699 VALIGN=top><TD BACKGROUND='../media/mm/i_top_bar_bg.gif'><IMG HEIGHT=23 SRC='../media/mm/i_c_mm_icon.gif' WIDTH=24 alt=''><IMG HEIGHT=23 SRC='../media/mm/h_c_mm.gif' WIDTH=141 alt='" + TextCode(295) + "'>";

            #endregion Properties For The Base Class and Check Login
            if (Request.Form["bState"] != null)
            {
                ClientStorage clientStorage = new ClientStorage();

                if (clientStorage.LoadFromDB(Request.Form["txtPasswrd"], LoginInfo["Username"].ToString(), LoginInfo["Password"].ToString(), Request.Form["txtfirstname"], Request.Form["txtlastname"]))
                {
                    clientStorage.Save(LoginID);
                    Response.Redirect("k_list_matched.aspx?LoginId=" + LoginID);
                }
                else
                {
                    svrLoginInstruction.Text  = TextCode(2969);
                }

            }
            else
            {
                ClientStorage clientStorage = new ClientStorage();
                clientStorage.Retrieve(LoginID);
                txtFirstName.Value = clientStorage.FirstName;
                txtLastName.Value = clientStorage.LastName;

            }
        }
Ejemplo n.º 8
0
 public string getAspectResponse(object aspectref)
 {
     //find a response for a particular aspect(if it exists)
     ClientStorage clientStorage = new ClientStorage();
     clientStorage.Retrieve(LoginID);
     AspectResult aspectResult = clientStorage.ClientAspects.Find(
                                      delegate(AspectResult ar)
                                      {
                                          return ar.AspectRef == Convert.ToInt16(aspectref);
                                      }
                                      );
     //convert it to text
     int iResponse = -1;
     string strResponse;
     if (aspectResult != null)
     {
         iResponse = aspectResult.AspectResponse;
     }
     switch (iResponse)
     {
         case 5:
             strResponse = "<font color=#336600>" + TextCode(1289);
             break;
         case 4:
             strResponse = "<font color=#336600>" + TextCode(1288);
             break;
         case 3:
             strResponse = "<font color=#cc9900>" + TextCode(1287);
             break;
         case 2:
             strResponse = "<font color=#990000>" + TextCode(1286);
             break;
         case 1:
             strResponse = "<font color=#990000>" + TextCode(1285);
             break;
         default:
             strResponse = "<font>";
             break;
     }
     return "<b>" + strResponse + "</font></b>";
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            #region Properties For The Base Class and Check Login
            LoginID = Request.QueryString["LoginID"];
            base.LoginInfo = CCLib.Login.GetLoginInfo(LoginID);
            HasTopHeader = false;
            HasTopNavButtons = false;
            base.Redirect();
            base.PageTitle = TextCode(273);
            base.Section = "mm";
            base.CSS = "global_css";
            #endregion Properties For The Base Class and Check Login

            #region Initialize Values and Form Execution
            strPortfolioID = LoginInfo["PID"].ToString();
            string strCountry = LoginInfo["Country"].ToString();

            //Date printed
            strLanguage = GetUserLanguage();
            lblPrintDate.Text = CareerCruisingWeb.CCLib.Common.Strings.GetLongMonth(DateTime.Today.Month, strLanguage) + " " + DateTime.Today.Day + ", " + DateTime.Today.Year;
            //Footer current year
            intCurrentYear = DateTime.Today.Year;

            //Get Cluster
            strClusterSystem = LoginInfo["Cluster1"].ToString();
            DataTable dtClusterInstructions = CCLib.Cache.GetCachedDataTable("ClusterInstructions" + NonEngSuffixCode(), "select * from ClusterInstructions" + NonEngSuffixCode());
            DataRow[] drsClusterInstructions = dtClusterInstructions.Select("ClusterName='" + strClusterSystem.Replace("'", "''") + "'");
            lblRecommended.Text = drsClusterInstructions[0]["Recommendations"].ToString();
            rptTOWlist.Visible = (LoginInfo["ClusterMatchmaker"].ToString() == "True") ? true : false;

            ClientStorage clientStorage = new ClientStorage();
            clientStorage.Retrieve(LoginID);

            lblReportTitle.Text = TextCode(9026) + " " + clientStorage.FirstName + "&nbsp;" + clientStorage.LastName;//GetText(5551);

            if (Session["MatchMakerLabel"] != null)
                strLabel = Session["MatchMakerLabel"].ToString();

            //Answered questions number
            int intTotalAspectCount = clientStorage.ClientAspects.Count;
            strAnsweredQuestions = intTotalAspectCount.ToString();

            //Education Levels
            if (clientStorage.ClientLevels.Count == 0)
            {
                lblEdu.Text = "&raquo; " + TextCode(6996);
            }
            else
            {
                string strLevel = "";
                foreach (LevelResult lr in clientStorage.ClientLevels)
                {
                    if (lr.LevelResponse == true)
                    {
                        switch (lr.LevelRef)
                        {
                            case 1: strLevel = "&raquo; " + TextCode(303);
                                lblEdu.Text = (lblEdu.Text == "") ? strLevel : lblEdu.Text + "<br />" + strLevel;
                                break;
                            case 2: strLevel = "&raquo; " + TextCode(9418);
                                lblEdu.Text = (lblEdu.Text == "") ? strLevel : lblEdu.Text + "<br />" + strLevel;
                                break;
                            case 3: strLevel = "&raquo; " + TextCode(305);
                                lblEdu.Text = (lblEdu.Text == "") ? strLevel : lblEdu.Text + "<br />" + strLevel;
                                break;
                            case 4: strLevel = "&raquo; " + TextCode(6996);
                                lblEdu.Text = strLevel;
                                break;
                        }
                    }
                }
                lblEdu.Text = (strLevel == "") ? "&raquo; " + TextCode(6996) : lblEdu.Text;
            }

            //Skills results
            bShowSkillCats = (clientStorage.SkillsIndicator == 1) ? true : false;

            JobList jl;
            //get all matched jobs
            jl = CCLib.MatchingObject.CCobject.buildJobList(SuffixCountryLanguageCode(), strCountry, clientStorage.ClientAspects, clientStorage.ClientHealth, clientStorage.ClientLevels);

            if (jl.Count > 0)
            {
                svhNoMatchedCareers.Visible = false;
                lblNoMatch.Visible = false;
            }
            else
            {  //No matched jobs
                rptSugglist.Visible = false;
                rptTOWlist.Visible = false;
                lblNoMatch.Text = TextCode(9180);
            }

            //AP results
            if (LoginInfo["PID"].ToString() != "")
            {
                commandText = " select APMatch, APNotMatch,Label from Port_SavedMatchMaker where PortfolioID= " + strPortfolioID + ";";
                studentInformation = CareerCruisingWeb.CCLib.Common.DataAccess.GetDataTable(commandText);
                if (studentInformation.Rows.Count > 0)
                {
                    //strLabel = studentInformation.Rows[0]["Label"].ToString();
                    if (studentInformation.Rows[0]["APMatch"].ToString() != "")
                    {

                        strsAPMatch = studentInformation.Rows[0]["APMatch"].ToString().Split(new char[] { ';' });
                        HasAbilityProfiler = true;
                        strsAPNotMatch = studentInformation.Rows[0]["APNotMatch"].ToString().Split(new char[] { ';' });
                        for (int i = 0; i < jl.Count; i++)
                        {
                            jl[i].APMatchCat = strsAPMatch[i].ToString();
                            jl[i].APNotMatchCat = strsAPNotMatch[i].ToString();
                        }
                    }
                }
            }

            if (bShowSkillCats) //add skills
            { CCLib.MatchingObject.CCobject.getSkillsCategories(strCountry, jl, clientStorage.ClientSkills); };

            //svhNoMatchedCareers.Visible = (jl.Count > 0) ? false : true;
            rptSugglist.DataSource = jl.GetAsDataTable();
            rptSugglist.DataBind();

            //Get recommended cluster
            TOWList tl = CCLib.MatchingObject.CCobject.buildTOWList(SuffixCountryLanguageCode(), NonEngSuffixCode(), jl, strClusterSystem);
            DataTable dtTOWList = tl.GetAsDataTable();
            dtTOWList.Columns.Add(new DataColumn("Number", typeof(string)));
            for (int i = 0; i < dtTOWList.Rows.Count; i++)
            {
                int j = i + 1;
                dtTOWList.Rows[i]["Number"] = j.ToString();
            }
            rptTOWlist.DataSource = dtTOWList;
            rptTOWlist.DataBind();

            #endregion Initialize Values and Form Execution
        }
Ejemplo n.º 10
0
 public DataTable PopulateAspectData()
 {
     ClientStorage clientStorage = new ClientStorage();
     clientStorage.Retrieve(LoginID);
     return clientStorage.ClientAspects.GetAsDataTable();
 }
Ejemplo n.º 11
0
        //int intTotalAspectCount = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            // Put user code to initialize the page here

            #region Properties For The Base Class and Check Login
            LoginID = Request.QueryString["LoginID"];
            base.LoginInfo = CCLib.Login.GetLoginInfo(LoginID);

            base.Redirect();
            base.PageTitle = TextCode(300);
            base.Section = "mm";
            base.CSS = "global_css";
            base.HeadTag = "<STYLE TYPE='TEXT/CSS'><!--.MMBackLink {text-decoration:none;}.MMBackLink:hover {text-decoration:underline}.PrintLink {color: #FFFFFF; font-size:10px; text-decoration:underline;}.PrintLink:hover {color: #FFFFFF;font-size:10px; font-weight:bold}--></STYLE>";
            base.BodyTag = @" ALINK=#990000 style='background-image:url(/media/shared/bg_else.gif); background-repeat:no-repeat; background-color:#FFFFFF;' LEFTMARGIN=0 LINK=#003366 TEXT=#000000 TOPMARGIN=0 VLINK=#666666 MARGINWIDTH='0' MARGINHEIGHT='0'";
            base.LeftBar = @"<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH='100%'><TR BGCOLOR=#336699 VALIGN=top><TD BACKGROUND='../media/mm/i_top_bar_bg.gif'><IMG HEIGHT=23 SRC='../media/mm/i_c_mm_icon.gif' WIDTH=24 alt=''><IMG HEIGHT=23 SRC='../media/mm/h_c_mm.gif' WIDTH=141 alt='" + TextCode(300) + "'>";

            #endregion Properties For The Base Class and Check Login

            // Put user code to initialize the page here

            LevelResult levelResult;

            ClientStorage clientStorage = new ClientStorage();
            clientStorage.Retrieve(LoginID);

            //do we need to save the values??
            if (Request["ChkChange"] != null)
            {
            // save them away

            levelResult = clientStorage.ClientLevels.Find(delegate(LevelResult lv){return lv.LevelRef  == 1;});
            if (levelResult == null)
            {
                   //it's not there so add to resultset
                    levelResult = new LevelResult();
                    levelResult.LevelRef = 1;
                    clientStorage.ClientLevels.Add(levelResult);
            }
                // then we set the value...
            if (Request["chkLevel001"]  !=null)
            {
                    levelResult.LevelResponse = true;
            }
            else
            {
                    levelResult.LevelResponse = false;
            }

            levelResult = clientStorage.ClientLevels.Find(delegate(LevelResult lv){return lv.LevelRef  == 2;});
            if (levelResult == null)
            {
                   //it's not there so add to resultset
                    levelResult = new LevelResult();
                    levelResult.LevelRef = 2;
                    clientStorage.ClientLevels.Add(levelResult);
            }
                // then we set the value...
            if (Request["chkLevel002"]!=null)
            {
                    levelResult.LevelResponse = true;
            }
            else
            {
                    levelResult.LevelResponse = false;
            }

            levelResult = clientStorage.ClientLevels.Find(delegate(LevelResult lv){return lv.LevelRef  == 3;});
            if (levelResult == null)
            {
                   //it's not there so add to resultset
                    levelResult = new LevelResult();
                    levelResult.LevelRef = 3;
                    clientStorage.ClientLevels.Add(levelResult);
            }
                // then we set the value...
            if (Request["chkLevel003"]  != null)
            {
                    levelResult.LevelResponse = true;
            }
            else
            {
                    levelResult.LevelResponse = false;
            }

            //now we save it back
            clientStorage.Save(LoginID);
            //now we redirect

            Response.Redirect("k_list_matched.aspx?LoginID=" + LoginID);

            }

            // default the checkboxes
            chkLevel001.Checked = false;
            chkLevel002.Checked = false;
            chkLevel003.Checked = false;

            // load the levels
            levelResult = clientStorage.ClientLevels.Find(delegate(LevelResult lv){return lv.LevelRef  == 1;});
            if (levelResult!=null)
            {
            chkLevel001.Checked = levelResult.LevelResponse;
            }

            levelResult = clientStorage.ClientLevels.Find(delegate(LevelResult lv) { return lv.LevelRef == 2; });
            if (levelResult != null)
            {
            chkLevel002.Checked = levelResult.LevelResponse;
            }

            levelResult = clientStorage.ClientLevels.Find(delegate(LevelResult lv) { return lv.LevelRef == 3; });
            if (levelResult != null)
            {
            chkLevel003.Checked = levelResult.LevelResponse;
            }
        }
Ejemplo n.º 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region Properties For The Base Class and Check Login
            LoginID = Request.QueryString["LoginID"];
            base.LoginInfo = CCLib.Login.GetLoginInfo(LoginID);
            base.Redirect();
            base.PageTitle = TextCode(336);
            base.Section = "mm";
            base.CSS = "global_css";
            base.HeadTag = "<STYLE TYPE='TEXT/CSS'><!--.MMBackLink {text-decoration:none;}.MMBackLink:hover {text-decoration:underline}.PrintLink {color: #FFFFFF; font-size:10px; text-decoration:underline;}.PrintLink:hover {color: #FFFFFF;font-size:10px; font-weight:bold}--></STYLE>";
            base.BodyTag = @" ALINK=#990000 style='background-image:url(/media/shared/bg_else.gif); background-repeat:no-repeat; background-color:#FFFFFF;' LEFTMARGIN=0 LINK=#003366 TEXT=#000000 TOPMARGIN=0 VLINK=#666666 ";
            base.LeftBar = @"<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH='100%'><TR BGCOLOR=#336699 VALIGN=top><TD BACKGROUND='../media/mm/i_top_bar_bg.gif'><IMG HEIGHT=23 SRC='../media/mm/i_c_mm_icon.gif' WIDTH=24 alt=''><IMG HEIGHT=23 SRC='../media/mm/h_c_mm.gif' WIDTH=141 alt='" + TextCode(336) + "'>";
            IsLongPage = false;
            #endregion Properties For The Base Class and Check Login

            // place Page initialisation here for now
            JSGenericHrefLink = "onul";

            // Put user code to initialize the page here
            strMMID = Request.QueryString["MMID"]; //SavedMatchMakerID

            ClientStorage clientStorage = new ClientStorage();
            clientStorage.Retrieve(LoginID);

            // we use this as a list of questions
            if ((Request.QueryString["RES"] == "") || (Request.QueryString["RES"] == null))// have they answered a question or is this the first time around
            {

                // it doesn't exist so lets build it....
                    Session.Add("skillsset", CCLib.MatchingObject.CCobject.buildSkillsResultSet(SuffixCountryLanguageCode()));

            }

            //JM 15/08/2006 if we have no questionset in the session then the session must have timed out between answering questions so redirect them to to k_list_matched.aspx
            if (Session["skillsset"] == null)
            {
                Response.Redirect("k_list_matched.aspx?LoginID=" + LoginID + "&SVP=1&AP=0&MMID=" + strMMID);
            }

            // lets pull the results into a local variable rather than keep accessing it through the session interface
            SkillsResultSet skillsset = Session["skillsset"] as SkillsResultSet; // get resultset from session

            // save the value away
            if ((Request.QueryString["RES"] != "") && (Request.QueryString["RES"] != null))// a resultset already exists, have they answered a question
            {

                SkillsResult skillsResult = clientStorage.ClientSkills.Find(
                                                             delegate(SkillsResult sr)
                                                             {
                                                                 return sr.SkillsRef == Convert.ToInt16(Request.QueryString["REF"]);
                                                             }
                                                             );
                if (skillsResult == null)
                {
                    //it's not there so add to resultset
                    skillsResult = new SkillsResult();
                    skillsResult.SkillsRef = Convert.ToInt16(Request.QueryString["REF"]);
                    clientStorage.ClientSkills.Add(skillsResult);
                }
                // then we set the value...
                if (skillsResult != null) { skillsResult.SkillsResponse = Convert.ToInt16(Request["RES"].ToString()); };

                //now we flag the question as answered
                skillsResult = skillsset.Find(
                                                             delegate(SkillsResult sr)
                                                             {
                                                                 return sr.SkillsRef == Convert.ToInt16(Request.QueryString["REF"]);
                                                             }
                                                             );

                if (skillsResult != null) { skillsResult.SkillsResponse = Convert.ToInt16(Request["RES"].ToString()); };

            }

            //see which question to ask
            SkillsResult skillNext = skillsset.Find(delegate(SkillsResult sr) { return sr.SkillsResponse == -1; });
            if (skillNext == null)
            {
                //they have answered all the questions - we'll show the results in a grid to prove it worked...
                clientStorage.SkillsIndicator = 1;
                clientStorage.Save(LoginID);
                //set LEG=1 to force display of Legend when returning to matched list
                Session["LEG"] = "1";
                Response.Redirect("k_list_matched.aspx?loginid=" + LoginID + "&SVP=1&AP=0&MMID=" + strMMID);
            }
            else
            {

                DataRow skill = CCLib.MatchingObject.CCobject.getSkill(skillNext.SkillsRef , SuffixCountryLanguageCode());
                int wPos = skillsset.IndexOf(skillNext);
                // set skill info
                svrProgressLit.Text = Convert.ToString(wPos + 1) + "&nbsp;" + TextCode(2972) + "&nbsp;" + Convert.ToString(skillsset.Count) + "&nbsp;&nbsp;";
                svrSkillNameLit.Text = skill["question"].ToString();
                svrSkillNoteLit.Text = skill["notes"].ToString();

                //set progress bar
                svrProgressImg.Width = Convert.ToInt16((wPos + 1) * (7));
                svrProgressImg.Alt = TextCode(3292) + " = " + Convert.ToString(wPos + 1) + " " + TextCode(2972) + " " + Convert.ToString(skillsset.Count);

                //set response URL
                string wURL = "k_skills_question.aspx?&REF=" + skill["ref"].ToString() + "&LoginID=" + base.LoginID + "&MMID=" + strMMID;
                checkbox1.Attributes.Add("onclick", "chkMark('" + wURL + "&RES=5',1)");
                checkbox2.Attributes.Add("onclick", "chkMark('" + wURL + "&RES=4',2)");
                checkbox3.Attributes.Add("onclick", "chkMark('" + wURL + "&RES=3',3)");
                checkbox4.Attributes.Add("onclick", "chkMark('" + wURL + "&RES=2',4)");
                checkbox5.Attributes.Add("onclick", "chkMark('" + wURL + "&RES=1',5)");

            };
            //Save the client record
            clientStorage.Save(LoginID);
        }
Ejemplo n.º 13
0
        public void PopulateAspectData(string sortExpression, string direction)
        {
            ClientStorage clientStorage = new ClientStorage();
            clientStorage.Retrieve(LoginID);
            intTotalAspectCount = clientStorage.ClientAspects.Count;

            dtQuestions = CCLib.Cache.GetCachedDataTableWithNoExpire("MM_QUESTION_" + intTotalAspectCount + "_" + SuffixCountryLanguageCode(), "select QuesID,Questions,Description from tblquestions" + SuffixCountryLanguageCode());

            dtAnswers = clientStorage.ClientAspects.GetAsDataTable(sortExpression, direction);
            dtAnswers.Columns.Add("QuesID", typeof(int));
            dtAnswers.Columns.Add("QuesName", typeof(String));
            dtAnswers.Columns.Add("QuesDesc", typeof(String));
            for (int i = 0; i < dtAnswers.Rows.Count; i++)
            {
                // The first time the page is requested, GridViewQuestionsOrder is set after PopulateAspectData() has been called
                dtAnswers.Rows[i]["QuesID"] = GridViewQuestionsOrder.Contains(dtAnswers.Rows[i]["AspectRef"]) ? GridViewQuestionsOrder[dtAnswers.Rows[i]["AspectRef"]] : i + 1;
                for (int j=0; j < dtQuestions.Rows.Count; j++)
                {
                    if (dtAnswers.Rows[i]["AspectRef"].ToString() == dtQuestions.Rows[j]["QuesID"].ToString())
                    {
                        dtAnswers.Rows[i]["QuesName"] = dtQuestions.Rows[j]["Questions"].ToString();
                        dtAnswers.Rows[i]["QuesDesc"] = dtQuestions.Rows[j]["Description"].ToString();
                    }
                }
            }
            grdChangeAnswers.DataSource = dtAnswers;
            grdChangeAnswers.DataBind();

            preparePagerCount();
            AssignToUserControl();
        }
Ejemplo n.º 14
0
        public void SaveAspects()
        {
            int intAspectRef;
            int intAspectRes;

            ClientStorage clientStorage = new ClientStorage();
            clientStorage.Retrieve(LoginID);
            AspectResult aspectResult;

            foreach (GridViewRow gr in grdChangeAnswers.Rows)
            {
                intAspectRef = Convert.ToInt16((gr.FindControl("AspectRef") as System.Web.UI.HtmlControls.HtmlInputHidden).Value);
                intAspectRes = Convert.ToInt16((gr.FindControl("ResponseDropDown") as System.Web.UI.WebControls.DropDownList).SelectedValue);

                // find the value
                aspectResult = clientStorage.ClientAspects.Find(delegate(AspectResult ar)
                                                                 {
                                                                     return ar.AspectRef == intAspectRef;
                                                                 }
                                                                 );
                // then we set the value...
                if (aspectResult != null) { aspectResult.AspectResponse = intAspectRes; };
            };
            clientStorage.Save(LoginID);
        }
Ejemplo n.º 15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region Properties For The Base Class and Check Login
            LoginID = Request.QueryString["LoginID"];
            PID = Request.QueryString["PID"];
            base.LoginInfo = CCLib.Login.GetLoginInfo(LoginID);
            base.Redirect();
            base.PageTitle = TextCode(273);
            base.Section = "mm";
            base.CSS = "global_css";
            base.HeadTag = "<STYLE TYPE='TEXT/CSS'><!--.MMBackLink {text-decoration:none;}.MMBackLink:hover {text-decoration:underline}.PrintLink {color: #FFFFFF; font-size:10px; text-decoration:underline;}.PrintLink:hover {color: #FFFFFF;font-size:10px; font-weight:bold}--></STYLE>";
            base.BodyTag = @"  alink=#990000 style='background-image:url(/media/shared/bg_else.gif); background-repeat:no-repeat; background-color:#FFFFFF;' leftmargin=0 link=#003366 text=#000000 topmargin=0 vlink=#666666 marginwidth='0' marginheight='0'";
            base.LeftBar = @"<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH='100%'><TR BGCOLOR=#336699 VALIGN=top><TD BACKGROUND='../media/mm/i_top_bar_bg.gif'><IMG HEIGHT=23 SRC='../media/mm/i_c_mm_icon.gif' WIDTH=24 alt=''><IMG HEIGHT=23 SRC='../media/mm/h_c_mm.gif' WIDTH=141 alt='" + TextCode(273) + "'>";
            #endregion Properties For The Base Class and Check Login
            DataBind(); // Ying added in May23,2008 for active server control databinding in aspx page
            bool bShowSkillCats = false;
            string strCountry = LoginInfo["Country"].ToString();

            //Get Cluster literals
            strClusterSystem = LoginInfo["Cluster1"].ToString();
            dtClusterInstructions = CCLib.Cache.GetCachedDataTable("ClusterInstructions" + NonEngSuffixCode(), "select * from ClusterInstructions" + NonEngSuffixCode());
            drsClusterInstructions = dtClusterInstructions.Select("ClusterName='" + strClusterSystem.Replace("'", "''") + "'");
            strClusterHeading = drsClusterInstructions[0]["Recommendations"].ToString();
            //mrm changed field as instructed by Meredith
            strClusterIntro = drsClusterInstructions[0]["CareerSuggestionsInst"].ToString();
            strClusterLink = drsClusterInstructions[0]["SuggestionsLink"].ToString();

            //OnLoad JS and JS that changes - fixed Javascript is read from k_list_matched.js
            string strBuf = "<SCRIPT LANGUAGE='JavaScript' ><!--\n";
            strBuf = strBuf + "pageImgInit('" + SuffixCode() + "');";
            strBuf = strBuf + "\n// --></SCRIPT>";
            svrJavaSetup.Text = strBuf;

            ClientStorage clientStorage = new ClientStorage();
            clientStorage.Retrieve(LoginID);
            intTotalAspectCount = clientStorage.ClientAspects.Count;
            strAnsweredQuestions = intTotalAspectCount.ToString();
            imgBar1.Width = Convert.ToInt16((Convert.ToDouble(intTotalAspectCount) / Convert.ToDouble(116)) * 161);
            if (clientStorage.ClientLevels.Count == 0)
            {
                lblEdu.Text = TextCode(6996);
            }
            else
            {
                string strLevel = "";
                foreach (LevelResult lr in clientStorage.ClientLevels)
                {
                    if (lr.LevelResponse == true)
                    {
                        switch (lr.LevelRef)
                        {
                            case 1: strLevel = TextCode(303);
                                lblEdu.Text = (lblEdu.Text == "") ? strLevel : lblEdu.Text + "<br />" + strLevel;
                                break;
                            case 2: strLevel = TextCode(304);
                                lblEdu.Text = (lblEdu.Text == "") ? strLevel : lblEdu.Text + "<br />" + strLevel;
                                break;
                            case 3: strLevel = TextCode(305);
                                lblEdu.Text = (lblEdu.Text == "") ? strLevel : lblEdu.Text + "<br />" + strLevel;
                                break;
                            case 4: strLevel = TextCode(6996);
                                lblEdu.Text = strLevel;
                                break;
                        }
                        //lblEdu.Text = (lblEdu.Text == "") ? strLevel : lblEdu.Text + "<br />" + strLevel;
                    }
                }
                lblEdu.Text = (strLevel == "") ? TextCode(6996) : lblEdu.Text;
            }
            rptTOWlist.Visible = (LoginInfo["ClusterMatchmaker"].ToString() == "True") ? true : false;

            //JM/Don if loading from portfolio then lets do it here
            //string strPortfolioID = CCLib.Common.Strings.GetQueryString("PortfolioId");//first check query string
            //if (strPortfolioID == "" && Session["PortInfo"] != null)//check session variables again, in case user linked from top nav button without the querystring passed
            //{
            //    DataRow drwPortInfo = (DataRow)Session["PortInfo"];
            //    strPortfolioID = drwPortInfo["PortfolioID"].ToString();
            //}

            //if (strPortfolioID != "")
            if (Session["matchmaker_login_from_portfolio"] != null)
            {
                if (clientStorage.AspectIndicator < 1)
                {
                    clientStorage.AspectIndicator = 1;
                    clientStorage.Save(LoginID);
                }
                else
                    clientStorage.Retrieve(LoginID);
            }

            // Determine skill state and turn on/off controls
            if (LoginInfo["EnableSkill"].ToString() == "True")
            {
                //turn on skills button
                tblSkills.Visible = true;
                // if all skills answered - change HREF so submenu is displayed
                if (clientStorage.SkillsIndicator == 1)
                {
                    strAnsweredSkills = "45";
                    strSkillsLink = TextCode(3279);
                    tdLegend.Visible = true;
                    imgSkillsBar.Width = 161;
                    aSkills.Attributes.Add("HREF", "k_skills_review.aspx?LoginID=" + LoginID);//All the questions have been answered
                    bShowSkillCats = true;//show skill icons
                }
                else
                {
                    strAnsweredSkills = "0";
                    strSkillsLink = TextCode(7413);
                    tdLegend.Visible = false;
                    imgSkillsBar.Width = 0;
                    aSkills.Attributes.Add("HREF", "k_skills_intro.aspx?LoginID=" + LoginID);//All the questions have not been answered
                    bShowSkillCats = false;//show skill icons
                }
            }
            else
            {
                //turn off skills button
                tblSkills.Visible = false;
                bShowSkillCats = false;// and do not show skill icons
            }

            // May 8,2008 Added by Ying for Save Reminder Popup
            svrPopContinue.Visible = false;
            svrPopSave.Visible = false;
            if (LoginInfo["PortTypeID"].ToString() == "1" || LoginInfo["PortTypeID"].ToString() == "0")
                svrBtnYes1.AlternateText = TextCode(5593) + " " + PortfolioName + ".";
            else
                svrBtnYes1.AlternateText = "Yes, I would like to save my results.";
            svrBtnYes2.AlternateText = TextCode(5594) + " " + PortfolioName + ".";
            svrBtnNo.AlternateText = TextCode(5601);

            dtParent = CCLib.Common.DataAccess.GetDataTable("select PID,ParentID from logininfo where loginid='" + LoginID + "'");
            if (dtParent != null & dtParent.Rows[0]["ParentID"].ToString() == "")
            {
                if (Request["SVP"] == "1") SaveReminderPopup();
            }
            if (Request["AL"] == "1")
            {
                ViewState["SaveToPort"] = "1";
                SaveResults();
            }
            if (Request["PP"] == "1") ViewState["SaveResult"] = "1";
            //show Skills Legend if coming from skills_question all done
            if (!Page.IsPostBack)
            {
                if (Session["LEG"] != null)
                {
                    if (Session["LEG"].ToString() == "1")
                        ViewState["LEG"] = "1";
                }
            }
            if (Request["LEG"] == "1")
            {
                divPopupLegend.Style.Add("visibility", "visible");
                Session["LEG"] = null;
                ViewState["LEG"] = "";
            }
            else
            {
                divPopupLegend.Style.Add("visibility", "hidden");
            }

            string strDummy = LoginInfo["MMQuickSave"].ToString();
            svhQuickSaveOn.Visible = (strDummy == "True");
            //     svhQuickSaveOn.Visible = true;
            svhPortFolioOn.Visible = SaveToPort;

            //*** Redirect if no aspects answered
            if (clientStorage.AspectIndicator < 1)
            {
                #region Track User Redirect Issue
                string strReferer = (System.Web.HttpContext.Current.Request.ServerVariables["HTTP_REFERER"] == null) ? "" : System.Web.HttpContext.Current.Request.ServerVariables["HTTP_REFERER"].ToString();
                if ((strReferer.ToLower().IndexOf("/matchmaker/k_aspects_question.aspx") > 0 && Session["questionset"] != null) || (strReferer.ToLower().IndexOf("/matchmaker/k_skills_question.aspx") > 0 && Session["skillsset"] != null))//user clicked the last aspect or skill questions, track the problem
                {
                    //now go through page history list
                    System.Text.StringBuilder sbMessage = new System.Text.StringBuilder();

                    if (Session["LastRequests"] != null)
                    {
                        // gather the list of pages last visited
                        Global.CCPageRequest[] requests = Session["LastRequests"] as Global.CCPageRequest[];
                        Int32 lastRequestPosition = -1;

                        // if this is the first ever request then initialize the array
                        if (Session["LastRequestPosition"] != null && Session["LastRequestPosition"].ToString() != "")
                        {
                            lastRequestPosition = (Int32)Session["LastRequestPosition"];
                        }

                        // only continue if the request data was located.
                        if (requests != null && lastRequestPosition != -1)
                        {
                            sbMessage.AppendFormat("\nLast {0} pages visited\n\n", requests.Length);

                            Int32 index = lastRequestPosition;

                            // go around the ring of pages until we get back to the last request
                            // start with the page next to the last request since that will be the oldest
                            do
                            {
                                index++;

                                if (index >= requests.Length)
                                {
                                    index = 0;
                                }

                                Global.CCPageRequest request = requests[index];

                                if (request != null)
                                {
                                    sbMessage.AppendFormat("\n{0} - {1}\nQueryString: {2}\nForm: {3}\n", request.requestDate, request.page, request.queryString, request.form);
                                }

                            } while (index != lastRequestPosition);
                        }
                    }

                    CCLib.Common.DataAccess.ExecuteDb("insert into ErrorLogMatchMaker (Last5Pages) values ('" + sbMessage.ToString().Replace("'", "''") + "')");
                    //CCLib.Common.Email.SendEmail("*****@*****.**", "*****@*****.**", "Last 5 Pages - Matchmaker - Caputure Career Suggestions Page Requests", sbMessage.ToString());
                }
                #endregion Track User Redirect Issue

                Response.Redirect("k_login.aspx?LoginID=" + LoginID);
            }

            if (clientStorage.AspectIndicator < 2)
            {
                if (Session["matchmaker_login_from_portfolio"] == null)
                {
                    Response.Redirect("/MatchMaker/k_aspects_intro.aspx?LoginID=" + LoginID);
                }
                else
                {
                    Session["matchmaker_login_from_portfolio"] = null;
                    if (LoginInfo["MMEduLevel"].ToString().ToLower() == "true")
                        Response.Redirect("/MatchMaker/k_educationLevel.aspx?LoginID=" + LoginID);
                    else
                        Response.Redirect("/MatchMaker/k_aspects_intro.aspx?LoginID=" + LoginID);
                }
            }

            // if all questions answered - change HREF so message is displayed
            if (clientStorage.AspectIndicator == 4)
            {
                //aAspects.Attributes.Add("HREF", "javascript:togglePopupDone(true)");
                aAspects.Visible = false;
                aAspectsReview.Attributes.Add("HREF", "k_aspects_review.aspx?LoginID=" + LoginID);
            }
            else
            {
                aAspects.Attributes.Add("HREF", "k_aspects_question.aspx?&LoginID=" + LoginID);
                aAspectsReview.Attributes.Add("HREF", "k_aspects_review.aspx?LoginID=" + LoginID);
            }

            userdetails.Text = "&nbsp;" + TextCode(274) + "&nbsp;" + clientStorage.FirstName + "&nbsp;" + clientStorage.LastName;
            //debug            userdetails.Text = "&nbsp;" + TextCode(274) + "&nbsp;" + clientStorage.AspectIndicator.ToString();

            //display Continue PopUp if coming from Matchmaker on the menu
            svrPopContinue.Visible = (Request["MMM"] == "1" && Session["PortInfo"] == null);
            svrPopContinueIntro.Text = clientStorage.FirstName + "&nbsp;" + clientStorage.LastName + TextCode(4054) + "<br><br>" + TextCode(4055);
            svrBtnContinue.AlternateText = TextCode(4056);
            svrBtnContinue.ImageUrl = "../media1/Matchmaker/btn_sessioncontinue" + NonEngSuffixCode() + ".gif";
            svrBtnRestart.AlternateText = TextCode(4057);
            svrBtnRestart.ImageUrl = "../media1/Matchmaker/btn_sessionrestart" + NonEngSuffixCode() + ".gif";

            //do a match
            JobList jl;
            //get all matched jobs
            jl = CCLib.MatchingObject.CCobject.buildJobList(SuffixCountryLanguageCode(), strCountry, clientStorage.ClientAspects, clientStorage.ClientHealth, clientStorage.ClientLevels);
            if (Request["clustercode"] == null)
            {
                if (bShowSkillCats) //add skills
                { CCLib.MatchingObject.CCobject.getSkillsCategories(strCountry, jl, clientStorage.ClientSkills); };
                spanShowClusterOptions.Visible = false;
                strListTitle = TextCode(6993);//Your career suggestions
                //display all suggested jobs
                if (jl.Count > 0) { svhNoMatchedCareers.Visible = false; };
                sugglist.DataSource = jl.GetAsDataTable();
                sugglist.DataBind();
            }
            else
            {
                JobList TOWjl; //matched jobs based on TOW
                TOWjl = CCLib.MatchingObject.CCobject.buildJobList(SuffixCountryLanguageCode(), strCountry, clientStorage.ClientAspects, clientStorage.ClientHealth, clientStorage.ClientLevels, Request["clustercode"].ToString(), strClusterSystem);
                if (bShowSkillCats) //add skills
                { CCLib.MatchingObject.CCobject.getSkillsCategories(strCountry, TOWjl, clientStorage.ClientSkills); };
                spanShowClusterOptions.Visible = true;
                //display matched TOW jobs
                if (TOWjl.Count > 0) { svhNoMatchedCareers.Visible = false; };
                sugglist.DataSource = TOWjl.GetAsDataTable();
                sugglist.DataBind();
                //determine the name of this cluster to place at top of job list
                dtClusterCodes = CCLib.Cache.GetCachedDataTableWithNoExpire("ClusterCodes", "select * from ClusterCodes");
                strClusterCode = Request.QueryString["clustercode"];
                strClusterType = (CCLib.Common.Strings.GetQueryString("Cluster").Length > 0) ? CCLib.Common.Strings.GetQueryString("Cluster") : strClusterSystem;//this comes from LoginInfo.Cluster1
                drsClusterCodes = dtClusterCodes.Select("ClusterCode='" + strClusterCode.Replace("'", "''") + "' and ClusterType='" + strClusterType.Replace("'", "''") + "'");
                strListTitle = TextCode(6993) + ": " + drsClusterCodes[0]["ClusteName" + NonEngSuffixCode()].ToString();
            }

            //this is based on all matched jobs
            TOWList tl = CCLib.MatchingObject.CCobject.buildTOWList(SuffixCountryLanguageCode(), NonEngSuffixCode(), jl, strClusterSystem);
            DataTable dtTOWList = tl.GetAsDataTable();
            dtTOWList.Columns.Add(new DataColumn("Number", typeof(string)));
            for (int i = 0; i < dtTOWList.Rows.Count; i++)
            {
                int j = i + 1;
                dtTOWList.Rows[i]["Number"] = j.ToString();
            }

            rptTOWlist.DataSource = dtTOWList;
            rptTOWlist.DataBind();

            //populate portfolio save form...
            if (svhPortFolioOn.Visible == true || LoginInfo["CustomID"].ToString() == "f4k-no-nav")//for f4k users. Don Xiong Aug 23, 2006
            {
                string strMatchRefs = "";
                string strSkillsRankString = "";
                for (int i = 0; i < jl.Count; i++)
                {
                    if (strMatchRefs != "") { strMatchRefs = strMatchRefs + ";"; };
                    strMatchRefs = strMatchRefs + jl[i].JobRef.ToString();
                    strSkillsRankString = strSkillsRankString + jl[i].SkillsCat;
                };

                string strAspectRefString = "";
                string strAspectResString = "";
                foreach (AspectResult ar in clientStorage.ClientAspects)
                {
                    strAspectRefString = strAspectRefString + ar.AspectRef.ToString().PadLeft(3, '0');
                    int intTmp = ar.AspectResponse;
                    if (intTmp < 0) { intTmp = 0; };
                    strAspectResString = strAspectResString + intTmp.ToString();

                };
                string strSkillsString = "";
                for (int i = 0; i < clientStorage.ClientSkills.Count; i++)
                {
                    SkillsResult sr = clientStorage.ClientSkills[i];
                    int intTmp = sr.SkillsResponse;
                    if (intTmp < 0) { intTmp = 0; };
                    strSkillsString = strSkillsString + intTmp.ToString();
                }
                string strLevels = "";
                foreach (LevelResult lr in clientStorage.ClientLevels)
                {
                    if (lr.LevelResponse == true)
                    {
                        strLevels = strLevels + lr.LevelRef.ToString().PadLeft(3, '0');
                    };
                }

                string strClusterCodes = "";
                for (int i = 0; i < tl.Count && i < 2; i++)
                {
                    if (strClusterCodes != "") { strClusterCodes = strClusterCodes + ","; };
                    strClusterCodes = strClusterCodes + tl[i].Code;
                };

                MatchMakerRef.Value = strAspectRefString;
                MatchMakerRes.Value = strAspectResString;
                MatchMakerEducation.Value = strLevels;
                if (strSkillsString != "")
                {
                    MatchMakerSkill.Value = strSkillsString;
                    MatchMakerSkillRank.Value = strSkillsRankString;

                }
                Pathway.Value = strClusterSystem + "|" + strClusterCodes;
                ptsavevalue.Value = strMatchRefs;

                //for f4k users. Don Xiong Aug 23, 2006
                strOccNumbers = strMatchRefs;
                strPathway = strClusterCodes;
                //for f4k users. Don Xiong Aug 23, 2006
            }
        }
Ejemplo n.º 16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // Put user code to initialize the page here

            #region Properties For The Base Class and Check Login
            LoginID = Request.QueryString["LoginID"];
            base.LoginInfo = CCLib.Login.GetLoginInfo(LoginID);
            base.Redirect();
            base.PageTitle = TextCode(270);
            base.Section = "mm";
            base.CSS = "global_css";
            base.HeadTag = "<STYLE TYPE='TEXT/CSS'><!--.MMBackLink {text-decoration:none;}.MMBackLink:hover {text-decoration:underline}.PrintLink {color: #FFFFFF; font-size:10px; text-decoration:underline;}.PrintLink:hover {color: #FFFFFF;font-size:10px; font-weight:bold}--></STYLE>";
            base.BodyTag = @" ALINK=#990000 style='background-image:url(/media/shared/bg_else.gif); background-repeat:no-repeat; background-color:#FFFFFF;' LEFTMARGIN=0 LINK=#003366 TEXT=#000000 TOPMARGIN=0 VLINK=#666666 ";
            base.LeftBar = @"<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH='100%'><TR BGCOLOR=#336699 VALIGN=top><TD BACKGROUND='../media/mm/i_top_bar_bg.gif'><IMG HEIGHT=23 SRC='../media/mm/i_c_mm_icon.gif' WIDTH=24 alt=''><IMG HEIGHT=23 SRC='../media/mm/h_c_mm.gif' WIDTH=141 alt='" + TextCode(270) + "'>";
            IsLongPage = false;
            #endregion Properties For The Base Class and Check Login

            int wPos = 0; //number of answered aspects
            //int wCount = 0;//number of aspects in this set
            //int wResponse = -1;//
            string strCountry = LoginInfo["Country"].ToString();
            string strMMID = Request.QueryString["MMID"]; //SavedMatchMakerID

            //*** Page interface initialisation
            string strBuf = "../media1/Matchmaker/";
            if (LoginInfo["MMGraphic"].ToString() == "Adult") {
                strBuf = strBuf + "MMIcon2";
            } else {
                strBuf = strBuf + "i_emoticons";
            }
            ImageMap1.Attributes.Add("SRC", strBuf + SuffixCode() + ".gif");
            ImageMap2.Attributes.Add("SRC", "../media1/Matchmaker/sh_p3" + SuffixCode() + ".gif");
            ImageMap1.Alt = TextCode(3272);
            ImageMap2.Alt = TextCode(3273);
            //TODO cope with old browsers
            //From Old ASP page
            //    set objBrowser = Server.CreateObject("cyScape.browserObj")
            //    if (objBrowser.Browser = "IE" and instr(objBrowser.platform,"Mac")=1) or (objBrowser.Browser = "Netscape" and instr(objBrowser.fullVersion,"6.")=1) then
            //    %>javascript:moreInfo2()<%
            //    else
            //    %>javascript:moreInfo()<%
            //    end if
            //    set objBrowser = nothing
            svrMoreInfoBtn.Text = "<A HREF='javascript:moreInfo()'><IMG SRC='../media1/MatchMaker/mout_p3_moreinfo" + SuffixCode() + ".gif' WIDTH='49' HEIGHT='47' BORDER='0' alt='"+TextCode(3180)+"'></A>";
            //see below for using moreInfo2() - this is now in JS/imgOnOff and the text is passed

            //***Page Code inititialisation
            //see if we need to build a result set
            // first we get the client data

            ClientStorage clientStorage = new ClientStorage();
            clientStorage.Retrieve(LoginID);

            // we use this as a list of questions
            if ((Request.QueryString["RES"] == "") || (Request.QueryString["RES"] == null))// have they answered a question or is this the first time around
            {

                // it doesn't exist so lets build it....
                if (clientStorage.AspectIndicator == 2)
                {
                    JobList jl = CCLib.MatchingObject.CCobject.buildJobList(SuffixCountryLanguageCode(),strCountry, clientStorage.ClientAspects, clientStorage.ClientHealth, clientStorage.ClientLevels);
                    AspectResultSet ars = CCLib.MatchingObject.CCobject.buildAspectResultSet(strCountry,jl,clientStorage.ClientAspects);
                    //check if any supplementary questions - if none then get remainder
                    //mrm 15/5/2006 changed from 1 to 20 to avoid very small supplementary aspect sets
                    if (ars.Count < 20) ars = CCLib.MatchingObject.CCobject.buildAspectResultSet(SuffixCountryLanguageCode(), clientStorage.ClientAspects);
                    Session.Add("questionset", ars);
                }
                else
                {
                    Session.Add("questionset", CCLib.MatchingObject.CCobject.buildAspectResultSet(SuffixCountryLanguageCode()));
                };

            }

            //JM 13/08/2006 if we have no questionset in the session then the session must have timed out between answering questions so redirect them to to k_list_matched.aspx
            if (Session["questionset"] == null)
            {
                Response.Redirect("k_list_matched.aspx?LoginID=" + LoginID + "&SVP=1&MMID=" + strMMID);
            }

            // lets pull the results into a local variable rather than keep accessing it through the session interface
            AspectResultSet questionset = Session["questionset"] as AspectResultSet; // get resultset from session

            // save the value away
            if ((Request.QueryString["RES"] != "") && (Request.QueryString["RES"] != null))// a resultset already exists, have they answered a question
            {

                AspectResult aspectResult = clientStorage.ClientAspects.Find(
                                                             delegate(AspectResult ar)
                                                             {
                                                                 return ar.AspectRef == Convert.ToInt16(Request.QueryString["REF"]);
                                                             }
                                                             );
                if (aspectResult == null)
                {
                    //it's not there so add to resultset
                    aspectResult = new AspectResult();
                    aspectResult.AspectRef = Convert.ToInt16(Request.QueryString["REF"]);
                    clientStorage.ClientAspects.Add(aspectResult);
                }
                // then we set the value...
                if (aspectResult != null) { aspectResult.AspectResponse = Convert.ToInt16(Request["RES"].ToString()); };

                //now we flag the question as answered
                aspectResult = questionset.Find(
                                                             delegate(AspectResult ar)
                                                             {
                                                                 return ar.AspectRef == Convert.ToInt16(Request.QueryString["REF"]);
                                                             }
                                                             );

                if (aspectResult != null) { aspectResult.AspectResponse = Convert.ToInt16(Request["RES"].ToString()); };

            }

            //see which question to ask
            AspectResult aspectNext = questionset.Find(delegate(AspectResult ar) { return ar.AspectResponse == -1; });
            if (aspectNext == null)
            {
                //they have answered all the questions in this set
                //mrm - 18/4/2006 previously Indicator was simply set to 2
                if (clientStorage.AspectIndicator==2)
                {
                    //check for any unanswered aspects - set Indicator to 4 if no more to do
                    AspectResultSet arUnanswered = CCLib.MatchingObject.CCobject.buildAspectResultSet(SuffixCountryLanguageCode(), clientStorage.ClientAspects);
                    if (arUnanswered.Count == 0)
                    {
                        clientStorage.AspectIndicator = 4;
                    }
                }
                else
                {
                    clientStorage.AspectIndicator = 2;
                }
                clientStorage.Save(LoginID);

                Response.Redirect("k_list_matched.aspx?loginID=" + LoginID + "&SVP=1&MMID=" + strMMID);
            }
            else
            {

                DataRow aspect = CCLib.MatchingObject.CCobject.getAspect(aspectNext.AspectRef, SuffixCountryLanguageCode());//TODO use suffix and Language code
                wPos = questionset.IndexOf(aspectNext);
                svrProgressLit.Text = Convert.ToString(wPos + 1) + "&nbsp;" + TextCode(2972) + "&nbsp;" + Convert.ToString(questionset.Count) + "&nbsp;&nbsp;";
                // set aspect details
                svrAspectNameLit.Text = aspect["question"].ToString();
                svrMoreInfo2.Text = Convert2BR(aspect["notes"].ToString());//must add BRs to format bullets

                //set progress bar
                svhProgressImg.Width = Convert.ToInt16((wPos + 1) * (387 / questionset.Count));
                svhProgressImg.Alt = TextCode(3292) + " = " + Convert.ToString(wPos + 1) + " " + TextCode(2972) + " " + Convert.ToString(questionset.Count);

                //decide whether to show Bottom Careers button
                if (clientStorage.AspectIndicator > 1) {
                    svhBtmRow.Visible = true;
                    svhBtmDest.Attributes.Add("HREF", "k_list_matched.aspx?loginID=" + LoginID + "&SVP=1&MMID=" + strMMID);
                } else {
                    svhBtmRow.Visible = false;
                }

                //set response URL
                string wURL = "k_aspects_question.aspx?&REF=" + aspect["ref"].ToString() + "&LoginID=" + base.LoginID + "&MMID=" + strMMID;
                checkbox5.Attributes.Add("onclick", "chkMark('" + wURL + "&RES=5',5)");
                checkbox4.Attributes.Add("onclick", "chkMark('" + wURL + "&RES=4',4)");
                checkbox3.Attributes.Add("onclick", "chkMark('" + wURL + "&RES=3',3)");
                checkbox2.Attributes.Add("onclick", "chkMark('" + wURL + "&RES=2',2)");
                checkbox1.Attributes.Add("onclick", "chkMark('" + wURL + "&RES=1',1)");

            };
            //Save the client record
            clientStorage.Save(LoginID);
        }
Ejemplo n.º 17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region Properties For The Base Class and Check Login
            LoginID = Request.QueryString["LoginID"];
            PID = Request.QueryString["PID"];
            base.LoginInfo = CCLib.Login.GetLoginInfo(LoginID);
            base.Redirect();
            base.PageTitle = TextCode(273);
            base.Section = "mm";
            base.CSS = "global_css";
            base.HeadTag = "<STYLE TYPE='TEXT/CSS'><!--.MMBackLink {text-decoration:none;}.MMBackLink:hover {text-decoration:underline}.PrintLink {color: #FFFFFF; font-size:10px; text-decoration:underline;}.PrintLink:hover {color: #FFFFFF;font-size:10px; font-weight:bold}--></STYLE>";
            base.BodyTag = @"  alink=#990000 style='background-image:url(/media/shared/bg_else.gif); background-repeat:no-repeat; background-color:#FFFFFF;' leftmargin=0 link=#003366 text=#000000 topmargin=0 vlink=#666666 marginwidth='0' marginheight='0'";
            base.LeftBar = @"<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH='100%'><TR BGCOLOR=#336699 VALIGN=top><TD BACKGROUND='../media/mm/i_top_bar_bg.gif'><IMG HEIGHT=23 SRC='../media/mm/i_c_mm_icon.gif' WIDTH=24 alt=''><IMG HEIGHT=23 SRC='../media/mm/h_c_mm.gif' WIDTH=141 alt='" + TextCode(273) + "'>";
            #endregion Properties For The Base Class and Check Login

            strAP = Request.QueryString["AP"];
            string strCountry = LoginInfo["Country"].ToString();

            strBM = Request.QueryString["BM"]; //Is Best Match
            strAction = CCLib.Common.Strings.GetQueryString("action"); //Click GO button
            strLbl = CCLib.Common.Strings.GetQueryString("Lbl"); //matchMaker Label
            strListTitle = TextCode(6993); // Your Career Suggestion
            strMMID = Request.QueryString["MMID"];//SavedMatchMakerID
            strNewMMLbl = CCLib.Common.Strings.GetQueryString("NewLbl");
            strSaveToPort = CCLib.Common.Strings.GetQueryString("Stat");

            //Have a new MatchMaker session
            if (strMMID == null || strMMID == "")
            {
                //Have an active Portfolio session
                if (LoginInfo["PID"].ToString() != "")
                {
                    //Is Best Match
                    if (strBM == "1")
                    {
                        DataTable[] dts = CCLib.Common.DataAccess.GetDataTables("select SavedMatchMakerID,Label,Convert(varchar(10),UpdateDate,101) UpdateDate from Port_SavedMatchMaker where BestMatch = 1 and PortfolioID=" + LoginInfo["PID"].ToString() + "; Select FirstName,LastName from Portfolio where PortfolioID=" + LoginInfo["PID"].ToString());
                        DataTable dtNN = dts[0];
                        dtMM = dts[1];
                        if (dtNN.Rows.Count > 0)
                        {
                            strMMID = dtNN.Rows[0][0].ToString();
                            strLabel = dtNN.Rows[0][1].ToString();
                            if (dtNN.Rows[0][1].ToString() != "")
                            {
                                strListTitle = TextCode(6993) + " - " + dtNN.Rows[0][1].ToString();
                                Session["MatchMakerLabel"] = dtNN.Rows[0][1].ToString();//save label in session for SaveToPort page
                            }
                            else
                                strListTitle = TextCode(6993);
                        }
                    }
                    else
                    {
                        dtMM = CCLib.Common.DataAccess.GetDataTable("select FirstName,LastName from Portfolio where PortfolioID=" + LoginInfo["PID"].ToString());
                    }

                }
            }
            else //Matchmaker results have been saved to database, return MMID to page. Or calling from MatchMaker Page in Portfolio
            {
                //Have an active Portfolio session
                if (LoginInfo["PID"].ToString() != "")
                    dtMM = CCLib.Common.DataAccess.GetDataTable("select SavedMatchMakerID,Label,Convert(varchar(10),UpdateDate,101) UpdateDate,b.FirstName,b.LastName from Port_SavedMatchMaker a join Portfolio b on a.PortfolioID = b.PortfolioID where SavedMatchMakerID=" + strMMID + " and a.PortfolioID=" + LoginInfo["PID"].ToString());
                else
                    dtMM = CCLib.Common.DataAccess.GetDataTable("select SavedMatchMakerID,Label,Convert(varchar(10),UpdateDate,101) UpdateDate from Port_SavedMatchMaker where SavedMatchMakerID=" + strMMID);
                if (dtMM.Rows.Count > 0)
                {
                    if (dtMM.Rows[0][1].ToString() != "")
                    {
                        strListTitle = TextCode(6993) + " - " + dtMM.Rows[0][1].ToString();
                        Session["MatchMakerLabel"] = dtMM.Rows[0][1].ToString();
                    }
                    else
                        strListTitle = TextCode(6993);
                    strLabel = dtMM.Rows[0][1].ToString();
                }
                else
                    blNotMatch = true;//If the results not matching with login user account
            }

            //Get Cluster literals
            strClusterSystem = LoginInfo["Cluster1"].ToString();
            dtClusterInstructions = CCLib.Cache.GetCachedDataTable("ClusterInstructions" + NonEngSuffixCode(), "select * from ClusterInstructions" + NonEngSuffixCode());
            drsClusterInstructions = dtClusterInstructions.Select("ClusterName='" + strClusterSystem.Replace("'", "''") + "'");
            strClusterHeading = drsClusterInstructions[0]["Recommendations"].ToString();
            //mrm changed field as instructed by Meredith
            strClusterIntro = drsClusterInstructions[0]["CareerSuggestionsInst"].ToString();
            strClusterLink = drsClusterInstructions[0]["SuggestionsLink"].ToString();

            //OnLoad JS and JS that changes - fixed Javascript is read from k_list_matched.js
            string strBuf = "<SCRIPT LANGUAGE='JavaScript' ><!--\n";
            strBuf = strBuf + "pageImgInit('" + SuffixCode() + "');";
            strBuf = strBuf + "\n// --></SCRIPT>";
            svrJavaSetup.Text = strBuf;

            rptTOWlist.Visible = (LoginInfo["ClusterMatchmaker"].ToString() == "True") ? true : false;

            //JM/Don if loading from portfolio then lets do it here
            //string strPortfolioID = CCLib.Common.Strings.GetQueryString("PortfolioId");//first check query string
            //if (strPortfolioID == "" && Session["PortInfo"] != null)//check session variables again, in case user linked from top nav button without the querystring passed
            //{
            //    DataRow drwPortInfo = (DataRow)Session["PortInfo"];
            //    strPortfolioID = drwPortInfo["PortfolioID"].ToString();
            //}

            ClientStorage clientStorage = new ClientStorage();
            //Loading from Portfolio
            if (strMMID != null && strMMID != "" && Request["SVP"] != "1")
            {
                if (clientStorage.LoadFromPortfolio(LoginInfo["PID"].ToString(), Convert.ToInt32(strMMID)))
                    clientStorage.Save(LoginID);
            }
            else //Loading from Save Reminder Popup or New MatchMaker Session
                clientStorage.Retrieve(LoginID);

            //Education Level
            intTotalAspectCount = clientStorage.ClientAspects.Count;
            strAnsweredQuestions = intTotalAspectCount.ToString();
            imgBar1.Width = Convert.ToInt16((Convert.ToDouble(intTotalAspectCount) / Convert.ToDouble(116)) * 161);

            //Get Education Level options
            if (clientStorage.ClientLevels.Count == 0)
            {
                lblEdu.Text = TextCode(6996);//Default value
            }
            else
            {
                string strLevel = "";
                foreach (LevelResult lr in clientStorage.ClientLevels)
                {
                    if (lr.LevelResponse == true)
                    {
                        switch (lr.LevelRef)
                        {
                            case 1: strLevel = TextCode(303);
                                lblEdu.Text = (lblEdu.Text == "") ? strLevel : lblEdu.Text + "<br />" + strLevel;
                                break;
                            case 2: strLevel = TextCode(304);
                                lblEdu.Text = (lblEdu.Text == "") ? strLevel : lblEdu.Text + "<br />" + strLevel;
                                break;
                            case 3: strLevel = TextCode(305);
                                lblEdu.Text = (lblEdu.Text == "") ? strLevel : lblEdu.Text + "<br />" + strLevel;
                                break;
                            case 4: strLevel = TextCode(6996);
                                lblEdu.Text = strLevel;
                                break;
                        }
                    }
                }
                lblEdu.Text = (strLevel == "") ? TextCode(6996) : lblEdu.Text;
            }

            if (LoginInfo["PID"] != null)
            {
                //New MatchMaker session with active Portfolio Session
                if (clientStorage.AspectIndicator < 1)
                {
                    clientStorage.AspectIndicator = 1;
                    clientStorage.Save(LoginID);
                }
                else
                {
                    if (strMMID != null && strMMID != "" && Request["SVP"] != "1")
                    {
                        if (clientStorage.LoadFromPortfolio(LoginInfo["PID"].ToString(), Convert.ToInt32(strMMID)))
                            clientStorage.Save(LoginID);
                    }
                    else
                        clientStorage.Retrieve(LoginID);
                }
            }

            // Determine skill state and turn on/off controls
            if (LoginInfo["EnableSkill"].ToString() == "True")
            {
                //turn on skills button
                tblSkills.Visible = true;
                // if all skills answered - change HREF so submenu is displayed
                if (clientStorage.SkillsIndicator == 1)
                {
                    strAnsweredSkills = "45";
                    strSkillsLink = TextCode(3279);
                    tdLegend.Visible = true;
                    imgSkillsBar.Width = 161;
                    aSkills.Attributes.Add("HREF", "k_skills_review.aspx?LoginID=" + LoginID + "&MMID=" + strMMID);//All the questions have been answered
                    bShowSkillCats = true;//show skill icons
                }
                else
                {
                    strAnsweredSkills = "0";
                    strSkillsLink = TextCode(7413);
                    tdLegend.Visible = false;
                    imgSkillsBar.Width = 0;
                    aSkills.Attributes.Add("HREF", "k_skills_intro.aspx?LoginID=" + LoginID + "&MMID=" + strMMID);//All the questions have not been answered
                    bShowSkillCats = false;//show skill icons
                }
            }
            else
            {
                //turn off skills button
                tblSkills.Visible = false;
                bShowSkillCats = false;// and do not show skill icons
            }

            //Hide all DIVs
            svrPopContinue.Visible = false;
            svrPopSave1.Visible = false;
            svrPopSave2.Visible = false;
            svrPopSave3.Visible = false;
            svrPopSave4.Visible = false;
            DivPopConfirm1.Visible = false;
            DivPopConfirm2.Visible = false;

            //Save Reminder Popup only appears in Student site
            dtParent = CCLib.Common.DataAccess.GetDataTable("select PID,ParentID from logininfo where loginid='" + LoginID + "'");
            if ((dtParent != null) && (dtParent.Rows.Count > 0))
            {
                if (dtParent.Rows[0]["ParentID"].ToString() == "")
                {
                    if (Request["SVP"] == "1" && clientStorage.AspectIndicator > 1) SaveReminderPopup();
                }
            }

            //show Skills Legend if coming from skills_question all done
            if (!Page.IsPostBack)
            {
                if (Session["LEG"] != null)
                {
                    if (Session["LEG"].ToString() == "1")
                        ViewState["LEG"] = "1";
                }
            }
            if (Request["LEG"] == "1")
            {
                divPopupLegend.Style.Add("visibility", "visible");
                Session["LEG"] = null;
                ViewState["LEG"] = "";
            }
            else
            {
                divPopupLegend.Style.Add("visibility", "hidden");
            }

            string strDummy = LoginInfo["MMQuickSave"].ToString();
            svhQuickSaveOn.Visible = (strDummy == "True");
            svhPortFolioOn.Visible = SaveToPort;

            //*** Redirect if no aspects answered
            if (clientStorage.AspectIndicator < 1)
            {
                #region Track User Redirect Issue
                string strReferer = (System.Web.HttpContext.Current.Request.ServerVariables["HTTP_REFERER"] == null) ? "" : System.Web.HttpContext.Current.Request.ServerVariables["HTTP_REFERER"].ToString();
                if ((strReferer.ToLower().IndexOf("/matchmaker/k_aspects_question.aspx") > 0 && Session["questionset"] != null) || (strReferer.ToLower().IndexOf("/matchmaker/k_skills_question.aspx") > 0 && Session["skillsset"] != null))//user clicked the last aspect or skill questions, track the problem
                {
                    //now go through page history list
                    System.Text.StringBuilder sbMessage = new System.Text.StringBuilder();

                    if (Session["LastRequests"] != null)
                    {
                        // gather the list of pages last visited
                        Global.CCPageRequest[] requests = Session["LastRequests"] as Global.CCPageRequest[];
                        Int32 lastRequestPosition = -1;

                        // if this is the first ever request then initialize the array
                        if (Session["LastRequestPosition"] != null && Session["LastRequestPosition"].ToString() != "")
                        {
                            lastRequestPosition = (Int32)Session["LastRequestPosition"];
                        }

                        // only continue if the request data was located.
                        if (requests != null && lastRequestPosition != -1)
                        {
                            sbMessage.AppendFormat("\nLast {0} pages visited\n\n", requests.Length);

                            Int32 index = lastRequestPosition;

                            // go around the ring of pages until we get back to the last request
                            // start with the page next to the last request since that will be the oldest
                            do
                            {
                                index++;

                                if (index >= requests.Length)
                                {
                                    index = 0;
                                }

                                Global.CCPageRequest request = requests[index];

                                if (request != null)
                                {
                                    sbMessage.AppendFormat("\n{0} - {1}\nQueryString: {2}\nForm: {3}\n", request.requestDate, request.page, request.queryString, request.form);
                                }

                            } while (index != lastRequestPosition);
                        }
                    }

                    CCLib.Common.DataAccess.ExecuteDb("insert into ErrorLogMatchMaker (Last5Pages) values ('" + sbMessage.ToString().Replace("'", "''") + "')");
                    //CCLib.Common.Email.SendEmail("*****@*****.**", "*****@*****.**", "Last 5 Pages - Matchmaker - Caputure Career Suggestions Page Requests", sbMessage.ToString());
                }
                #endregion Track User Redirect Issue

                Response.Redirect("k_login.aspx?LoginID=" + LoginID);
            }

            if (clientStorage.AspectIndicator < 2)
            {
                if (Request["SVP"] == "1")
                {
                    Response.Redirect("/MatchMaker/k_aspects_intro.aspx?LoginID=" + LoginID);
                }
                else
                {
                    //If school has MMEduLevel option equals TRUE, page will be redirected to Education Level page.
                    if (LoginInfo["MMEduLevel"].ToString().ToLower() == "true")
                        Response.Redirect("/MatchMaker/k_educationLevel.aspx?LoginID=" + LoginID);
                    else
                        Response.Redirect("/MatchMaker/k_aspects_intro.aspx?LoginID=" + LoginID);
                }
            }

            // if all questions answered - change HREF so message is displayed
            if (clientStorage.AspectIndicator == 4)
            {
                //aAspects.Attributes.Add("HREF", "javascript:togglePopupDone(true)");
                aAspects.Visible = false;
                aAspectsReview.Attributes.Add("HREF", "k_aspects_review.aspx?LoginID=" + LoginID + "&MMID=" + strMMID);
            }
            else
            {
                aAspects.Attributes.Add("HREF", "k_aspects_question.aspx?&LoginID=" + LoginID + "&MMID=" + strMMID);
                aAspectsReview.Attributes.Add("HREF", "k_aspects_review.aspx?LoginID=" + LoginID + "&MMID=" + strMMID);
            }

            //Loading from session if new MatchMaker results haven't been saved to database
            userdetails.Text = "&nbsp;" + TextCode(274) + "&nbsp;" + clientStorage.FirstName + "&nbsp;" + clientStorage.LastName;
            if (dtMM != null && LoginInfo["PID"].ToString() != "")
            {
                if (dtMM.Rows.Count > 0)
                    userdetails.Text = "&nbsp;" + TextCode(274) + "&nbsp;" + dtMM.Rows[0]["FirstName"].ToString() + "&nbsp;" + dtMM.Rows[0]["LastName"].ToString();
            }
            //debug            userdetails.Text = "&nbsp;" + TextCode(274) + "&nbsp;" + clientStorage.AspectIndicator.ToString();

            //display Continue PopUp if coming from Matchmaker on the menu
            svrPopContinue.Visible = (Request["MMM"] == "1" && Session["PortInfo"] == null);
            svrPopContinueIntro.Text = clientStorage.FirstName + "&nbsp;" + clientStorage.LastName + TextCode(4054) + "<br><br>" + TextCode(4055);
            svrBtnContinue.AlternateText = TextCode(4056);
            svrBtnContinue.ImageUrl = "../media1/Matchmaker/btn_sessioncontinue" + NonEngSuffixCode() + ".gif";
            svrBtnRestart.AlternateText = TextCode(4057);
            svrBtnRestart.ImageUrl = "../media1/Matchmaker/btn_sessionrestart" + NonEngSuffixCode() + ".gif";

            //do a match
            JobList jl;
            //get all matched jobs
            jl = CCLib.MatchingObject.CCobject.buildJobList(SuffixCountryLanguageCode(), strCountry, clientStorage.ClientAspects, clientStorage.ClientHealth, clientStorage.ClientLevels);
            if (Request["clustercode"] == null)
            {
                getCareerPercentile(jl); //add Ability profiler
                if (bShowSkillCats) //add skills
                { CCLib.MatchingObject.CCobject.getSkillsCategories(strCountry, jl, clientStorage.ClientSkills); };
                spanShowClusterOptions.Visible = false;

                //display all suggested jobs
                if (jl.Count > 0) { svhNoMatchedCareers.Visible = false; };
                sugglist.DataSource = jl.GetAsDataTable();
                sugglist.DataBind();
            }
            else
            {
                JobList TOWjl; //matched jobs based on TOW
                TOWjl = CCLib.MatchingObject.CCobject.buildJobList(SuffixCountryLanguageCode(), strCountry, clientStorage.ClientAspects, clientStorage.ClientHealth, clientStorage.ClientLevels, Request["clustercode"].ToString(), strClusterSystem);
                getCareerPercentile(TOWjl); //add Ability profiler
                if (bShowSkillCats) //add skills
                { CCLib.MatchingObject.CCobject.getSkillsCategories(strCountry, TOWjl, clientStorage.ClientSkills); };
                spanShowClusterOptions.Visible = true;
                //display matched TOW jobs
                if (TOWjl.Count > 0) { svhNoMatchedCareers.Visible = false; };
                sugglist.DataSource = TOWjl.GetAsDataTable();
                sugglist.DataBind();
                //determine the name of this cluster to place at top of job list
                dtClusterCodes = CCLib.Cache.GetCachedDataTableWithNoExpire("ClusterCodes", "select * from ClusterCodes");
                strClusterCode = Request.QueryString["clustercode"];
                strClusterType = (CCLib.Common.Strings.GetQueryString("Cluster").Length > 0) ? CCLib.Common.Strings.GetQueryString("Cluster") : strClusterSystem;//this comes from LoginInfo.Cluster1
                if (strClusterCode != "")
                {
                    drsClusterCodes = dtClusterCodes.Select("ClusterCode='" + strClusterCode.Replace("'", "''") + "' and ClusterType='" + strClusterType.Replace("'", "''") + "'");
                    strListTitle = TextCode(6993) + ": " + drsClusterCodes[0]["ClusteName" + NonEngSuffixCode()].ToString();
                }
            }

            //this is based on all matched jobs
            TOWList tl = CCLib.MatchingObject.CCobject.buildTOWList(SuffixCountryLanguageCode(), NonEngSuffixCode(), jl, strClusterSystem);
            DataTable dtTOWList = tl.GetAsDataTable();
            dtTOWList.Columns.Add(new DataColumn("Number", typeof(string)));
            for (int i = 0; i < dtTOWList.Rows.Count; i++)
            {
                int j = i + 1;
                dtTOWList.Rows[i]["Number"] = j.ToString();
            }

            rptTOWlist.DataSource = dtTOWList;
            rptTOWlist.DataBind();

            //populate portfolio save form...
            if (svhPortFolioOn.Visible == true || LoginInfo["CustomID"].ToString() == "f4k-no-nav")//for f4k users. Don Xiong Aug 23, 2006
            {
                string strMatchRefs = "";
                string strSkillsRankString = "";
                for (int i = 0; i < jl.Count; i++)
                {
                    if (strMatchRefs != "") { strMatchRefs = strMatchRefs + ";"; };
                    strMatchRefs = strMatchRefs + jl[i].JobRef.ToString();
                    strSkillsRankString = strSkillsRankString + jl[i].SkillsCat;
                };

                string strAspectRefString = "";
                string strAspectResString = "";
                foreach (AspectResult ar in clientStorage.ClientAspects)
                {
                    strAspectRefString = strAspectRefString + ar.AspectRef.ToString().PadLeft(3, '0');
                    int intTmp = ar.AspectResponse;
                    if (intTmp < 0) { intTmp = 0; };
                    strAspectResString = strAspectResString + intTmp.ToString();

                };
                string strSkillsString = "";
                for (int i = 0; i < clientStorage.ClientSkills.Count; i++)
                {
                    SkillsResult sr = clientStorage.ClientSkills[i];
                    int intTmp = sr.SkillsResponse;
                    if (intTmp < 0) { intTmp = 0; };
                    strSkillsString = strSkillsString + intTmp.ToString();
                }
                string strLevels = "";
                foreach (LevelResult lr in clientStorage.ClientLevels)
                {
                    if (lr.LevelResponse == true)
                    {
                        strLevels = strLevels + lr.LevelRef.ToString().PadLeft(3, '0');
                    };
                }
                if (strLevels != "")
                {
                    List<String> ls = new List<String>();
                    for (int i = 0; i < strLevels.Length; i = i + 3)
                    {
                        ls.Add(strLevels.Substring(i, 3));
                    }
                    string[] arr = ls.ToArray();
                    Array.Sort(arr);
                    strLevels = "";
                    foreach (string str in arr)
                    {
                        strLevels = strLevels + str;
                    }
                }

                string strClusterCodes = "";
                for (int i = 0; i < tl.Count && i < 2; i++)
                {
                    if (strClusterCodes != "") { strClusterCodes = strClusterCodes + ","; };
                    strClusterCodes = strClusterCodes + tl[i].Code;
                };

                MatchMakerRef.Value = strAspectRefString;
                MatchMakerRes.Value = strAspectResString;
                MatchMakerEducation.Value = strLevels;
                if (strSkillsString != "")
                {
                    MatchMakerSkill.Value = strSkillsString;
                    MatchMakerSkillRank.Value = strSkillsRankString;

                }
                Pathway.Value = strClusterSystem + "|" + strClusterCodes;
                ptsavevalue.Value = strMatchRefs;

                //for f4k users. Don Xiong Aug 23, 2006
                strOccNumbers = strMatchRefs;
                strPathway = strClusterCodes;
                //for f4k users. Don Xiong Aug 23, 2006
            }

            //Pop up Save Reminder
            if (LoginInfo["PID"].ToString() == "") Session["MatchMakerLabel"] = null;

            //Save MatchMaker result to server
            if (strAction != "")
            {
                //New MatchMaker session with no active Portfolio session - Click Yes, I have a Portfolio button
                if (strAction == "SaveResult1")
                {
                    if (LoginInfo["PID"].ToString() != "")
                    {
                        //If default name is not unique in table, get a new one with [X] as suffix
                        if (strLbl != "")
                        {
                            string strMMNumbers = LabelinDB(strLbl);
                            string strNewMMLabel = "0";
                            if (strMMNumbers != "0")
                            {
                                strLbl = LabelName(strLbl);
                                strNewMMLabel = "1";
                            }
                            SaveResults();
                            Session["ptreturnurl"] = ptreturnurl.Value + "NewLbl=" + strNewMMLabel + "&";
                            Session["ptsavename"] = ptsavename.Value;
                            Session["ptsavevalue"] = ptsavevalue.Value;
                            Session["MatchMakerRef"] = MatchMakerRef.Value;
                            Session["MatchMakerRes"] = MatchMakerRes.Value;
                            Session["MatchMakerEducation"] = MatchMakerEducation.Value;
                            if (MatchMakerSkill.Value.Length != 45)
                            {
                                MatchMakerSkill.Value = "";
                                MatchMakerSkillRank.Value = "";
                            }
                            Session["MatchMakerSkill"] = MatchMakerSkill.Value;
                            Session["MatchMakerSkillRank"] = MatchMakerSkillRank.Value;
                            Session["Pathway"] = Pathway.Value;
                            Session["MatchMakerLabel"] = strLbl;
                            //Response.Write(Session["MatchMakerRes"].ToString());
                            //Response.End();
                            Server.Transfer("/Individual/SaveToPort.aspx?LoginID=" + LoginID, true);
                        }
                    }
                    else
                    {
                        SaveResults();
                        Session["ptreturnurl"] = ptreturnurl.Value + "NewLbl=0&";
                        Session["ptsavename"] = ptsavename.Value;
                        Session["ptsavevalue"] = ptsavevalue.Value;
                        Session["MatchMakerRef"] = MatchMakerRef.Value;
                        Session["MatchMakerRes"] = MatchMakerRes.Value;
                        Session["MatchMakerEducation"] = MatchMakerEducation.Value;
                        if (MatchMakerSkill.Value.Length != 45)
                        {
                            MatchMakerSkill.Value = "";
                            MatchMakerSkillRank.Value = "";
                        }
                        Session["MatchMakerSkill"] = MatchMakerSkill.Value;
                        Session["MatchMakerSkillRank"] = MatchMakerSkillRank.Value;
                        Session["Pathway"] = Pathway.Value;
                        Session["MatchMakerLabel"] = strLbl;
                        Session["LastPortPage"] = "/MatchMaker/k_list_matched.aspx?action=SaveResult1&Lbl=" + strLbl;
                        Response.Redirect("/Individual/default.aspx?LoginID=" + LoginID);
                    }
                }

                //New MatchMaker session with no active Portfolio session - Click Yes, but i don't have a Portfolio button
                if (strAction == "SaveResult2")
                {
                    if (LoginInfo["CreatePortfolio"].ToString().ToUpper() == "YES")
                    {
                        Session["LastPortPage"] = "/MatchMaker/k_list_matched.aspx?action=SaveResult1&Lbl=" + strLbl;
                        Session["ptreturnurl"] = ptreturnurl.Value;
                        Session["MMID"] = strMMID;
                        Session["ptsavename"] = ptsavename.Value;
                        Session["ptsavevalue"] = ptsavevalue.Value;
                        Session["MatchMakerRef"] = MatchMakerRef.Value;
                        Session["MatchMakerRes"] = MatchMakerRes.Value;
                        Session["MatchMakerEducation"] = MatchMakerEducation.Value;
                        if (MatchMakerSkill.Value.Length != 45)
                        {
                            MatchMakerSkill.Value = "";
                            MatchMakerSkillRank.Value = "";
                        }
                        Session["MatchMakerSkill"] = MatchMakerSkill.Value;
                        Session["MatchMakerSkillRank"] = MatchMakerSkillRank.Value;
                        Session["Pathway"] = Pathway.Value;
                        Session["MatchMakerLabel"] = strLbl;
                        Response.Redirect("/Individual/CreateUser.aspx?LoginID=" + LoginID);
                    }
                    else
                    {
                        ViewState["NoPortfolio"] = "1";
                    }
                }

                //Saved MatchMaker Result with an active Portfolio session
                if (strAction == "SaveResult3")
                {
                    if (LoginInfo["PID"].ToString() != "")
                    {
                        if (strLbl != "")
                        {
                            string strMMNumbers = LabelinDB(strLbl);
                            string strNewMMLabel = "0";
                            if (strMMNumbers != "0")
                            {
                                strLbl = LabelName(strLbl);
                                strNewMMLabel = "1";
                            }
                            SaveResults();
                            Session["ptreturnurl"] = ptreturnurl.Value + "NewLbl=" + strNewMMLabel + "&";
                            Session["MMID"] = strMMID;
                            Session["ptsavename"] = ptsavename.Value;
                            Session["ptsavevalue"] = ptsavevalue.Value;
                            Session["MatchMakerRef"] = MatchMakerRef.Value;
                            Session["MatchMakerRes"] = MatchMakerRes.Value;
                            Session["MatchMakerEducation"] = MatchMakerEducation.Value;
                            if (MatchMakerSkill.Value.Length != 45)
                            {
                                MatchMakerSkill.Value = "";
                                MatchMakerSkillRank.Value = "";
                            }
                            Session["MatchMakerSkill"] = MatchMakerSkill.Value;
                            Session["MatchMakerSkillRank"] = MatchMakerSkillRank.Value;
                            Session["Pathway"] = Pathway.Value;
                            Session["MatchMakerLabel"] = strLbl;
                            Server.Transfer("/Individual/SaveToPort.aspx?LoginID=" + LoginID, true);
                        }
                    }
                    else
                    {
                        Session["LastPortPage"] = "/MatchMaker/k_list_matched.aspx?action=SaveResult4&Lbl=" + strLbl + "&Stat=" + strSaveToPort;
                        Response.Redirect("/Individual/default.aspx?LoginID=" + LoginID);
                    }

                }

                //Saved MatchMaker Result with an active Portfolio session
                if (strAction == "SaveResult4")
                {
                    if (LoginInfo["PID"].ToString() != "")
                    {
                        SaveResults();
                        Session["ptreturnurl"] = ptreturnurl.Value;
                        Session["MMID"] = strMMID;
                        Session["ptsavename"] = ptsavename.Value;
                        Session["ptsavevalue"] = ptsavevalue.Value;
                        Session["MatchMakerRef"] = MatchMakerRef.Value;
                        Session["MatchMakerRes"] = MatchMakerRes.Value;
                        Session["MatchMakerEducation"] = MatchMakerEducation.Value;
                        if (MatchMakerSkill.Value.Length != 45)
                        {
                            MatchMakerSkill.Value = "";
                            MatchMakerSkillRank.Value = "";
                        }
                        Session["MatchMakerSkill"] = MatchMakerSkill.Value;
                        Session["MatchMakerSkillRank"] = MatchMakerSkillRank.Value;
                        Session["Pathway"] = Pathway.Value;
                        Session["MatchMakerLabel"] = strLbl;
                        Server.Transfer("/Individual/SaveToPort.aspx?LoginID=" + LoginID, true);
                    }
                    else
                    {
                        Session["LastPortPage"] = "/MatchMaker/k_list_matched.aspx?action=SaveResult4&Lbl=" + strLbl + "&Stat=" + strSaveToPort;
                        Response.Redirect("/Individual/default.aspx?LoginID=" + LoginID);
                    }

                }

                //Saved MatchMaker Result without active Portfolio session - Click Yes, I have a Portfolio button
                if (strAction == "SaveResult5")
                {
                    if (LoginInfo["PID"].ToString() != "")
                    {
                        if (blNotMatch)
                        {
                            if (strLbl != "")
                            {
                                string strMMNumbers = LabelinDB(strLbl);
                                string strNewMMLabel = "0";
                                if (strMMNumbers != "0")
                                {
                                    strLbl = LabelName(strLbl);
                                    strNewMMLabel = "1";
                                }
                                SaveResults();
                                Session["ptreturnurl"] = ptreturnurl.Value + "NewLbl=" + strNewMMLabel + "&";
                                Session["ptsavename"] = ptsavename.Value;
                                Session["ptsavevalue"] = ptsavevalue.Value;
                                Session["MatchMakerRef"] = MatchMakerRef.Value;
                                Session["MatchMakerRes"] = MatchMakerRes.Value;
                                Session["MatchMakerEducation"] = MatchMakerEducation.Value;
                                if (MatchMakerSkill.Value.Length != 45)
                                {
                                    MatchMakerSkill.Value = "";
                                    MatchMakerSkillRank.Value = "";
                                }
                                Session["MatchMakerSkill"] = MatchMakerSkill.Value;
                                Session["MatchMakerSkillRank"] = MatchMakerSkillRank.Value;
                                Session["Pathway"] = Pathway.Value;
                                Session["MatchMakerLabel"] = strLbl;
                                Server.Transfer("/Individual/SaveToPort.aspx?LoginID=" + LoginID, true);
                            }
                        }
                        else
                        {

                            int iMMNumbers = Convert.ToInt16(CCLib.Common.DataAccess.GetValue("select count(SavedMatchMakerID) from Port_SavedMatchMaker where PortfolioID=" + LoginInfo["PID"].ToString()));
                            if (iMMNumbers > 0)
                            {
                                string strMMNumbers = LabelinDB("Matchmaker" + (iMMNumbers + 1).ToString());
                                if (strMMNumbers != "0")
                                    strLbl = LabelinDB("Matchmaker" + (iMMNumbers + 1).ToString());
                                else
                                    strLbl = "Matchmaker" + (iMMNumbers + 1).ToString();
                            }
                            else
                                strLbl = "Matchmaker1";
                            SaveResults();
                            Session["ptreturnurl"] = ptreturnurl.Value;
                            Session["MMID"] = strMMID;
                            Session["ptsavename"] = ptsavename.Value;
                            Session["ptsavevalue"] = ptsavevalue.Value;
                            Session["MatchMakerRef"] = MatchMakerRef.Value;
                            Session["MatchMakerRes"] = MatchMakerRes.Value;
                            Session["MatchMakerEducation"] = MatchMakerEducation.Value;
                            if (MatchMakerSkill.Value.Length != 45)
                            {
                                MatchMakerSkill.Value = "";
                                MatchMakerSkillRank.Value = "";
                            }
                            Session["MatchMakerSkill"] = MatchMakerSkill.Value;
                            Session["MatchMakerSkillRank"] = MatchMakerSkillRank.Value;
                            Session["Pathway"] = Pathway.Value;
                            Session["MatchMakerLabel"] = strLbl;
                            Server.Transfer("/Individual/SaveToPort.aspx?LoginID=" + LoginID, true);
                        }
                    }
                    else
                    {
                        Session["LastPortPage"] = "/MatchMaker/k_list_matched.aspx?action=SaveResult5&MMID=" + strMMID + "&Lbl=" + strLbl + "&Stat=" + strSaveToPort;
                        Response.Redirect("/Individual/default.aspx?LoginID=" + LoginID);
                    }
                }

                //Saved MatchMaker Result without active Portfolio session - Click Yes, but i don't have a Portfolio button
                if (strAction == "SaveResult6")
                {
                    if (LoginInfo["CreatePortfolio"].ToString().ToUpper() == "YES")
                    {
                        Session["LastPortPage"] = "/MatchMaker/k_list_matched.aspx?action=SaveResult5&MMID=" + strMMID + "&Lbl=" + strLbl + "&Stat=" + strSaveToPort;
                        Session["ptreturnurl"] = ptreturnurl.Value;
                        Session["MMID"] = strMMID;
                        Session["ptsavename"] = ptsavename.Value;
                        Session["ptsavevalue"] = ptsavevalue.Value;
                        Session["MatchMakerRef"] = MatchMakerRef.Value;
                        Session["MatchMakerRes"] = MatchMakerRes.Value;
                        Session["MatchMakerEducation"] = MatchMakerEducation.Value;
                        if (MatchMakerSkill.Value.Length != 45)
                        {
                            MatchMakerSkill.Value = "";
                            MatchMakerSkillRank.Value = "";
                        }
                        Session["MatchMakerSkill"] = MatchMakerSkill.Value;
                        Session["MatchMakerSkillRank"] = MatchMakerSkillRank.Value;
                        Session["Pathway"] = Pathway.Value;
                        Session["MatchMakerLabel"] = strLbl;
                        Response.Redirect("/Individual/CreateUser.aspx?LoginID=" + LoginID);
                    }
                    else
                    {
                        ViewState["NoPortfolio"] = "1";
                    }
                }

                //display Confirmation div
                if (strAction == "Confirm")
                {
                    if (strMMID != null && strMMID != "")
                    {
                        if (strBM == "1")
                        {
                            DivPopConfirm1.Visible = true;
                            DivPopConfirm2.Visible = false;
                        }
                        if (strBM == "0")
                        {
                            DivPopConfirm2.Visible = true;
                            DivPopConfirm1.Visible = false;
                        }
                    }
                }

                //If SavedMatchMakerID is associated with a different PortfolioID, remove username from "Career Suggestion for"
                if (strAction == "Restart")
                {
                    userdetails.Text = "&nbsp;" + TextCode(274);
                }

            }
        }
Ejemplo n.º 18
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            #region Properties For The Base Class and Check Login
            LoginID = Request.QueryString["LoginID"];
            LoginInfo = CCLib.Login.GetLoginInfo(LoginID);
            Redirect();
            PageTitle = TextCode(306);
            Section = "mm";
            CSS = "global_css";
            HeadTag = "<STYLE TYPE='TEXT/CSS'><!--body {background-repeat: no-repeat;}.MMBackLink {text-decoration:none;}.MMBackLink:hover {text-decoration:underline}.PrintLink {color: #FFFFFF; font-size:10px; text-decoration:underline;}.PrintLink:hover {color: #FFFFFF;font-size:10px; font-weight:bold; }--></STYLE>";
            BodyTag = @"  alink=#990000 background=/media/shared/bg_else.gif bgcolor=#ffffff leftmargin=0 link=#003366 text=#000000 topmargin=0 vlink=#666666 marginwidth='0' marginheight='0'";
            LeftBar = @"<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH='100%'><TR BGCOLOR=#336699 VALIGN=top><TD BACKGROUND='/media/mm/i_top_bar_bg.gif'><IMG HEIGHT=23 SRC='/media/mm/i_c_mm_icon.gif' WIDTH=24 alt=''><IMG HEIGHT=23 SRC='/media1/Matchmaker/h_c_asmt" + SuffixCode() + ".gif' WIDTH=141 alt='" + TextCode(306) + "'>";
            IsLongPage = false;
            #endregion Properties For The Base Class and Check Login

            #region MatchMaker
            ClientStorage clientStorage1 = new ClientStorage();
            clientStorage1.Retrieve(LoginID);
            if (LoginInfo["PID"].ToString() == "")// if no active Portfolio Session
            {
                strMMLink = "k_login.aspx?LoginID=" + LoginID;
            }
            else if (clientStorage1.AspectIndicator < 1)
            {
                strMMLink = "k_list_matched.aspx?LoginID=" + LoginID;
            }
            else if (LoginInfo["ParentID"].ToString() != "")//parent matchmaker
            {
                strMMLink = "/Parent/matchmaker.aspx?LoginID=" + LoginID;
            }
            else//individual matchmaker
            {
                strMMLink = "/Individual/matchmaker.aspx?LoginID=" + LoginID;
            }
            #endregion MatchMaker

            if (LoginInfo["EnableSkill"].ToString() != "True")
                divB.Visible = false;
            else
            {
                #region Skill link
                ClientStorage clientStorage2 = new ClientStorage();
                clientStorage2.Retrieve(LoginID);
                if (LoginInfo["PID"].ToString() == "")// if no active Portfolio Session
                {
                    strSkillLink = "k_login.aspx?LoginID=" + LoginID + "&RemindSkill=1";
                }
                else if (LoginInfo["ParentID"].ToString() != "")//parent matchmaker
                {
                    strSkillLink = "/Parent/MySkill.aspx?LoginID=" + LoginID;
                }
                else//individual matchmaker
                {
                    strSkillLink = "/Individual/MySkill.aspx?LoginID=" + LoginID;
                }
                #endregion Skill link
            }

            if (LoginInfo["EnableAbilityProfiler"].ToString() != "True")
                divC.Visible = false;
            else
            {
                #region AP link
                if (Session["PortInfo"] != null)
                {
                    strAPLink = "/Individual/AP_Portfolio1.aspx?LoginID=" + LoginID;
                }
                else
                {
                    strAPLink = "javascript:alert('You must have a Portfolio with saved Matchmaker results in order to complete the Ability Profiler. The Ability Profiler must be completed during an approved testing window.');window.location='/Individual/AP_Portfolio1.aspx?LoginID=" + LoginID + "';";
                }
                #endregion AP link
            }

            if (LoginInfo["EnableLrnStyles"].ToString() != "True")
                divD.Visible = false;
            else
            {
                #region LS link
                strLSLink = "/MatchMaker/LS_Pro/LS_Login.aspx?LoginID=" + LoginID;//by default, go to login page
                if (Session["LS_ID"] != null || Session["PortInfo"] != null)
                {
                    strLSLink = "/MatchMaker/LS_Pro/LS_Profile.aspx?LoginID=" + LoginID;
                }
                #endregion LS link

            }
        }
Ejemplo n.º 19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region Properties For The Base Class and Check Login
            LoginID = Request.QueryString["LoginID"];
            LoginInfo = CCLib.Login.GetLoginInfo(LoginID);
            Redirect();
            Section = "careers";
            CSS = "careers";
            HeadTag = "<STYLE TYPE='TEXT/CSS'><!--.MMBackLink {text-decoration:none;}.MMBackLink:hover {text-decoration:underline}.PrintLink {color: #FFFFFF; font-size:10px; text-decoration:underline;}.PrintLink:hover {color: #FFFFFF;font-size:10px; font-weight:bold}--></STYLE>";
            BodyTag = " alink='#990000' style='backgroud-image:url(/media/shared/bg_else.gif); background-color:#FFFFFF;' leftmargin=0 link='#003366' text='#000000' topmargin=0 vlink='#003366' marginwidth='0' marginheight='0'";
            LeftBar = "<TABLE WIDTH='100%' BORDER='0' CELLSPACING='0' CELLPADDING='0'><TR VALIGN='TOP' BGCOLOR='#669966'><td background='../media/shared/i_c_grn_bar_bg.gif'><img height=23 src='../media/careers/i_c_careers_icon.gif' width=24 alt='Careers icon'><img height=23 src='../media1/Careers/h_c_careers" + SuffixCode() + ".gif' width=141 alt='Careers'>";
            #endregion Properties For The Base Class and Check Login

            //variables to be assigned
            strOccNumber = CCLib.Common.Strings.GetQueryString("OccNumber");
            blHasValidData = (CCLib.Common.Strings.IsInteger(strOccNumber));

            if (blHasValidData)
            {
                strMM = CCLib.Common.Strings.GetQueryString("MM");
                strUrl = "JobDetails.aspx?LoginID=" + LoginID + "&OccNumber=" + Server.UrlEncode(strOccNumber);
                //carry MatchMaker back link
                strUrl = (strMM == "") ? strUrl : strUrl + "&MM=" + strMM;
                intLeftHeight = (strMM == "") ? 365 : 365 + 34;
                intLeftHeight += 95;
                //intLeftHeight = (LoginInfo["Portfolio"].ToString() == "Yes") ? intLeftHeight + 60 : intLeftHeight;

                strHeader = TextCode(2983);//suitable4U
                svhBackButton.Visible = (strMM != "");
                //svhPortfolio.Visible = SaveToPort;
                //svhNoPortfolio.Visible = !(svhPortfolio.Visible);
                strCSBackLink = CCLib.Common.Strings.GetQueryString("CSBackLink");
                svhCSBackLink.Visible = (strCSBackLink != "");
                strCSBackSelfLink = (strCSBackLink == "") ? "" : "&CSBackLink=" + strCSBackLink;

                //Case study
                //dtJobDetails = CCLib.Cache.GetCachedDataTable("JobDetails_" + strOccNumber + SuffixCountryLanguageCode(), "select * from Jobinfo" + SuffixCountryLanguageCode() + "_View where OccNumber=" + strOccNumber);
                //if (dtJobDetails.Rows.Count > 0)
                //{
                //    strOccName = dtJobDetails.Rows[0]["OccName"].ToString();
                //    strPerson1 = dtJobDetails.Rows[0]["Name1"].ToString();
                //    strPerson2 = dtJobDetails.Rows[0]["Name2"].ToString();
                //}
                //strLinkPerson1 = "../Careers/Interview.aspx?LoginID=" + LoginID + "&person=" + Server.UrlEncode(strPerson1) + "&OccName=" + Server.UrlEncode(strOccName) + "&OccNumber=" + strOccNumber + "&MM=" + strMM;
                //strLinkPerson2 = "../Careers/Interview.aspx?LoginID=" + LoginID + "&person=" + Server.UrlEncode(strPerson2) + "&OccName=" + Server.UrlEncode(strOccName) + "&OccNumber=" + strOccNumber + "&MM=" + strMM;

                //for comment and aspect responses
                clientStorage = new ClientStorage();
                clientStorage.Retrieve(LoginID);

                //JM if loading from portfolio then lets do it here
                string strPortfolioID = CCLib.Common.Strings.GetQueryString("PortfolioId");
                if (strPortfolioID != "")
                {
                    if (clientStorage.LoadFromPortfolio(strPortfolioID))
                    {
                        //it's worked so save it back to the session state
                        clientStorage.Save(LoginID);
                    }
                    else
                    {
                        //it hasn't worked so use whatever is in the session
                        clientStorage.Retrieve(LoginID);
                    }
                }

                if (strOccNumber != "")
                {
                    iJobref = Convert.ToInt32(strOccNumber);
                }

                //redirect if session has expired
                if (clientStorage.AspectIndicator < 1)
                {
                    if (strOccNumber == "")
                    {
                        Response.Redirect("../Index.aspx?LoginID=" + LoginID);
                    }
                    else
                    {
                        Response.Redirect("../Careers/JobDetails.aspx?LoginID=" + LoginID + "&OccNumber=" + strOccNumber);
                    }

                }

                // retrieve column name containing photo name
                string photoFilePhotoColumnName = "PhotoName_" + this.AbbreviatedCountryCode();

                // photo file code
                // create command used to select any photofile records corresponding to the occupation number passed
                string commandText = "Select * from JobInfoPhotoFile where OccNum = " + strOccNumber + " order by " + photoFilePhotoColumnName;

                // select the photofile records from the database corresponding to the occupation number passed
                DataTable photoFile = CCLib.Cache.GetCachedDataTable("PhotoFile_" + strOccNumber, commandText);

                int photoFileCount = photoFile.Rows.Count;

                //  if there are any photos associated with the job
                if (photoFileCount > 0)
                {
                    this.hasPhotoFile = true;
                }
            }//has valid data from querystring as integer

            #region pass the parameters to the user control
            ucLeftMenu.sCSBackSelfLink = strCSBackSelfLink;
            ucLeftMenu.sUrl = strUrl;
            ucLeftMenu.sOccNumber = strOccNumber;
            ucLeftMenu.blSaveToPort = SaveToPort;
            ucLeftMenu.sendOccNameToPage += delegate(string strOName)
            { strOccName = strOName; };
            //ucLeftMenu.sMMUrl = strMMUrl;
            ucLeftMenu.sMM = strMM;
            #endregion pass the parameters to the user control
        }
Ejemplo n.º 20
0
 public string getSkillResponse(object skillsref)
 {
     //find a response for a particular aspect(if it exists)
     ClientStorage clientStorage = new ClientStorage();
     clientStorage.Retrieve(LoginID);
     SkillsResult skillsResult = clientStorage.ClientSkills.Find(
                                      delegate(SkillsResult sr)
                                      {
                                          return sr.SkillsRef == Convert.ToInt16(skillsref);
                                      }
                                      );
     //convert it to text
     int iResponse = -1;
     string strResponse;
     if (skillsResult != null)
     {
         iResponse = skillsResult.SkillsResponse;
     }
     switch (iResponse)
     {
         case 5:
             strResponse = "<font color=#006600><b>" + TextCode(1290);
             break;
         case 4:
             strResponse = "<font color=#339900><b>" + TextCode(1291);
             break;
         case 3:
             strResponse = "<font color=#CC9900><b>" + TextCode(1292);
             break;
         case 2:
             strResponse = "<font color=#990000><b>" + TextCode(1293);
             break;
         case 1:
             strResponse = "<font color=#999900><b>" + TextCode(1294);
             break;
         default:
             strResponse = "</b><font>";
             break;
     }
     return strResponse + "</font>";
 }