Esempio n. 1
0
 protected void btnConfirmDeleteCR_OK_Click(object sender, EventArgs e)
 {
     ConfirmDeleteCR = true;
     rwConfirmDeleteCR.VisibleOnPageLoad = false;
     CategoryRatingManager.DeleteCategoryRating(CurrentCRID, CurrentUserID);
     buttonSaveAndContinue_Click(sender, e);
 }
Esempio n. 2
0
 public CategoryRating CR()
 {
     if (this.CRID < 0)
     {
         return(null);
     }
     return(CategoryRatingManager.GetByID(this.CRID));
 }
Esempio n. 3
0
 private bool?CheckIfCRIsActive(long crid)
 {
     if (crid > 0)
     {
         CategoryRating categoryRating = CategoryRatingManager.GetByID(Convert.ToInt64(crid));
         return(categoryRating.IsActive);
     }
     else
     {
         return(false);
     }
 }
Esempio n. 4
0
        private void BindData()
        {
            try
            {
                rtbFinalKSA.Text = CategoryRatingManager.GetFinalKSAS(CurrentJAID);

                PopulateCategoryRatingGroups();
            }
            catch (Exception ex)
            {
                ExceptionBase.HandleException(ex);
            }
        }
Esempio n. 5
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);;
                }
            }
        }
Esempio n. 6
0
        protected void btnConfirmDelete_OK_Click(object sender, EventArgs e)
        {
            rwConfirmBeforeDelete.VisibleOnPageLoad = false;

            try
            {
                CategoryRatingManager.DeleteCategoryRating(CurrentCRID, CurrentUserID);

                // MD 8/1: Stay on same page after delete
                //string url = Page.ResolveUrl("~/Package/JNPTracker.aspx");
                //GoToLink(url, CurrentNavMode);

                ReloadCurrentJNP(CurrentJNPID);

                base.GoToLink("~/JQ/FinalJQ.aspx", enumNavigationMode.Edit);
            }
            catch (Exception ex)
            {
                ExceptionBase.HandleException(ex);
            }
        }
Esempio n. 7
0
 private string GetMinimumQualification()
 {
     return(CategoryRatingManager.GetMinimumQualification(TypeOfWorkID, GradeID));
 }
Esempio n. 8
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            bool isValid = true;
            //var wfStatus = WorkflowManager.GetJNPCurrentDocumentWorklfowStatus(CurrentJNPID);
            enumJNPWorkflowStatus wfStatus = base.CurrentJNPWS;

            if (wfStatus != enumJNPWorkflowStatus.Revise &&
                int.Parse(radComboActions.SelectedValue) == (int)enumActionType.SendToReviseToHiringManager &&
                !_confirmQuestionnaireReadiness)
            {
                radComboActions.Enabled = false;
                btnSubmit.Enabled       = false;
                rwConfirmBeforeRevise.VisibleOnPageLoad = true;
                return;
            }

            if (int.Parse(radComboActions.SelectedValue) != (int)enumActionType.DeleteCategoryRating)
            {
                if (ScreenValidationEvent != null)
                {
                    ScreenValidationEventArgs validationArgs = new ScreenValidationEventArgs();
                    ScreenValidationEvent(this, validationArgs);
                    isValid = validationArgs.IsValid;
                }
            }


            if (isValid)
            {
                enumActionType actiontypeid     = (enumActionType)(int.Parse(radComboActions.SelectedValue));
                WorkflowObject wo               = CurrentWorkflowObject;
                long           parentobjectid   = wo.ParentObjectID;
                string         url              = string.Empty;
                string         validationErrors = string.Empty;
                bool           blnhaserror      = false;
                HasErrors = false;
                long checkid = -1;
                WorkflowObjectSavedEventArgs we;

                try
                {
                    switch (actiontypeid)
                    {
                    case enumActionType.SendToReviewToHiringManager:
                    case enumActionType.SendToReviewToHumanResources:

                        validationErrors = WorkflowManager.GetStaffingObjetValidationErros(wo.StaffingObjectID, wo.StaffingObjectTypeID, ref blnhaserror, true);


                        if (blnhaserror)
                        {
                            HasErrors = true;
                            customValidator.ErrorMessage = validationErrors;
                            Page.Validate();
                        }
                        else
                        {
                            we = new WorkflowObjectSavedEventArgs();
                            if (WorkflowObjectSaved != null)
                            {
                                WorkflowObjectSaved(this, we);
                            }
                            if (!we.Cancel)
                            {
                                if (WorkflowManager.SetCurrentWorkflowStatus(wo, (int)enumJNPWorkflowStatus.Review, true) > 0)
                                {
                                    GoToLink(Page.ResolveUrl("~/Package/JNPTracker.aspx"));
                                }
                            }
                        }
                        break;

                    case enumActionType.SendToReviseToHiringManager:
                    case enumActionType.SendToReviseToHumanResources:
                        validationErrors = WorkflowManager.GetStaffingObjetValidationErros(wo.StaffingObjectID, wo.StaffingObjectTypeID, ref blnhaserror, true);

                        if (blnhaserror)
                        {
                            HasErrors = true;
                            customValidator.ErrorMessage = validationErrors;
                            Page.Validate();
                        }
                        else
                        {
                            we = new WorkflowObjectSavedEventArgs();
                            if (WorkflowObjectSaved != null)
                            {
                                WorkflowObjectSaved(this, we);
                            }
                            if (!we.Cancel)
                            {
                                if (WorkflowManager.SetCurrentWorkflowStatus(wo, (int)enumJNPWorkflowStatus.Revise, true) > 0)
                                {
                                    GoToLink(Page.ResolveUrl("~/Package/JNPTracker.aspx"));
                                }
                            }
                        }
                        break;

                    case enumActionType.SendForFinalReviewToHumanResources:
                        validationErrors = WorkflowManager.GetStaffingObjetValidationErros(wo.StaffingObjectID, wo.StaffingObjectTypeID, ref blnhaserror, true);

                        if (blnhaserror)
                        {
                            HasErrors = true;
                            customValidator.ErrorMessage = validationErrors;
                            Page.Validate();
                        }
                        else
                        {
                            we = new WorkflowObjectSavedEventArgs();
                            if (WorkflowObjectSaved != null)
                            {
                                WorkflowObjectSaved(this, we);
                            }
                            if (!we.Cancel)
                            {
                                if (WorkflowManager.SetJNPCurrentWorkflowStatus(CurrentJNPID, (int)enumJNPWorkflowStatus.FinalReview, enumWorkflowStatusType.JNP, CurrentUserID, true) > 0)
                                {
                                    GoToLink(Page.ResolveUrl("~/Package/JNPTracker.aspx"));
                                }
                            }
                        }
                        break;

                    case enumActionType.SaveAndUnlock:
                        we = new WorkflowObjectSavedEventArgs();
                        if (WorkflowObjectSaved != null)
                        {
                            WorkflowObjectSaved(this, we);
                        }
                        if (!we.Cancel)
                        {
                            if ((wo.ParentObjectID > 0) && (wo.ParentObjetTypeID == enumStaffingObjectType.JNP))
                            {
                                checkid = WorkflowManager.CheckStaffingObject(wo.ParentObjectID, wo.ParentObjetTypeID, enumActionType.CheckIn, wo.UserID);
                            }

                            if (checkid > 0)
                            {
                                GoToLink(Page.ResolveUrl("~/Package/JNPTracker.aspx"));
                            }
                        }
                        break;

                    case enumActionType.CreateCategoryRatingOptional:
                        if (CategoryRatingManager.CreateCategoryRatingFromJobAnalysis(CurrentJNPID, CurrentJAID, false, CurrentUserID) > 0)
                        {
                            ReloadCurrentJNP(base.CurrentJNPID);
                            GoToLink(Page.ResolveUrl("~/CR/CategoryRating.aspx"), base.CurrentNavMode);
                        }
                        break;

                    case enumActionType.RestoreCategoryRatingOptional:
                        if (CategoryRatingManager.RestoreCategoryRating(CurrentCRID, CurrentUserID) > 0)
                        {
                            ReloadCurrentJNP(base.CurrentJNPID);
                            GoToLink(Page.ResolveUrl("~/CR/CategoryRating.aspx"), base.CurrentNavMode);
                        }
                        break;

                    case enumActionType.CheckAndPublish:
                        validationErrors = WorkflowManager.GetStaffingObjetValidationErros(wo.StaffingObjectID, wo.StaffingObjectTypeID, ref blnhaserror, true);

                        if (blnhaserror)
                        {
                            HasErrors = true;
                            customValidator.ErrorMessage = validationErrors;
                            Page.Validate();
                        }
                        else
                        {
                            if (WorkflowManager.SetJNPCurrentWorkflowStatus(CurrentJNPID, (int)enumJNPWorkflowStatus.Published, enumWorkflowStatusType.JNP, CurrentUserID, true) > 0)
                            {
                                lblmsg.Text = "Document is published.";
                                BindActions();
                                base.GetActiveDocumentType(true);

                                //Below is no longer in scope for new requirement.
                                //base.GetJNPCurrentDocumentWorklfowStatus(true);

                                GoToLink(Page.ResolveUrl(string.Format("~/Package/Publish.aspx?JNPID={0}", CurrentJNPID)));
                            }
                        }
                        break;

                    default:
                        break;
                    }
                }
                catch (Exception ex)
                {
                    HandleException(ex);
                }
            }
        }