Exemplo n.º 1
0
        /// <summary>
        /// 取得发起步骤的步骤模板的实体
        /// </summary>
        /// <returns></returns>
        public TemplateStep GerFirstTemplateStep(InstanceStep AInstanceStepEntity = null)
        {
            InstanceStep vNewInstanceStepEntity = AInstanceStepEntity;

            if (vNewInstanceStepEntity == null)
            {
                vNewInstanceStepEntity = GerFirstInstanceStep();
            }

            if (vNewInstanceStepEntity == null)
            {
                return(null);
            }

            return(GetTemplateStep(vNewInstanceStepEntity.StepId));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 取得由已走步骤生成的步骤模板顺序(由前到后)
        /// </summary>
        /// <returns></returns>
        private List <TemplateStep> GetTemplateStepOrder()
        {
            List <TemplateStep> vList       = new List <TemplateStep>(10);
            InstanceStep        vStepEntity = InstanceStep;
            TemplateStep        vStepModel  = null;

            do
            {
                vStepEntity = GetInstanceStep(vStepEntity.PreviousInstanceStepId);
                if (vStepEntity == null)
                {
                    break;
                }
                if (vStepEntity.Status.Equals(6))
                {
                    vStepModel = GetTemplateStep(vStepEntity.StepId);
                    if (vStepModel != null && !vList.Exists(AItem => AItem.Fid.Equals(vStepModel.Fid)))
                    {
                        vList.Add(vStepModel);
                    }
                }
            } while (vStepEntity != null && (vStepModel == null || vStepModel != null && !vStepModel.StepType.Equals(0)));
            return(vList);
        }