示例#1
0
        protected void rgSearchResults_ItemClick(object sender, RadMenuEventArgs e)
        {
            RadMenu menu = (RadMenu)sender;

            int OrganizatinChartID = int.Parse(menu.DataFieldID);

            enumNavigationMode currentNavigationMode = enumNavigationMode.None;

            if (OrganizatinChartID > 0)
            {
                try
                {
                    switch (e.Item.Value)
                    {
                    case "View":
                        ResetCurrentOrgChart(OrganizatinChartID);
                        currentNavigationMode = enumNavigationMode.View;
                        GoToOrgChartLink("~/OrgChart/OrgChartDetails.aspx", currentNavigationMode);
                        break;

                    case "ViewPublished":
                        ResetCurrentOrgChartLog(OrganizatinChartID);
                        currentNavigationMode = enumNavigationMode.View;
                        GoToOrgChartLink("~/PubOrgChart/OrgChartDetails.aspx", currentNavigationMode);
                        break;

                    case "Edit":
                        ResetCurrentOrgChart(OrganizatinChartID);
                        OrganizationChartManager.Instance.Check(CurrentOrgChartID, CurrentUserID, enumActionType.CheckOut);
                        currentNavigationMode = enumNavigationMode.Edit;
                        GoToOrgChartLink("~/OrgChart/OrgChartDetails.aspx", currentNavigationMode);
                        break;

                    case "ContinueEdit":
                        ResetCurrentOrgChart(OrganizatinChartID);
                        currentNavigationMode = enumNavigationMode.Edit;
                        GoToOrgChartLink("~/OrgChart/OrgChartDetails.aspx", currentNavigationMode);
                        break;

                    case "FinishEdit":
                        ResetCurrentOrgChart(OrganizatinChartID);
                        FinishEditOrgChart(CurrentOrgChartID, CurrentUserID);
                        break;

                    case "Delete":
                        DeleteOrgChart(OrganizatinChartID);
                        break;

                    default:
                        break;
                    }

                    rgSearchResults.Rebind();
                }
                catch (Exception ex)
                {
                    ExceptionBase.HandleException(ex);
                }
            }
        }
 protected override void ToggleReadOnlyView(enumNavigationMode selectedMode)
 {
     try
     {
         bool accessOK = (selectedMode == enumNavigationMode.Insert || selectedMode == enumNavigationMode.Edit);
         customReadOnlyLabel.Visible = !accessOK;
     }
     catch (Exception ex)
     {
         base.HandleException(ex);
     }
 }
        protected override void ToggleReadOnlyView(enumNavigationMode selectedMode)
        {
            try
            {
                bool tempAccessOK = (selectedMode == enumNavigationMode.Insert || selectedMode == enumNavigationMode.Edit);
                this.customReadOnlyLabel.Visible = !tempAccessOK;

                this.buttonMapNewParents.Visible = tempAccessOK;
            }
            catch (Exception ex)
            {
                base.HandleException(ex);
            }
        }
示例#4
0
        protected override void ToggleReadOnlyView(enumNavigationMode selectedMode)
        {
            try
            {
                bool accessOK = (selectedMode == enumNavigationMode.Insert || selectedMode == enumNavigationMode.Edit);
                customReadOnlyLabel.Visible = !accessOK;

                this.gridPositions.Columns[0].Visible = accessOK;   // Delete Abolished Position Column
                this.gridPositions.Columns[1].Visible = accessOK;   // Exclude Abolished Position Column
            }
            catch (Exception ex)
            {
                base.HandleException(ex);
            }
        }
示例#5
0
        protected override void ToggleReadOnlyView(enumNavigationMode selectedMode)
        {
            try
            {
                bool accessOK = (selectedMode == enumNavigationMode.Insert || selectedMode == enumNavigationMode.Edit);
                this.customReadOnlyLabel.Visible = !accessOK;

                // Special case here: the only purpose of the "Include Position" page is to include positions into the organization chart (there is no
                // "read-only" component to this page -- as such -- we simply redirect back to the position manager page)
                if (!accessOK)
                {
                    base.GoToOrgChartPositionManager();
                }
            }
            catch (Exception ex)
            {
                base.HandleException(ex);
            }
        }
 protected override void ToggleReadOnlyView(enumNavigationMode selectedMode)
 {
     throw new NotImplementedException();
 }
 protected override void ToggleReadOnlyView(enumNavigationMode selectedMode)
 {
     // do nothing -- Read-only is not used in this control, but in the underlying controls
 }
示例#8
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);
            }
        }
示例#9
0
        protected void jnpTrackerMenu_ItemClick(object sender, RadMenuEventArgs e)
        {
            RadMenu menu = (RadMenu)sender;

            long JNPID = long.Parse(menu.DataFieldID);
            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":
                    CurrentJNPID = JNPID;
                    //navigateToActiveDocument = true;
                    currentNavigationMode = enumNavigationMode.View;
                    GoToLink("~/JA/JAPositionInformation.aspx", currentNavigationMode);
                    break;

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

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

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

                default:
                    break;
                }

                jnpTrackerGrid.Rebind();

                //if (navigateToActiveDocument)
                //{


                //    if (base.CurrentJNPWS == enumJNPWorkflowStatus.Draft)
                //    {
                //        enumDocumentType activeDocumentType = TrackerItem.GetActiveDocumentType(JNPID);

                //        switch (activeDocumentType)
                //        {
                //            // GoToLink method of UserControlBase provide screen mode as parameter

                //            case enumDocumentType.JNP:
                //            case enumDocumentType.JA:
                //                GoToLink("~/JA/JAPositionInformation.aspx", currentNavigationMode);
                //                break;
                //            case enumDocumentType.CR:
                //                GoToLink("~/CR/CategoryRating.aspx", currentNavigationMode);
                //                break;
                //            case enumDocumentType.JQ:
                //                if ((base.HasHRGroupPermission) || (base.IsAdmin))
                //                {
                //                    GoToLink("~/JQ/Qualifications.aspx", currentNavigationMode);
                //                }
                //                else
                //                {
                //                    GoToLink("~/JQ/JQKSA.aspx", currentNavigationMode);
                //                }

                //                break;
                //            default:
                //                throw new Exception(String.Format("Unexpected JNP Active Document Type: {0}", (int)activeDocumentType));
                //        }
                //    }
                //    else if (base.CurrentJNPWS == enumJNPWorkflowStatus.FinalReview)
                //    {
                //        GoToLink("~/JA/JAPositionInformation.aspx", currentNavigationMode);
                //    }
                //    // Issue # 77 - Modify CommonEnum.cs - Modify enumJNPWorkflowStatus as per the new workflow statuses
                //    //else if (base.CurrentJNPWS  == enumJNPWorkflowStatus.Approval)
                //    //{
                //    //    base.CurrentApprovalObjectType = enumStaffingObjectType.JNP;
                //    //    GoToLink("~/Approval/Approval.aspx", currentNavigationMode);
                //    //}

                //}
                //else
                //{
                //    e.Item.Selected = false;
                //    jnpTrackerGrid.Rebind();
                //}
            }
            catch (Exception ex)
            {
                ExceptionBase.HandleException(ex);
            }
        }