예제 #1
0
    protected void ImgBtnContinue_Click(object sender, ImageClickEventArgs e)
    {
        PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();

        ArrayList arrSelectedSectors   = new ArrayList();
        ArrayList arrSelectedPositions = new ArrayList();

        if (Request.Form[lbSelectedSectors.UniqueID] != null)
        {
            arrSelectedSectors.AddRange(Request.Form[lbSelectedSectors.UniqueID].Split(','));
        }

        if (Request.Form[lbSelectedPositions.UniqueID] != null)
        {
            arrSelectedPositions.AddRange(Request.Form[lbSelectedPositions.UniqueID].Split(','));
        }

        if (this.smEmployeeType == PIKCV.COM.EnumDB.EmployeeTypes.Unknown)
        {
            PIKCV.COM.EnumDB.EmployeeTypes EmployeeType = (PIKCV.COM.EnumDB.EmployeeTypes)(int.Parse(Util.Left(arrSelectedPositions[0].ToString(), 1)));
            for (int i = 0; i < arrSelectedPositions.Count; i++)
            {
                arrSelectedPositions[i] = arrSelectedPositions[i].ToString().Substring(arrSelectedPositions[i].ToString().IndexOf("_||") + 3);
            }
            this.smEmployeeType = EmployeeType;
        }

        if (objUserCV.SaveEmploymentChooices(this.smUserID, arrSelectedSectors, arrSelectedPositions, this.smEmployeeType))
        {
            if (ImgBtnContinue.Visible == true)
            {
                this.smCVFocus = objUserCV.CVFocus(this.smUserID);
                this.Redirect("Employee-Membership-CV&CVFocus=" + ((int)PIKCV.COM.EnumDB.CVFocusCode.PlacementPreferences).ToString());
            }
            else
            {
                ShowModal.Show(UserControls_Common_uModalPopup.Icons.alert, PIKCV.COM.EnumDB.ErrorTypes.UpdateCV);
            }
        }
        else
        {
            ShowModal.Show(UserControls_Common_uModalPopup.Icons.alert, PIKCV.COM.EnumDB.ErrorTypes.NoUpdateCV);
        }
    }