Esempio n. 1
0
        private void SetContinueAndWFActionDD()
        {
            // Get a fresh JNP load in case some piece has changed since it was cached
            ReloadCurrentJNP(base.CurrentJNPID);
            bool isThisLastScreen = (base.LastScreen() == enumLastScreen.JQ);
            bool isJNPPublished   = CurrentJNP.IsPublished();

            this.btnContinue.Visible     = !isThisLastScreen;
            this.ctrlWActManager.Visible = base.IsInEdit && isThisLastScreen && !isJNPPublished;
            if (this.ctrlWActManager.Visible)
            {
                BindActionsDD();
            }
        }
Esempio n. 2
0
        private void SetContinueAndWFActionDD()
        {
            // Get a fresh JNP load in case some piece has changed since it was cached
            ReloadCurrentJNP(base.CurrentJNPID);
            bool isThisLastScreen = (base.LastScreen() == enumLastScreen.CR);
            bool isJNPPublished   = CurrentJNP.IsPublished();

            this.btnContinue.Visible     = base.ShowEditFields(enumDocumentType.CR) && !isThisLastScreen;
            this.ctrlWActManager.Visible = base.ShowEditFields(enumDocumentType.CR) && isThisLastScreen && !isJNPPublished;
            if (this.ctrlWActManager.Visible)
            {
                BindActionsDD();
            }

            // If we're in edit mode, the JNP is not DEU and we actually have a CR
            // then allow/show the delete button.
            this.btnDelete.Visible = base.ShowEditFields(enumDocumentType.CR);

            if (CurrentJNPWS == enumJNPWorkflowStatus.FinalReview)
            {
                this.btnContinue.Visible = true;
            }
        }
Esempio n. 3
0
        private void setPageAppropriateView()
        {
            bool isThisLastScreen = (base.LastScreen() == enumLastScreen.Approval);
            bool isJNPPublished   = CurrentJNP.IsPublished();

            btnSupervisorSign.Enabled       = false;
            rblSupSignType.Items[0].Enabled = false;
            rblSupSignType.Items[1].Enabled = false;
            btnSupervisorSign.Enabled       = false;
            spanWorkflowManager.Visible     = isThisLastScreen && !isJNPPublished;

            tblSupApprovals.Visible        = false;
            tblMessageBeforSigning.Visible = true;

            if (CurrentJNPWS == enumJNPWorkflowStatus.Revise)
            {
                //JA issue: 965: Signature Right for SysAdms is factoring in SupStatus Code in JAX for HM role/sign even though it shouldn't
                //System admin should be able to sign as supervisor regardless of their supervisory status code
                if (base.IsOrgCodeSupervisor(CurrentJNP.OrganizationCodeID) || base.IsSystemAdministrator)
                {
                    if (this.JNPApprovalEntity.SupervisorID <= 0)
                    {
                        if (base.CurrentNavMode == enumNavigationMode.View)
                        {
                            lblMessageBeforSigning.Text = "Please notify Supervisor that this Job Announcement is ready for their review and signature.";
                        }
                        else
                        {
                            rblSupSignType.Items[0].Enabled  = true;
                            rblSupSignType.Items[0].Selected = true;
                            btnSupervisorSign.Enabled        = true;
                            tblSupApprovals.Visible          = true;
                            spanWorkflowManager.Visible      = true;
                        }
                    }
                    else
                    {
                        if (base.CurrentNavMode == enumNavigationMode.View)
                        {
                            spanWorkflowManager.Visible = false;
                            lblMessageBeforSigning.Text = "Please notify Supervisor that this Job Announcement is ready for their review and signature.";
                        }
                        else
                        {
                            tblSupApprovals.Visible     = true;
                            spanWorkflowManager.Visible = true;
                        }
                    }
                }
                else
                {
                    if (this.JNPApprovalEntity.SupervisorID <= 0)
                    {
                        if (base.CurrentNavMode == enumNavigationMode.View)
                        {
                            spanWorkflowManager.Visible = false;
                            lblMessageBeforSigning.Text = "Please notify Supervisor that this Job Announcement is ready for their review and signature.";
                        }
                        else
                        {
                            lblMessageBeforSigning.Text = "Please unlock this package and notify your Supervisor that this Job Announcement is ready for their review and signature.";
                            spanWorkflowManager.Visible = true;
                        }
                    }

                    if (base.CurrentNavMode == enumNavigationMode.View)
                    {
                        spanWorkflowManager.Visible = false;
                    }
                }
            }


            if ((CurrentJNPWS == enumJNPWorkflowStatus.FinalReview) && (base.CurrentUser.HasPermission(enumPermission.CompleteJNPCertification)))
            {
                if (this.JNPApprovalEntity.HRPersonnelID <= 0)
                {
                    rblSupSignType.Items[1].Enabled  = true;
                    rblSupSignType.Items[1].Selected = true;
                    btnSupervisorSign.Enabled        = true;
                    spanWorkflowManager.Visible      = true;
                    tblSupApprovals.Visible          = true;
                }
                else
                {
                    rblSupSignType.Items[0].Enabled = false;
                    rblSupSignType.Items[1].Enabled = false;
                    btnSupervisorSign.Enabled       = false;
                    spanWorkflowManager.Visible     = isThisLastScreen && !isJNPPublished;

                    tblSupApprovals.Visible = false;

                    //If HM signed and HR signed and status is in Final Review, it is ready to publish.
                    if (this.JNPApprovalEntity.SupervisorID > 0 && this.JNPApprovalEntity.HRPersonnelID > 0)
                    {
                        lblMessageBeforSigning.Visible = false;
                        tblMessageBeforSigning.Visible = true;
                    }
                    else
                    {
                        lblMessageBeforSigning.Text    = "Please unlock this package and notify the Staffing Specialist that this Job Announcement is ready for their review and signature.";
                        tblMessageBeforSigning.Visible = true;
                    }
                }
            }

            if (this.JNPApprovalEntity.SupervisorID > 0 && this.JNPApprovalEntity.HRPersonnelID > 0)
            {
                btnSupervisorSign.Enabled   = false;
                txtSupOrgTitle.Enabled      = false;
                txtSupervisorPwd.Enabled    = false;
                btnSupervisorSign.Enabled   = false;
                ctrlworkflowManager.Visible = isThisLastScreen && !isJNPPublished;

                //Make the approval info visible for the published JNP
                if (CurrentJNPWS == enumJNPWorkflowStatus.Published)
                {
                    rblSupSignType.Items[0].Enabled  = false;
                    rblSupSignType.Items[0].Selected = false;
                    btnSupervisorSign.Enabled        = false;
                    spanWorkflowManager.Visible      = false;

                    TableRow trSignAs = FindControl("trSignAs") as TableRow;

                    if (trSignAs != null)
                    {
                        trSignAs.Visible = false;
                    }

                    TableRow trOrgTitle = FindControl("trOrgTitle") as TableRow;

                    if (trOrgTitle != null)
                    {
                        trOrgTitle.Visible = false;
                    }

                    TableRow trSupPwd = FindControl("trSupPwd") as TableRow;
                    if (trSupPwd != null)
                    {
                        trSupPwd.Visible = false;
                    }
                }
            }

            if (CurrentJNPWS == enumJNPWorkflowStatus.FinalReview)
            {
                if (!(base.CurrentUser.HasPermission(enumPermission.CompleteJNPCertification)))
                {
                    lblMessageBeforSigning.Visible = true;
                    lblMessageBeforSigning.Text    = "Please notify the HR that this Job Announcement is ready for signature and publish.";
                }
            }
            if (base.CurrentNavMode == enumNavigationMode.View)
            {
                spanWorkflowManager.Visible = false;
            }
        }