Esempio n. 1
0
        public virtual object GetTaskLastSteps(HttpContext context)
        {
            YZRequest request    = new YZRequest(context);
            int       taskid     = request.GetInt32("TaskID");
            int       lastStepId = request.GetInt32("LastStepID");

            BPMStepCollection steps;

            //获得数据
            using (BPMConnection cn = new BPMConnection())
            {
                cn.WebOpen();
                steps = BPMTask.GetAllSteps(cn, taskid);
            }

            BPMStepCollection newSteps = new BPMStepCollection();

            foreach (BPMProcStep step in steps)
            {
                if (step.StepID > lastStepId)
                {
                    newSteps.Add(step);
                }
            }

            return(new
            {
                Steps = this.SerializeSteps(newSteps)
            });
        }
Esempio n. 2
0
        protected virtual BPMStepCollection GetSimulateSteps(BPMTask task, BPMProcStep step, User user)
        {
            BPMStepCollection steps = new BPMStepCollection();

            steps.Add(step);

            BPMProcStep step1;

            step1                 = new BPMProcStep();
            step1.StepID          = 13002;
            step1.TaskID          = 12001;
            step1.NodeName        = "部长审批";
            step1.FinishAt        = DateTime.Now.AddDays(-2);
            step1.OwnerAccount    = "44144";
            step1.OwnerFullName   = "李四";
            step1.HandlerAccount  = "44144";
            step1.HandlerFullName = "李四";
            step1.SelAction       = "同意";
            step1.Comments        = "很棒!";
            steps.Add(step1);

            step1                 = new BPMProcStep();
            step1.StepID          = 13001;
            step1.TaskID          = 12001;
            step1.NodeName        = "开始";
            step1.FinishAt        = DateTime.Now.AddDays(-2);
            step1.OwnerAccount    = "33133";
            step1.OwnerFullName   = "张三";
            step1.HandlerAccount  = "33133";
            step1.HandlerFullName = "张三";
            step1.SelAction       = "提交";
            step1.Comments        = "";
            steps.Add(step1);

            return(steps);
        }