Exemplo n.º 1
0
        private bool isValidJNP()
        {
            bool isValid = false;

            try
            {
                JNPackage queryPackage = new JNPackage(base.CurrentJNPID);

                if (queryPackage == null || queryPackage.JNPID == -1)
                {
                    // raise NonExistent JNP Encountered event
                    if (NonExistentJNPEncountered != null)
                    {
                        NonExistentJNPEncountered();
                    }
                }
                else
                {
                    this.CurrentPackage = queryPackage;
                    isValid             = true;
                }
            }
            catch (Exception ex)
            {
                isValid = false;
                base.LogExceptionOnly(ex.ToString());
            }

            return(isValid);
        }
Exemplo n.º 2
0
        private void buttonSave_Click(object sender, EventArgs e)
        {
            try
            {
                if (Page.IsValid)
                {
                    // save the JNP
                    JNPackage currentPackage = new JNPackage();

                    currentPackage.PayPlanID           = ControlUtility.GetDropdownValue(this.dropdownPayPlan);
                    currentPackage.RegionID            = ControlUtility.GetDropdownValue(this.dropdownRegion);
                    currentPackage.SeriesID            = ControlUtility.GetDropdownValue(this.dropdownSeries);
                    currentPackage.OrganizationCodeID  = this.checkboxStandardJNP.Checked ? 1 : ControlUtility.GetDropdownValue(this.dropdownOrganizationCode);
                    currentPackage.IsStandardJNP       = this.checkboxStandardJNP.Checked;
                    currentPackage.JNPTitle            = this.literalJNPTitle.Text;
                    currentPackage.IsInterdisciplinary = this.checkboxIsInterdisciplinary.Checked;
                    currentPackage.AdditionalSeriesID  = ControlUtility.GetDropdownValue(this.dropdownAdditionalSeries);
                    currentPackage.JNPTypeID           = this.checkboxTwoGrade.Checked ? enumJNPType.TwoGrade : enumJNPType.SingleGrade;



                    currentPackage.LowestAdvertisedGrade  = ControlUtility.GetDropdownValue(this.dropdownLowestAdvertisedGrade);
                    currentPackage.HighestAdvertisedGrade = ControlUtility.GetDropdownValue(this.dropdownHighestAdvertisedGrade);
                    currentPackage.FullPDID          = ControlUtility.GetDropdownValue(this.dropdownFullPD);
                    currentPackage.AdditionalPDID    = ControlUtility.GetDropdownValue(this.dropdownAdditionalPD);
                    currentPackage.DutyLocation      = this.textboxDutyLocation.Text;
                    currentPackage.IsDEU             = this.checkboxDEU.Checked;
                    currentPackage.IsMP              = this.checkboxMP.Checked;
                    currentPackage.IsExceptedService = this.checkboxException.Checked;
                    currentPackage.CreatedByID       = base.CurrentUserID;

                    // Create JNP Package
                    if (this.UseJNPTemplates)
                    {
                        currentPackage.JNPOptionTypeID = eJNPOptionType.CreateFromExisting;
                        currentPackage.CopyFromJNPID   = long.Parse(this.dropdownJNPTemplates.SelectedValue);
                        currentPackage.AddBasedOnExistingJNP();
                    }
                    else
                    {
                        // For the pilot release -- we are only using the createNew option
                        // In a future release, this will be updated to support more options
                        currentPackage.JNPOptionTypeID = eJNPOptionType.CreateNew;
                        currentPackage.Add(this.checkboxCreateJAFromPD.Checked);
                    }

                    // set values
                    base.CurrentJNPID   = currentPackage.JNPID;
                    base.CurrentJAID    = currentPackage.JAID;
                    base.CurrentNavMode = enumNavigationMode.Edit;

                    //Bypassing information page
                    base.GoToLink("~/JA/JADuties.aspx", enumNavigationMode.Edit);
                }
            }
            catch (Exception ex)
            {
                base.HandleException(ex);
            }
        }
Exemplo n.º 3
0
        private void BindHyperLink()
        {
            JNPackage jnpPackage = new JNPackage(base.CurrentJNPID);
            Series    series     = new Series(jnpPackage.SeriesID);
            string    urlhlMinimumQualifications = string.Format("~/CR/MinimumQualifications.aspx");

            hlMinimumQualifications.NavigateUrl = urlhlMinimumQualifications;
            hlMinimumQualifications.Attributes.Add("onClick", "javascript:ShowMinimumQualificationsPopUp(" + series.SeriesID + "," + series.TypeOfWorkID + "," + jnpPackage.HighestAdvertisedGrade + ",'" + CurrentNavMode + "'); return false;");
        }
        private void GetJNPHiringInformation()
        {
            JNPackage thisPackage = new JNPackage(this.JNPID);

            _isSuccessfulHiring = thisPackage.ResultedInSuccessfulHiring;
            _vacancyID          = thisPackage.VacancyID;

            dropWasSuccessfulHiring.SelectedValue = _isSuccessfulHiring.ToString();
            txtVacancyID.Text = _vacancyID;
        }
Exemplo n.º 5
0
 private void JNPDetails_JNPSaved(JNPackage currentPackage)
 {
     try
     {
         base.SafeRedirect("~/JA/JAPositionInformation.aspx");
     }
     catch (Exception ex)
     {
         base.HandleException(ex);
     }
 }
Exemplo n.º 6
0
        private void buttonSaveAndContinue_Click(object sender, EventArgs e)
        {
            try
            {
                var navigateurl = Page.ResolveUrl("~/JA/JADuties.aspx");

                if (base.ShowEditFields(enumDocumentType.JA))
                {
                    if (Page.IsValid)
                    {
                        if (DidDEUCheckboxChange && !this.checkboxDEU.Checked && base.HasActiveCR() && !ConfirmDeleteCR)
                        {
                            rwConfirmDeleteCR.VisibleOnPageLoad = true;
                            return;
                        }

                        // save the JNP
                        JNPackage thisPackage = new JNPackage();

                        thisPackage.JNPID = base.CurrentJNPID;
                        thisPackage.IsInterdisciplinary = this.checkboxIsInterdisciplinary.Checked;
                        thisPackage.AdditionalSeriesID  = ControlUtility.GetDropdownValue(this.dropdownAdditionalSeries);

                        thisPackage.FPPSPDID          = this.textBoxFPPSPDID.Text;
                        thisPackage.DutyLocation      = this.textboxDutyLocation.Text;
                        thisPackage.IsDEU             = this.checkboxDEU.Checked;
                        thisPackage.IsMP              = this.checkboxMP.Checked;
                        thisPackage.IsExceptedService = this.checkboxException.Checked;
                        thisPackage.UpdatedByID       = base.CurrentUserID;

                        // Update JNP Package
                        thisPackage.Update();
                    }


                    ReloadCurrentJNP(CurrentJNPID);

                    base.GoToLink(navigateurl, eMode.Edit, false);
                }
                else
                {
                    base.GoToLink(navigateurl, eMode.View, true);
                }
            }
            catch (Exception ex)
            {
                base.HandleException(ex);
            }
        }
Exemplo n.º 7
0
        private void buttonSave_Click(object sender, EventArgs e)
        {
            try
            {
                if (Page.IsValid)
                {
                    // save the JNP
                    JNPackage currentPackage = new JNPackage();
                    currentPackage.PayPlanID              = cpPayPlanID;
                    currentPackage.RegionID               = (hasManyRegions)? ControlUtility.GetDropdownValue(this.dropdownRegion): base.CurrentUser.RegionID;
                    currentPackage.SeriesID               = CpSeriesID;
                    currentPackage.OrganizationCodeID     = ControlUtility.GetDropdownValue(this.dropdownOrganizationCode);
                    currentPackage.IsStandardJNP          = false;
                    currentPackage.JNPTitle               = this.literalJNPTitle.Text;
                    currentPackage.IsInterdisciplinary    = this.checkboxIsInterdisciplinary.Checked;
                    currentPackage.AdditionalSeriesID     = ControlUtility.GetDropdownValue(this.dropdownAdditionalSeries);
                    currentPackage.JNPTypeID              = cpJNPType;
                    currentPackage.LowestAdvertisedGrade  = cpLowGrade;
                    currentPackage.HighestAdvertisedGrade = cpHighGrade;
                    currentPackage.FullPDID               = ControlUtility.GetDropdownValue(this.dropdownFullPD);
                    currentPackage.AdditionalPDID         = (cpJNPType == enumJNPType.TwoGrade)? ControlUtility.GetDropdownValue(this.dropdownAdditionalPD):-1;
                    currentPackage.DutyLocation           = this.textboxDutyLocation.Text;
                    currentPackage.IsDEU             = this.checkboxDEU.Checked;
                    currentPackage.IsMP              = this.checkboxMP.Checked;
                    currentPackage.IsExceptedService = this.checkboxException.Checked;
                    currentPackage.CreatedByID       = base.CurrentUserID;
                    currentPackage.JNPOptionTypeID   = eJNPOptionType.CreateFromExisting;
                    currentPackage.CopyFromJNPID     = CopyJNPID;
                    currentPackage.AddBasedOnExistingJNP();

                    if (currentPackage.JNPID > 0)
                    {
                        // set values
                        base.CurrentJNPID   = currentPackage.JNPID;
                        base.CurrentJAID    = currentPackage.JAID;
                        base.CurrentNavMode = enumNavigationMode.Edit;
                        //Bypassing information page
                        base.GoToLink("~/JA/JADuties.aspx", enumNavigationMode.Edit);
                    }
                }
            }
            catch (Exception ex)
            {
                base.HandleException(ex);
            }
        }
Exemplo n.º 8
0
        private void dropdownJNPTemplates_ItemDataBound(object sender, RadComboBoxItemEventArgs e)
        {
            try
            {
                JNPackage selectedPackage = e.Item.DataItem as JNPackage;

                if (selectedPackage != null)
                {
                    e.Item.Text  = selectedPackage.JNPTitle;
                    e.Item.Value = selectedPackage.JNPID.ToString();
                }
            }
            catch (Exception ex)
            {
                base.HandleException(ex);
            }
        }
Exemplo n.º 9
0
        private void PopulateCategoryRatingGroups()
        {
            CategoryRatingGroup bestQuilifiedGroup = CategoryRatingGroupManager.GetBestQuilifiedGroup(CurrentCRID);

            if (bestQuilifiedGroup != null)
            {
                rtbBQGroupTypeName.Text        = bestQuilifiedGroup.ScoringRangeGroupTypeName;
                rtbBQRangeMin.Text             = bestQuilifiedGroup.RangeMin.ToString();
                rtbBQRangeMax.Text             = bestQuilifiedGroup.RangeMax.ToString();
                rtbBQQualifyingStatements.Text = bestQuilifiedGroup.QualifyingStatements;
            }

            CategoryRatingGroup wellQuilifiedGroup = CategoryRatingGroupManager.GetWellQuilifiedGroup(CurrentCRID);

            if (wellQuilifiedGroup != null)
            {
                rtbWQGroupTypeName.Text        = wellQuilifiedGroup.ScoringRangeGroupTypeName;
                rtbWQRangeMin.Text             = wellQuilifiedGroup.RangeMin.ToString();
                rtbWQRangeMax.Text             = wellQuilifiedGroup.RangeMax.ToString();
                rtbWQQualifyingStatements.Text = wellQuilifiedGroup.QualifyingStatements;
            }

            CategoryRatingGroup quilifiedGroup = CategoryRatingGroupManager.GetQuilifiedGroup(CurrentCRID);

            if (quilifiedGroup != null)
            {
                rtbQGroupTypeName.Text      = quilifiedGroup.ScoringRangeGroupTypeName;
                rtbQGroupTypeName.Font.Bold = true;

                rtbQRangeMin.Text             = quilifiedGroup.RangeMin.ToString();
                rtbQRangeMax.Text             = quilifiedGroup.RangeMax.ToString();
                rtbQQualifyingStatements.Text = quilifiedGroup.QualifyingStatements;

                if (string.IsNullOrEmpty(quilifiedGroup.QualifyingStatements))
                {
                    JNPackage jnpPackage = new JNPackage(base.CurrentJNPID);
                    Series    series     = new Series(jnpPackage.SeriesID);

                    rtbQQualifyingStatements.Text = CategoryRatingManager.GetMinimumQualification(series.TypeOfWorkID, jnpPackage.HighestAdvertisedGrade);;
                }
            }
        }
        private bool UpdateHiringResult()
        {
            bool isSuccessful = false;

            try
            {
                JNPackage thisPackage = new JNPackage(base.CurrentJNPID);

                thisPackage.ResultedInSuccessfulHiring = Convert.ToBoolean(dropWasSuccessfulHiring.SelectedValue);
                thisPackage.VacancyID = txtVacancyID.Text;

                thisPackage.Update();
                isSuccessful = true;
            }
            catch
            {
                isSuccessful = false;
            }

            return(isSuccessful);
        }
Exemplo n.º 11
0
        protected void rmJNPAction_ItemClick(object sender, RadMenuEventArgs e)
        {
            RadMenu            rmJNPAction           = sender as RadMenu;
            long               JNPID                 = Convert.ToInt64(rmJNPAction.Attributes["JNPID"]);
            enumNavigationMode currentNavigationMode = enumNavigationMode.None;
            WorkflowObject     wo = new WorkflowObject();

            wo.StaffingObjectTypeID = enumStaffingObjectType.JNP;
            wo.StaffingObjectID     = JNPID;
            wo.UserID         = CurrentUserID;
            base.CurrentJNPID = JNPID;
            try
            {
                //bool navigateToActiveDocument = false;
                switch (e.Item.Value)
                {
                case "View":
                    this.CurrentJNPID = JNPID;
                    //navigateToActiveDocument = true;
                    currentNavigationMode = enumNavigationMode.View;
                    GoToLink("~/JA/JAPositionInformation.aspx", currentNavigationMode);
                    break;

                case "Edit":
                    wo.ActionTypeID = enumActionType.CheckOut;
                    WorkflowManager.CheckJNP(wo);
                    this.CurrentJNPID = JNPID;
                    //navigateToActiveDocument = true;
                    currentNavigationMode = enumNavigationMode.Edit;
                    GoToLink("~/JA/JAPositionInformation.aspx", currentNavigationMode);
                    break;

                case "ContinueEdit":
                    this.CurrentJNPID = JNPID;
                    //navigateToActiveDocument = true;
                    currentNavigationMode = enumNavigationMode.Edit;
                    GoToLink("~/JA/JAPositionInformation.aspx", currentNavigationMode);
                    break;

                case "FinishEdit":
                    wo.ActionTypeID = enumActionType.CheckIn;
                    WorkflowManager.CheckJNP(wo);
                    break;

                case "UpdateHiringResult":
                    //GoToLink("~/Package/UpdateHiringResult.aspx");
                    //CurrentJNPID = JNPID;
                    //rmJNPAction.Attributes.Add("onClick", "javascript:ShowJNPUpdateHiringResultPopUp(" + JNPID.ToString() + "); return false;");
                    ShowUpdateHiringResultWindow(JNPID);
                    break;

                case "CSN":
                    //GoToLink("~/Package/CopyJNPFromExisting.aspx?CopyJNPID=" + JNPID.ToString());

                    if (JNPID > 0)
                    {
                        //Fixed JA issue 906 -Classifier 14's My Tracker missing packages that Classifier creates by copying from existing pacakges.
                        //addjnpfrom existing jnp - newpackage.createdbyid is set based on current userid

                        JNPackage NewPackage      = new JNPackage();
                        JNPackage existingPackage = new JNPackage(JNPID);
                        NewPackage.PayPlanID              = existingPackage.PayPlanID;
                        NewPackage.RegionID               = existingPackage.RegionID;
                        NewPackage.SeriesID               = existingPackage.SeriesID;
                        NewPackage.OrganizationCodeID     = existingPackage.OrganizationCodeID;
                        NewPackage.IsStandardJNP          = existingPackage.IsStandardJNP;
                        NewPackage.JNPTitle               = existingPackage.JNPTitle;
                        NewPackage.IsInterdisciplinary    = existingPackage.IsInterdisciplinary;
                        NewPackage.AdditionalSeriesID     = existingPackage.AdditionalSeriesID;
                        NewPackage.JNPTypeID              = existingPackage.JNPTypeID;
                        NewPackage.LowestAdvertisedGrade  = existingPackage.LowestAdvertisedGrade;
                        NewPackage.HighestAdvertisedGrade = existingPackage.HighestAdvertisedGrade;
                        NewPackage.FullPDID               = existingPackage.FullPDID;
                        NewPackage.AdditionalPDID         = existingPackage.AdditionalPDID;
                        NewPackage.DutyLocation           = existingPackage.DutyLocation;
                        NewPackage.IsDEU             = existingPackage.IsDEU;
                        NewPackage.IsMP              = existingPackage.IsMP;
                        NewPackage.IsExceptedService = existingPackage.IsExceptedService;
                        NewPackage.CreatedByID       = base.CurrentUserID;
                        NewPackage.JNPOptionTypeID   = eJNPOptionType.CreateFromExisting;
                        NewPackage.CopyFromJNPID     = JNPID;
                        NewPackage.AddBasedOnExistingJNP();

                        base.CurrentJNPID   = NewPackage.JNPID;
                        base.CurrentJAID    = NewPackage.JAID;
                        base.CurrentNavMode = enumNavigationMode.Edit;

                        ReloadCurrentJNP(NewPackage.JNPID);

                        GoToLink("~/JA/JAPositionInformation.aspx");
                    }


                    break;

                default:
                    break;
                }

                rgSearchResults.Rebind();
            }
            catch (Exception ex)
            {
                ExceptionBase.HandleException(ex);
            }
        }
Exemplo n.º 12
0
        //private void UpdateHiringMenuAttributes(RadMenuItem updateHiringResult, string JNPID)
        //{
        //    updateHiringResult.Attributes.Add("onClick", "javascript:ShowJNPUpdateHiringResultPopUp(" + JNPID + "); return false;");
        //}

        protected void rgSearchResults_ItemDataBound(object sender, GridItemEventArgs e)
        {
            HideRefreshButton(e);
            if (e.Item is GridDataItem)
            {
                try
                {
                    HideRefreshButton(e);

                    GridDataItem dataItem = e.Item as GridDataItem;

                    if (dataItem.ItemType == GridItemType.Item || dataItem.ItemType == GridItemType.AlternatingItem || dataItem.ItemType == GridItemType.SelectedItem)
                    {
                        JNPSearchResult searchResult = (JNPSearchResult)e.Item.DataItem;

                        //Label lblJNPID = dataItem.FindControl("lblJNPID") as Label;
                        Label lblGrade = dataItem.FindControl("lblGrade") as Label;

                        //lblJNPID.Text = searchResult.JNPID.ToString();
                        // 5/7/13 MD: Bug 481 specifically mentions matching how JNPTracker formats the grade field (low/high).
                        //            Set this condition to 2 to match conditional field formatting found in vw_JNPTrackerItems around line 23
                        if (searchResult.JNPTypeID == 2)
                        {
                            lblGrade.Text = searchResult.LowestAdvertisedGrade.ToString() + "/" + searchResult.HighestAdvertisedGrade.ToString();
                        }
                        else
                        {
                            lblGrade.Text = searchResult.HighestAdvertisedGrade.ToString();
                        }

                        Image imgJNPCheckedOutStatus = dataItem.FindControl("imgJNPCheckedOutStatus") as Image;
                        imgJNPCheckedOutStatus.Visible = false;
                        string checkedoutdt = string.Empty;
                        string editedBy     = string.Empty;


                        #region [ Action menu ]

                        RadMenu menuAction = dataItem.FindControl("rmJNPAction") as RadMenu;
                        menuAction.Attributes["JNPID"] = searchResult.JNPID.ToString();
                        RadMenuItem viewMenuItem       = menuAction.FindItemByValue("View");
                        RadMenuItem editMenuItem       = menuAction.FindItemByValue("Edit");
                        RadMenuItem continueMenuItem   = menuAction.FindItemByValue("ContinueEdit");
                        RadMenuItem finishMenuItem     = menuAction.FindItemByValue("FinishEdit");
                        RadMenuItem csnMenuItem        = menuAction.FindItemByValue("CSN");
                        RadMenuItem updateHiringResult = menuAction.FindItemByValue("UpdateHiringResult");

                        viewMenuItem.Visible     = searchResult.CanView;
                        editMenuItem.Visible     = searchResult.CanEdit;
                        continueMenuItem.Visible = searchResult.CanContinueEdit;
                        finishMenuItem.Visible   = searchResult.CanFinishEdit;
                        //csnMenuItem.Visible = searchResult.CanCopyStartNew;

                        if (searchResult.CheckedActionTypeID == (int)enumActionType.CheckOut)
                        {
                            if (searchResult.CheckedDate.HasValue)
                            {
                                checkedoutdt = string.Format(searchResult.CheckedDate.ToString(), "d");

                                editedBy = String.Format("Being edited by {0} since {1}", searchResult.CheckedByFullName, checkedoutdt);

                                imgJNPCheckedOutStatus.Visible = true;
                            }

                            if (searchResult.CheckedByID == base.CurrentUserID)
                            {
                                imgJNPCheckedOutStatus.ImageUrl = Page.ResolveUrl(String.Format("~/App_Themes/{0}/Images/Icons/icon_unlock.gif", Page.Theme));
                            }
                            else
                            {
                                imgJNPCheckedOutStatus.ImageUrl = Page.ResolveUrl(String.Format("~/App_Themes/{0}/Images/Icons/icon_lock.gif", Page.Theme));
                                imgJNPCheckedOutStatus.ToolTip  = editedBy;
                                dataItem.ToolTip = editedBy;
                            }
                        }

                        // Hide these two dropdown options unless the package is published
                        updateHiringResult.Visible = false;
                        csnMenuItem.Visible        = false;
                        if (searchResult.JNPWorkflowStatus == enumJNPWorkflowStatus.Published.ToString())
                        {
                            // Make sure user has org code matching org code of published package
                            if (IsAdmin || CurrentUser.GetAssignedOrganizationCodes().Contains(searchResult.OrganizationCodeID))
                            {
                                updateHiringResult.Visible = true;
                                csnMenuItem.Visible        = true;
                                //UpdateHiringMenuAttributes(updateHiringResult, lblJNPID.Text);
                            }
                        }


                        #endregion

                        #region [ Document menu ]

                        bool hasComments = JNPackage.JNPHasComments(Convert.ToInt64(searchResult.JNPID.ToString()));
                        //bool hasComments = JNPackage.JNPHasComments(Convert.ToInt64(lblJNPID.Text));


                        RadMenu menuDocument = dataItem.FindControl("rmDocument") as RadMenu;
                        menuDocument.Attributes["JNPID"] = searchResult.JNPID.ToString();
                        menuDocument.Attributes["JAID"]  = searchResult.JobAnalysisID.ToString();
                        menuDocument.Attributes["CRID"]  = searchResult.CategoryRatingID.ToString();
                        menuDocument.Attributes["JQID"]  = searchResult.JobQuestionnaireID.ToString();


                        ToggleDocumentMenuItem(menuDocument, (int)enumDocumentType.JA, searchResult.JobAnalysisID);
                        ToggleDocumentMenuItem(menuDocument, (int)enumDocumentType.JQ, searchResult.JobQuestionnaireID);
                        ToggleDocumentMenuItem(menuDocument, (int)enumDocumentType.JQ, searchResult.JobQuestionnaireID);

                        //Issue #124 - Modify SearchReports  -  Modify to not display CR if not active under documents column
                        RadMenuItem categoryRating   = menuDocument.FindItemByValue("2");
                        RadMenuItem categoryRating22 = menuDocument.FindItemByValue("22");
                        if (CheckIfCRIsActive(Convert.ToInt64(searchResult.CategoryRatingID)) == true)
                        {
                            categoryRating.Visible = true;
                            if (categoryRating22 != null)
                            {
                                categoryRating22.Visible = true;
                            }
                        }
                        else
                        {
                            categoryRating.Visible = false;
                            if (categoryRating22 != null)
                            {
                                categoryRating22.Visible = false;
                            }
                        }

                        //Shot Comment item only if comment is available.
                        RadMenuItem CommentsPDF = menuDocument.FindItemByValue("4");
                        RadMenuItem CommentsDOC = menuDocument.FindItemByValue("44");
                        if (hasComments)
                        {
                            if (CommentsPDF != null)
                            {
                                CommentsPDF.Visible = true;
                            }
                            if (CommentsDOC != null)
                            {
                                CommentsDOC.Visible = true;
                            }
                        }
                        else
                        {
                            if (CommentsPDF != null)
                            {
                                CommentsPDF.Visible = false;
                            }
                            if (CommentsDOC != null)
                            {
                                CommentsDOC.Visible = false;
                            }
                        }

                        //Date: 06/27/2013
                        //Issue # 210: Hiring Manager can preview extract in UTF-8 format via search.
                        // HM shouldn't be able to preview an extract in UTF-8 format via search.
                        RadMenuItem UTF8Doc = menuDocument.FindItemByValue("5");
                        if (base.HasHRGroupPermission)
                        {
                            UTF8Doc.Visible = true;
                        }
                        else
                        {
                            UTF8Doc.Visible = false;
                        }

                        #endregion
                    }
                }
                catch (Exception ex)
                {
                    base.HandleException(ex);
                }
            }
        }
Exemplo n.º 13
0
        private void LoadData()
        {
            JNPackage ExistingPackage = new JNPackage(CopyJNPID);

            if (ExistingPackage == null || ExistingPackage.JNPID == -1)
            {
                // raise NonExistent JNP Encountered event
                if (NonExistentJNPEncountered != null)
                {
                    NonExistentJNPEncountered();
                }
            }
            else
            {
                enumJNPWorkflowStatus existingJNPWS = JNPackage.GetCurrentWorkflowStatusName(CopyJNPID);

                if (existingJNPWS == enumJNPWorkflowStatus.Published)
                {
                    literalExistingJNPID.Text = string.Format("JAX ID:{0}- Full Position Description:{1}", CopyJNPID.ToString(), ExistingPackage.FullPDID);
                    cpPayPlanID = ExistingPackage.PayPlanID;
                    this.literalPayPlan.Text = ExistingPackage.PayPlanTitle;
                    CpSeriesID                = ExistingPackage.SeriesID;
                    cpHighGrade               = ExistingPackage.HighestAdvertisedGrade;
                    this.literalSeries.Text   = string.Format("{0} | {1}", ExistingPackage.SeriesID.ToString(), ExistingPackage.SeriesName);
                    this.literalTwoGrade.Text = (ExistingPackage.JNPTypeID == enumJNPType.TwoGrade) ? GetGlobalResourceObject("JNPInfo", "TwoGradeMessage").ToString() : GetGlobalResourceObject("JNPInfo", "SingleGradeMessage").ToString();
                    literalHighGrade.Text     = ExistingPackage.HighestAdvertisedGrade.ToString();

                    //IsTwoGrade
                    cpJNPType = ExistingPackage.JNPTypeID;
                    if (ExistingPackage.JNPTypeID == enumJNPType.TwoGrade)
                    {
                        spanLowestAdvertisedGrade.Visible = true;
                        literalLowGrade.Text    = ExistingPackage.LowestAdvertisedGrade.ToString();
                        divAdditionalPD.Visible = true;
                        cpLowGrade = ExistingPackage.LowestAdvertisedGrade;
                    }
                    else
                    {
                        spanLowestAdvertisedGrade.Visible = false;
                        divAdditionalPD.Visible           = false;
                    }

                    //IsInterDisciplinary?
                    buildAdditionalSeriesDropdown();
                    if (ExistingPackage.IsInterdisciplinary)
                    {
                        checkboxIsInterdisciplinary.Checked = true;
                        spanAdditionalSeries.Visible        = true;
                        //fill the dropdownadditional series - with selected value - existingpackage.additionalseries
                        ControlUtility.SafeListControlSelect(this.dropdownAdditionalSeries, ExistingPackage.AdditionalSeriesID);
                    }
                    else
                    {
                        checkboxIsInterdisciplinary.Checked = false;
                        spanAdditionalSeries.Visible        = false;
                    }


                    //Region
                    setRegionView();

                    // organization codes
                    buildOrganizationCodeDropdown(base.CurrentUser.RegionID);

                    //Recruitement Options

                    this.checkboxDEU.Checked       = ExistingPackage.IsDEU ? true : false;
                    this.checkboxMP.Checked        = ExistingPackage.IsMP ? true : false;
                    this.checkboxException.Checked = ExistingPackage.IsExceptedService ? true : false;
                }
                else
                {
                    string errormsg = GetGlobalResourceObject("JNPMessages", "JNPOnlyFromPublishedJNP").ToString();
                    base.PrintErrorMessage(errormsg, false);
                }
            }
        }
Exemplo n.º 14
0
        private void loadData()
        {
            if (CopyJNPID > 0)
            {
                JNPackage ExistingPackage = new JNPackage(CopyJNPID);
                ExistingPackage.CopyFromJNPID = CopyJNPID;
                ExistingPackage.AddBasedOnExistingJNP();

                base.CurrentJNPID   = ExistingPackage.JNPID;
                base.CurrentJAID    = ExistingPackage.JAID;
                base.CurrentNavMode = enumNavigationMode.Edit;

                ReloadCurrentJNP(ExistingPackage.JNPID);
                CurrentPackage = ExistingPackage;
            }

            this.literalPayPlan.Text = this.CurrentPackage.PayPlanTitle;
            this.literalRegion.Text  = this.CurrentPackage.RegionName;
            this.literalSeries.Text  = string.Format("{0} | {1}", this.CurrentPackage.SeriesID.ToString(), this.CurrentPackage.SeriesName);

            OrganizationCode organizationCode = new OrganizationCode(this.CurrentPackage.OrganizationCodeID);

            this.literalOrganizationCode.Text = organizationCode.DetailLineLegacy;

            this.lblIsStandardJNP.Text = this.CurrentPackage.IsStandardJNP ? GetLocalResourceObject("StandardJNPMessage").ToString() : GetLocalResourceObject("NonStandardJNPMessage").ToString();

            // IsInterdisciplinary field
            if (CopyJNPID > 1)
            {
                this.checkboxIsInterdisciplinary.Enabled = false;
            }

            if (this.CurrentPackage.IsInterdisciplinary)
            {
                this.checkboxIsInterdisciplinary.Checked = true;

                showAdditionalSeries(this.CurrentPackage.IsInterdisciplinary);
                ControlUtility.SafeListControlSelect(this.dropdownAdditionalSeries, this.CurrentPackage.AdditionalSeriesID);

                // IsInterdisciplinary read only fields
                this.literalAdditionalSeries.Text = string.Format("{0} | {1}", this.CurrentPackage.AdditionalSeriesID.ToString(), this.CurrentPackage.AdditionalSeriesName);
            }

            // IsInterdisciplinary read only fields
            this.literalIsInterdisciplinary.Text = this.CurrentPackage.IsInterdisciplinary ? GetLocalResourceObject("InterdisciplinaryMessage").ToString() : GetLocalResourceObject("NonInterdisciplinaryMessage").ToString();

            // load high values
            this.literalHighGrade.Text = this.CurrentPackage.HighestAdvertisedGrade.ToString();
            this.literalFullPD.Text    = string.Format("{0} | {1}", this.CurrentPackage.FullPDID, this.CurrentPackage.FullPDName);

            // if twoGrade then show low grade and preselect additional PD
            this.literalTwoGrade.Text = this.CurrentPackage.AdditionalPDID == -1 ? GetLocalResourceObject("SingleGradeMessage").ToString() : GetLocalResourceObject("TwoGradeMessage").ToString();

            if (this.CurrentPackage.AdditionalPDID != -1L)
            {
                this.divAdditionalPD.Visible           = true;
                this.spanLowestAdvertisedGrade.Visible = true;
                this.literalLowGrade.Text     = this.CurrentPackage.LowestAdvertisedGrade.ToString();
                this.literalAdditionalPD.Text = string.Format("{0} | {1}", this.CurrentPackage.AdditionalPDID, this.CurrentPackage.AdditionalPDName);
            }

            this.literalJNPTitle.Text     = this.CurrentPackage.JNPTitle;
            this.literalFPPSPDID.Text     = this.textBoxFPPSPDID.Text = this.CurrentPackage.FPPSPDID;
            this.literalDutyLocation.Text = this.textboxDutyLocation.Text = this.CurrentPackage.DutyLocation;

            this.checkboxDEU.Checked       = this.CurrentPackage.IsDEU;
            this.checkboxMP.Checked        = this.CurrentPackage.IsMP;
            this.checkboxException.Checked = this.CurrentPackage.IsExceptedService;

            string yesValue = GetLocalResourceObject("AttributeYesValue").ToString();
            string noValue  = GetLocalResourceObject("AttributeNoValue").ToString();

            this.literalIsDeu.Text       = this.CurrentPackage.IsDEU ? yesValue : noValue;
            this.literalIsMP.Text        = this.CurrentPackage.IsMP ? yesValue : noValue;
            this.literalIsException.Text = this.CurrentPackage.IsExceptedService ? yesValue : noValue;

            //For report purpose
            HCMS.Business.JNP.JNPManager.jnpid = base.CurrentJNPID;
        }