protected void btnContinue_Click(object sender, EventArgs e) { bool navigate = true; //invoke validation only in non view mode if (CurrentNavMode != enumNavigationMode.View) { if (!Page.IsValid) { navigate = false; } } if (navigate) { enumJNPWorkflowStatus currentws = base.CurrentJNPWS; if ((currentws == enumJNPWorkflowStatus.Draft) && (CurrentUser.RoleID == (int)enumRole.PDDeveloper || CurrentUser.RoleID == (int)enumRole.Supervisor)) { GoToLink("~/JQ/JQKSA.aspx", base.CurrentNavMode); } else { GoToLink("~/JQ/Qualifications.aspx", base.CurrentNavMode); } } }
private void SetPageView() { enumJNPWorkflowStatus currentws = base.CurrentJNPWS; //enumDocWorkflowStatus currentdocws = base.GetJNPCurrentDocumentWorklfowStatus(false); //bool isActiveDocument = true; //if ((currentws == enumJNPWorkflowStatus.Draft)) //{ // if (base.GetActiveDocumentType(false) != enumDocumentType.JQ) // { isActiveDocument = false; } //} //bool showEditFields = ((base.IsInEdit) // && ((currentws == enumJNPWorkflowStatus.Draft || currentws == enumJNPWorkflowStatus.Review) // || (currentws == enumJNPWorkflowStatus.Revise && !CurrentJNP.IsJNPSignedBySupervisor) // || (currentws == enumJNPWorkflowStatus.FinalReview && !CurrentJNP.IsJNPSignedByHR)) // ); if ((base.IsViewOnly) || (!base.ShowEditFields(enumDocumentType.JQ))) { btnSaveContinue.Text = "Continue"; btnSaveContinue.ToolTip = "Continue"; } else { this.btnSaveContinue.Text = "Save and Continue"; this.btnSaveContinue.ToolTip = "Save and Continue"; } }
public static enumJNPWorkflowStatus GetCurrentWorkflowStatusName(long jnpID) { JNPWorkflowStatus currentws = JNPWorkflowStatus.GetCurrentJNPWorkflowStatus(jnpID); enumJNPWorkflowStatus enumcurrentws = (enumJNPWorkflowStatus)currentws.JNPWorkflowStatusID; return(enumcurrentws); }
private void SetTopMenu() { switch (this.TopMenuType) { case enumTopMenuType.JNPHomeMenu: this.TopMenuDS.DataFile = Page.ResolveUrl("~/App_Data/TopNavJNP.xml"); break; case enumTopMenuType.JAMenu: case enumTopMenuType.CRMenu: case enumTopMenuType.JQMenu: case enumTopMenuType.ApprovalMenu: //get current JNP WS - if not in approval hide the approval tab const string CurrentJNPWS = "CurrentJNPWS"; if ((HttpContext.Current.Session[CurrentJNPWS] != null) && ((int)HttpContext.Current.Session[CurrentJNPWS] != -1)) { this.lblCurrentStatus.Text = ((enumJNPWorkflowStatus)HttpContext.Current.Session[CurrentJNPWS]).ToString(); this.lblJAnPID.Text = CurrentPackage.JNPID.ToString(); enumJNPWorkflowStatus currentjnpws = (enumJNPWorkflowStatus)HttpContext.Current.Session[CurrentJNPWS]; if (currentjnpws == enumJNPWorkflowStatus.Revise || currentjnpws == enumJNPWorkflowStatus.FinalReview || currentjnpws == enumJNPWorkflowStatus.Published) { this.TopMenuDS.DataFile = Page.ResolveUrl("~/App_Data/TopNavJNPWizardApproval.xml"); } else { this.TopMenuDS.DataFile = Page.ResolveUrl("~/App_Data/TopNavJNPWizard.xml"); } } else { this.TopMenuDS.DataFile = Page.ResolveUrl("~/App_Data/TopNavJNPWizard.xml"); } break; } radTabJNPTopMenu.DataBind(); }
protected void SetPageView() { //Issue 1001 - Added a link in Duty KSA page to display the First Factor langauge in a popup screen. string urlhlFactor1 = string.Format("../JA/Factor1PopUp.aspx"); hlFactor1.NavigateUrl = urlhlFactor1; hlFactor1.Attributes.Add("onclick", "javascript:ShowFirstFactorLanguagePopup(); return false;"); enumJNPWorkflowStatus currentws = base.CurrentJNPWS; GridColumn Editcolumn = rgJADuty.MasterTableView.OwnerGrid.Columns.FindByUniqueName("EditCommandColumn"); GridColumn Deletecolumn = rgJADuty.MasterTableView.OwnerGrid.Columns.FindByUniqueName("DeleteCommandColumn"); GridColumn Viewcolumn = rgJADuty.MasterTableView.OwnerGrid.Columns.FindByUniqueName("ViewCommandColumn"); //View if (CurrentNavMode == enumNavigationMode.View) { //no add rgJADuty.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None; //edit column should not be visible if (Editcolumn != null) { Editcolumn.Visible = false; Editcolumn.Display = false; } // no delete if (Deletecolumn != null) { Deletecolumn.Visible = false; } //only View if (Viewcolumn != null) { Viewcolumn.Visible = true; Viewcolumn.Display = true; } btnContinue.Text = "Continue"; btnContinue.ToolTip = "Continue"; rgJADuty.Rebind(); // To hide the Add New Duty link in View mode. } //Edit else { //admin if ((base.IsAdmin) && (base.InProcessJNPWorkflowStatuses.Contains(currentws))) { //allow add rgJADuty.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top; //allow edit if (Editcolumn != null) { Editcolumn.Visible = true; Editcolumn.Display = true; } // allow delete if (Deletecolumn != null) { Deletecolumn.Visible = true; } //hide View if (Viewcolumn != null) { Viewcolumn.Visible = false; Viewcolumn.Display = false; } } else //non -admin --edit { //Issue 1060 Editable for HR in FinalReview if ((base.HasHRGroupPermission) && (CurrentJNPWS == enumJNPWorkflowStatus.FinalReview) && (!CurrentJNP.IsJNPSignedByHR)) { //allow add rgJADuty.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top; //allow edit if (Editcolumn != null) { Editcolumn.Visible = true; Editcolumn.Display = true; } // allow delete if (Deletecolumn != null) { Deletecolumn.Visible = true; } //hide View if (Viewcolumn != null) { Viewcolumn.Visible = false; Viewcolumn.Display = false; } } else { bool showedit = base.ShowEditFields(enumDocumentType.JA); Editcolumn.Visible = showedit; Deletecolumn.Visible = showedit; Viewcolumn.Visible = !showedit; //add if (showedit) { rgJADuty.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top; } else { rgJADuty.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None; } // In Final Review: User should not be allowed to add new duty/edit/delete existing duty regardless of signatures if (currentws == enumJNPWorkflowStatus.FinalReview) { rgJADuty.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None; Editcolumn.Visible = false; Deletecolumn.Visible = false; Viewcolumn.Visible = true; } } } rgJADuty.Rebind(); } SetGridQualView(); //Scroll to the top to dispaly the validation message. List <JobAnalysisDuty> currentJADuties = CurrentJobAnalysis.GetJobAnalysisDuty(); int totalDutyPct = 0; foreach (JobAnalysisDuty duty in currentJADuties) { totalDutyPct += duty.JAPercentageOfTime; } if ((totalDutyPct != 100) || (!CheckIfEachMajorDutyHasOneDutyKSA())) { btnContinue.OnClientClick = "scrolltoTopDuty()"; } }
private void SetGridQualView() { //COE grid //Admin can add/delete/edit COE from Draft - Final Review //HR can add/delete/edit COE through Revise. //HR can only edit COE in Final Review --Can not add/delete //PDDeveloper/Supervisor can not make any changes to this in any status enumJNPWorkflowStatus currentws = base.CurrentJNPWS; GridColumn Editcolumn = rgQual.MasterTableView.OwnerGrid.Columns.FindByUniqueName("EditCommandColumn"); GridColumn Deletecolumn = rgQual.MasterTableView.OwnerGrid.Columns.FindByUniqueName("DeleteCommandColumn"); // GridColumn Viewcolumn = rgQual.MasterTableView.OwnerGrid.Columns.FindByUniqueName("ViewCommandColumn"); //View if (CurrentNavMode == enumNavigationMode.View) { SetQualificationGridInView(); } //Edit else { //admin if ((base.IsAdmin) && (base.InProcessJNPWorkflowStatuses.Contains(currentws))) { //allow add rgQual.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top; //allow edit if (Editcolumn != null) { Editcolumn.Visible = true; Editcolumn.Display = true; } // allow delete if (Deletecolumn != null) { Deletecolumn.Visible = true; } //hide View //if (Viewcolumn != null) //{ // Viewcolumn.Visible = false; // Viewcolumn.Display = false; //} } else //non -admin --edit { //HR can add/delete/edit COE through Revise. if (base.HasHRGroupPermission) { if ((currentws == enumJNPWorkflowStatus.Draft) || (currentws == enumJNPWorkflowStatus.Review) || ((currentws == enumJNPWorkflowStatus.Revise) && (!CurrentJNP.IsJNPSignedBySupervisor))) { //allow add rgQual.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top; //allow edit if (Editcolumn != null) { Editcolumn.Visible = true; Editcolumn.Display = true; } // allow delete if (Deletecolumn != null) { Deletecolumn.Visible = true; } //hide View //if (Viewcolumn != null) //{ // Viewcolumn.Visible = false; // Viewcolumn.Display = false; //} } else if ((currentws == enumJNPWorkflowStatus.FinalReview) && (!CurrentJNP.IsJNPSignedByHR)) { //no add rgQual.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None; // no delete if (Deletecolumn != null) { Deletecolumn.Visible = false; } //allow only edit if (Editcolumn != null) { Editcolumn.Visible = true; Editcolumn.Display = true; } } else //Revise & signed/Final Review & signed { SetQualificationGridInView(); } } else //PD Developer/Supervisor { SetQualificationGridInView(); } } //end of non admin } //end of edit //Making to disable add/edit Overall Qualification i.e. Condition of Employment. rgQual.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None; Editcolumn.Visible = false; Deletecolumn.Visible = false; rgQual.Rebind(); }
private void SetGridQualificationsView() { enumJNPWorkflowStatus currentws = CurrentJNPWS; GridColumn Editcolumn = gridQualifications.MasterTableView.OwnerGrid.Columns.FindByUniqueName("EditCommandColumn");//gridQualifications.Columns[0];//gridQualifications.MasterTableView.EditFormSettings.EditColumn; GridColumn Deletecolumn = gridQualifications.MasterTableView.OwnerGrid.Columns.FindByUniqueName("DeleteCommandColumn"); GridColumn Viewcolumn = gridQualifications.MasterTableView.OwnerGrid.Columns.FindByUniqueName("ViewCommandColumn"); //View if (CurrentNavMode == enumNavigationMode.View) { //no add gridQualifications.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None; //edit column should not be visible if (Editcolumn != null) { Editcolumn.Visible = false; Editcolumn.Display = false; } // no delete if (Deletecolumn != null) { Deletecolumn.Visible = false; } //only View if (Viewcolumn != null) { Viewcolumn.Visible = true; Viewcolumn.Display = true; } } else //edit mode { if (Viewcolumn != null) { Viewcolumn.Visible = false; Viewcolumn.Display = false; } if (((currentws == enumJNPWorkflowStatus.Revise) && (CurrentJNP.IsJNPSignedBySupervisor)) || ((currentws == enumJNPWorkflowStatus.FinalReview) && (CurrentJNP.IsJNPSignedByHR))) { //View column should display if (Viewcolumn != null) { Viewcolumn.Display = true; Viewcolumn.Visible = true; } //edit column should not be visible when package is signed if (Editcolumn != null) { Editcolumn.Visible = false; } } else { //edit column should be visible when currentnav mode is edit --and package is not signed if (Editcolumn != null) { Editcolumn.Visible = true; } } //admin should be able to add/edit/ delete regard less of workflowstatus/even if the package is signed if (base.IsAdmin) { //show add gridQualifications.MasterTableView.CommandItemSettings.ShowAddNewRecordButton = true; gridQualifications.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top; //hide view if (Viewcolumn != null) { Viewcolumn.Display = false; } //edit column should be visible when currentnav mode is edit if (Editcolumn != null) { Editcolumn.Visible = true; } //show delete if (Deletecolumn != null) { Deletecolumn.Visible = true; } } else if (base.HasHRGroupPermission) { //HR should be able to add/delete in draft/review/revise (until signed) //In Final review only No add/No delete option even for HR switch (currentws) { case enumJNPWorkflowStatus.Draft: case enumJNPWorkflowStatus.Review: //show ad gridQualifications.MasterTableView.CommandItemSettings.ShowAddNewRecordButton = true; gridQualifications.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top; //show delete if (Deletecolumn != null) { Deletecolumn.Visible = true; } break; case enumJNPWorkflowStatus.Revise: if (!CurrentJNP.IsJNPSignedBySupervisor) { //show add gridQualifications.MasterTableView.CommandItemSettings.ShowAddNewRecordButton = true; gridQualifications.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top; //show delete if (Deletecolumn != null) { Deletecolumn.Visible = true; } } break; case enumJNPWorkflowStatus.FinalReview: //Issue 1060 Editable for HR in FinalReview if (CurrentJNP.IsJNPSignedByHR) { gridQualifications.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None; if (Deletecolumn != null) { Deletecolumn.Visible = false; } } else { //show add gridQualifications.MasterTableView.CommandItemSettings.ShowAddNewRecordButton = true; gridQualifications.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top; //hide view if (Viewcolumn != null) { Viewcolumn.Display = false; } //edit column should be visible when currentnav mode is edit if (Editcolumn != null) { Editcolumn.Visible = true; } //show delete if (Deletecolumn != null) { Deletecolumn.Visible = true; } } //if (CurrentJNP.IsJNPSignedByHR) // Deletecolumn.Visible = false; break; } } else //If user is not Admin/HR don't show add/delete option { gridQualifications.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None; if (Deletecolumn != null) { Deletecolumn.Visible = false; } } } gridQualifications.Rebind(); }
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); } } }
protected void SetPageView() { bool isInViewMode = (base.CurrentNavMode == enumNavigationMode.View); GridColumn Viewcolumn = rgDutyKSA.MasterTableView.OwnerGrid.Columns.FindByUniqueName("ViewCommandColumn"); //commenting this because instead of checking currentNaveMode, checking //if current active document is JA to enable/disable controls //because a package can be in edit mode but current document is not //an active document then edit controls should be disabled // //bool isInViewMode = (base.CurrentNavMode == enumNavigationMode.View); enumJNPWorkflowStatus currentws = base.CurrentJNPWS; //Author: Deepali Anuje //Issue: 294 //Description: Create From Existing: Duty/KSA screen of JA not locked after JA Finalized //Issue: 423 Job Analysis is Editable in Approval Status (by HM / HR) added check for currentws bool blnEnabled = (IsInEdit || IsInInsert) && ((currentws == enumJNPWorkflowStatus.Draft || currentws == enumJNPWorkflowStatus.Review) || (currentws == enumJNPWorkflowStatus.Revise && !CurrentJNP.IsJNPSignedBySupervisor)); //radcomboPercentageofTime.Enabled = blnEnabled; btnSave.Enabled = blnEnabled; rgDutyKSA.Columns[0].Display = blnEnabled; //edit column rgDutyKSA.Columns[1].Display = blnEnabled; //delete column rgDutyKSA.Columns[2].Display = !blnEnabled; //view column if (!blnEnabled) { rgDutyKSA.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None; //hiding add new commands rgDutyKSA.Rebind(); } if (IsInInsert) //hiding duty qualification section when add new duty { this.dutyDetail.Visible = false; } else { this.dutyDetail.Visible = true; } if (base.IsAdmin) { if ((!isInViewMode) && (currentws != enumJNPWorkflowStatus.Published)) { rgDutyKSA.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top; rgDutyKSA.Rebind(); radcomboPercentageofTime.Enabled = true; btnSave.Enabled = true; rgDutyKSA.Columns[0].Display = true; //edit column rgDutyKSA.Columns[1].Display = true; //delete column rgDutyKSA.Columns[2].Display = true; //view column } } //Issue 1060 Editable for HR in FinalReview if ((base.HasHRGroupPermission) && (CurrentJNPWS == enumJNPWorkflowStatus.FinalReview) && (!CurrentJNP.IsJNPSignedByHR)) { rgDutyKSA.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top; rgDutyKSA.Rebind(); radcomboPercentageofTime.Enabled = true; btnSave.Enabled = true; rgDutyKSA.Columns[0].Display = true; //edit column rgDutyKSA.Columns[1].Display = true; //delete column rgDutyKSA.Columns[2].Display = true; //view column } if (isInViewMode) { rgDutyKSA.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None; //radcomboPercentageofTime.Enabled = false; btnSave.Enabled = false; rgDutyKSA.Columns[0].Display = false; //edit column rgDutyKSA.Columns[1].Display = false; //delete column rgDutyKSA.Columns[2].Display = true; //view column // For Issue 991 - To make view column invisible Viewcolumn.Visible = false; } else { Viewcolumn.Visible = false; } }
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); } } }