Пример #1
0
        public override void Finish(TaskWorkStatus status, TaskWork task)
        {
            var info = RenewalInfo.Get(ProjectId);

            switch (status)
            {
            case TaskWorkStatus.K2ProcessApproved:
                ProjectProgress.SetProgress(ProjectId, "50%");
                ProjectInfo.FinishNode(ProjectId, FlowCode.Renewal_Analysis, NodeCode.Finish, ProjectStatus.Finished);
                if (info.RenewalYears > 2)
                {
                    if (!ProjectInfo.FlowHaveTask(ProjectId, FlowCode.Renewal_ClearanceReport))
                    {
                        info.GenerateSubmitTask(FlowCode.Renewal_ClearanceReport);
                    }
                }
                else
                {
                    ProjectInfo.FinishProject(this.ProjectId, FlowCode.Renewal_ClearanceReport);
                    if (!ProjectInfo.FlowHaveTask(ProjectId, FlowCode.Renewal_ConfirmLetter))
                    {
                        info.GenerateSubmitTask(FlowCode.Renewal_ConfirmLetter);
                    }
                }

                break;

            case TaskWorkStatus.K2ProcessDeclined:
                break;
            }
        }
Пример #2
0
        public override void Finish(TaskWorkStatus status, TaskWork task)
        {
            var info = RenewalInfo.Get(ProjectId);

            switch (status)
            {
            case TaskWorkStatus.K2ProcessApproved:
                ProjectProgress.SetProgress(ProjectId, "60%");
                ProjectInfo.FinishNode(ProjectId, this.WorkflowCode, NodeCode.Finish, ProjectStatus.Finished);
                if (!ProjectInfo.FlowHaveTask(ProjectId, FlowCode.Renewal_ConfirmLetter))
                {
                    info.GenerateSubmitTask(FlowCode.Renewal_ConfirmLetter);
                }
                break;

            case TaskWorkStatus.K2ProcessDeclined:
                break;
            }
        }