コード例 #1
0
 public ActionResult GoTo(FormCollection collection)
 {
     if (collection != null)
     {
         string[] array = (base.Request.Form["step"] ?? "").Split(',');
         Dictionary <Guid, string> dictionary = new Dictionary <Guid, string>();
         string[] array2 = array;
         foreach (string text in array2)
         {
             if (MyExtensions.IsGuid(text))
             {
                 string text2 = base.Request.Form["member_" + text];
                 if (!MyExtensions.IsNullOrEmpty(text2))
                 {
                     dictionary.Add(MyExtensions.ToGuid(text), text2);
                 }
             }
         }
         RoadFlow.Data.Model.WorkFlowTask workFlowTask  = null;
         RoadFlow.Platform.WorkFlowTask   workFlowTask2 = new RoadFlow.Platform.WorkFlowTask();
         string text3 = base.Request.QueryString["taskid"];
         workFlowTask = workFlowTask2.Get(MyExtensions.ToGuid(text3));
         bool flag = workFlowTask2.GoToTask(workFlowTask, dictionary);
         base.ViewBag.script = "alert('跳转" + (flag ? "成功" : "失败") + "');new RoadUI.Window().reloadOpener();new RoadUI.Window().close();";
     }
     return(View());
 }
コード例 #2
0
        public ActionResult ChangeStatus(FormCollection collection)
        {
            RoadFlow.Platform.WorkFlowTask   workFlowTask  = new RoadFlow.Platform.WorkFlowTask();
            RoadFlow.Data.Model.WorkFlowTask workFlowTask2 = null;
            string text  = string.Empty;
            string empty = string.Empty;

            empty = base.Request.QueryString["taskid"];
            if (MyExtensions.IsGuid(empty))
            {
                workFlowTask2 = workFlowTask.Get(MyExtensions.ToGuid(empty));
            }
            if (workFlowTask2 != null)
            {
                text = base.Request.Form["Status"];
                if (MyExtensions.IsInt(text))
                {
                    string oldXML = MyExtensions.Serialize((object)workFlowTask2);
                    workFlowTask2.Status = MyExtensions.ToInt(text);
                    workFlowTask.Update(workFlowTask2);
                    RoadFlow.Platform.Log.Add("改变了流程任务状态", "改变了流程任务状态", RoadFlow.Platform.Log.Types.流程相关, oldXML, MyExtensions.Serialize((object)workFlowTask2));
                    base.ViewBag.Script = "alert('设置成功!');new RoadUI.Window().reloadOpener();new RoadUI.Window().close();";
                }
            }
            base.ViewBag.Status = text;
            return(View());
        }
コード例 #3
0
        public ActionResult DetailSubFlow()
        {
            RoadFlow.Platform.WorkFlowTask bworkFlowTask = new RoadFlow.Platform.WorkFlowTask();
            RoadFlow.Platform.WorkFlow     bworkFlow     = new RoadFlow.Platform.WorkFlow();

            string query = string.Format("&flowid1={0}&groupid={1}&appid={2}&tabid={3}&title={4}&flowid={5}&sender={6}&date1={7}&date2={8}&iframeid={9}&openerid={10}&taskid={11}",
                                         Request.QueryString["flowid"],
                                         Request.QueryString["groupid"],
                                         Request.QueryString["appid"],
                                         Request.QueryString["tabid"],
                                         Request.QueryString["title"].UrlEncode(),
                                         Request.QueryString["flowid"],
                                         Request.QueryString["sender"],
                                         Request.QueryString["date1"],
                                         Request.QueryString["date2"],
                                         Request.QueryString["iframeid"],
                                         Request.QueryString["openerid"],
                                         Request.QueryString["taskid"]
                                         );

            ViewBag.flowid       = Request.QueryString["flowid"];
            ViewBag.groupid      = Request.QueryString["groupid"];
            ViewBag.displayModel = Request.QueryString["displaymodel"];
            ViewBag.wfInstall    = null;
            ViewBag.query        = query;

            string taskid       = Request.QueryString["taskid"];
            string displayModel = Request.QueryString["displaymodel"];

            if (!taskid.IsGuid())
            {
                return(View(new List <RoadFlow.Data.Model.WorkFlowTask>()));
            }
            var task = bworkFlowTask.Get(taskid.ToGuid());

            if (task == null || !task.SubFlowGroupID.HasValue)
            {
                return(View(new List <RoadFlow.Data.Model.WorkFlowTask>()));
            }
            var subFlowTasks = bworkFlowTask.GetTaskList(Guid.Empty, task.SubFlowGroupID.Value);

            if (subFlowTasks.Count == 0)
            {
                return(View(new List <RoadFlow.Data.Model.WorkFlowTask>()));
            }

            var wfInstall = bworkFlow.GetWorkFlowRunModel(subFlowTasks.First().FlowID);
            var tasks     = subFlowTasks.OrderBy(p => p.Sort);

            ViewBag.wfInstall = wfInstall;
            ViewBag.flowid    = subFlowTasks.First().FlowID.ToString();
            return(View(tasks));
        }
コード例 #4
0
        public ActionResult DetailSubFlow()
        {
            RoadFlow.Platform.WorkFlowTask workFlowTask = new RoadFlow.Platform.WorkFlowTask();
            RoadFlow.Platform.WorkFlow     workFlow     = new RoadFlow.Platform.WorkFlow();
            string text = string.Format("&flowid1={0}&groupid={1}&appid={2}&tabid={3}&title={4}&flowid={5}&sender={6}&date1={7}&date2={8}&iframeid={9}&openerid={10}&taskid={11}", base.Request.QueryString["flowid"], base.Request.QueryString["groupid"], base.Request.QueryString["appid"], base.Request.QueryString["tabid"], MyExtensions.UrlEncode(base.Request.QueryString["title"]), base.Request.QueryString["flowid"], base.Request.QueryString["sender"], base.Request.QueryString["date1"], base.Request.QueryString["date2"], base.Request.QueryString["iframeid"], base.Request.QueryString["openerid"], base.Request.QueryString["taskid"]);

            base.ViewBag.flowid       = base.Request.QueryString["flowid"];
            base.ViewBag.groupid      = base.Request.QueryString["groupid"];
            base.ViewBag.displayModel = base.Request.QueryString["displaymodel"];
            base.ViewBag.wfInstall    = null;
            base.ViewBag.query        = text;
            string text2 = base.Request.QueryString["taskid"];
            string text4 = base.Request.QueryString["displaymodel"];

            if (!MyExtensions.IsGuid(text2))
            {
                return(View(new List <RoadFlow.Data.Model.WorkFlowTask>()));
            }
            RoadFlow.Data.Model.WorkFlowTask workFlowTask2 = workFlowTask.Get(MyExtensions.ToGuid(text2));
            if (workFlowTask2 == null || MyExtensions.IsNullOrEmpty(workFlowTask2.SubFlowGroupID))
            {
                return(View(new List <RoadFlow.Data.Model.WorkFlowTask>()));
            }
            List <RoadFlow.Data.Model.WorkFlowTask> list = new List <RoadFlow.Data.Model.WorkFlowTask>();

            string[] array = workFlowTask2.SubFlowGroupID.Split(',');
            foreach (string text3 in array)
            {
                list.AddRange(workFlowTask.GetTaskList(Guid.Empty, MyExtensions.ToGuid(text3)));
            }
            if (list.Count == 0)
            {
                base.Response.Write("未找到任务");
                base.Response.End();
                return(null);
            }
            WorkFlowInstalled workFlowRunModel = workFlow.GetWorkFlowRunModel(list.FirstOrDefault().FlowID);

            base.ViewBag.wfInstall = workFlowRunModel;
            base.ViewBag.flowid    = list.FirstOrDefault().FlowID.ToString();
            return(View(list));
        }
コード例 #5
0
        public ActionResult ShowForm()
        {
            string str = this.Request.QueryString["taskid"];

            if (str.IsGuid())
            {
                RoadFlow.Platform.WorkFlowTask   workFlowTask1 = new RoadFlow.Platform.WorkFlowTask();
                RoadFlow.Data.Model.WorkFlowTask workFlowTask2 = workFlowTask1.Get(str.ToGuid());
                if (workFlowTask2 != null)
                {
                    List <RoadFlow.Data.Model.WorkFlowTask> bySubFlowGroupId = workFlowTask1.GetBySubFlowGroupID(workFlowTask2.GroupID);
                    if (bySubFlowGroupId.Count > 0)
                    {
                        RoadFlow.Data.Model.WorkFlowTask workFlowTask3 = bySubFlowGroupId.OrderByDescending <RoadFlow.Data.Model.WorkFlowTask, int>((Func <RoadFlow.Data.Model.WorkFlowTask, int>)(p => p.Sort)).FirstOrDefault <RoadFlow.Data.Model.WorkFlowTask>();
                        return((ActionResult)this.Redirect(("1" == this.Request.QueryString["ismobile"] ? (object)"Index_App" : (object)"Index").ToString() + "?flowid=" + (object)workFlowTask3.FlowID + "&stepid=" + (object)workFlowTask3.StepID + "&instanceid=" + workFlowTask3.InstanceID + "&taskid=" + (object)workFlowTask3.ID + "&groupid=" + (object)workFlowTask3.GroupID + "&appid=" + this.Request.QueryString["appid"] + "&display=1&tabid=" + this.Request.QueryString["tabid"]));
                    }
                }
            }
            return((ActionResult)this.View());
        }
コード例 #6
0
        public ActionResult ChangeStatus()
        {
            RoadFlow.Platform.WorkFlowTask   workFlowTask  = new RoadFlow.Platform.WorkFlowTask();
            RoadFlow.Data.Model.WorkFlowTask workFlowTask2 = null;
            string empty = string.Empty;

            empty = base.Request.QueryString["taskid"];
            if (MyExtensions.IsGuid(empty))
            {
                workFlowTask2 = workFlowTask.Get(MyExtensions.ToGuid(empty));
            }
            string text = "";

            if (workFlowTask2 != null)
            {
                text = workFlowTask2.Status.ToString();
            }
            base.ViewBag.Status = text;
            return(View());
        }
コード例 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            query = string.Format("&flowid1={0}&groupid={1}&appid={2}&tabid={3}&title={4}&flowid={5}&sender={6}&date1={7}&date2={8}&iframeid={9}&openerid={10}&taskid={11}",
                                  Request.QueryString["flowid"],
                                  Request.QueryString["groupid"],
                                  Request.QueryString["appid"],
                                  Request.QueryString["tabid"],
                                  Request.QueryString["title"].UrlEncode(),
                                  Request.QueryString["flowid"],
                                  Request.QueryString["sender"],
                                  Request.QueryString["date1"],
                                  Request.QueryString["date2"],
                                  Request.QueryString["iframeid"],
                                  Request.QueryString["openerid"],
                                  Request.QueryString["taskid"]
                                  );
            flowid       = Request.QueryString["flowid"];
            groupid      = Request.QueryString["groupid"];
            taskid       = Request.QueryString["taskid"];
            displayModel = Request.QueryString["displaymodel"];
            if (!taskid.IsGuid())
            {
                return;
            }
            var task = bworkFlowTask.Get(taskid.ToGuid());

            if (task == null || !task.SubFlowGroupID.HasValue)
            {
                return;
            }
            var subFlowTasks = bworkFlowTask.GetTaskList(Guid.Empty, task.SubFlowGroupID.Value);

            if (subFlowTasks.Count == 0)
            {
                return;
            }

            wfInstall = bworkFlow.GetWorkFlowRunModel(subFlowTasks.First().FlowID);
            tasks     = subFlowTasks.OrderBy(p => p.Sort).ThenBy(p => p.ReceiveTime);
            flowid    = subFlowTasks.First().FlowID.ToString();
        }
コード例 #8
0
        public ActionResult FlowCopyFor(FormCollection collection)
        {
            RoadFlow.Platform.WorkFlow     workFlow      = new RoadFlow.Platform.WorkFlow();
            RoadFlow.Platform.WorkFlowTask workFlowTask1 = new RoadFlow.Platform.WorkFlowTask();
            string            str1             = this.Request.QueryString["flowid"];
            string            stepid           = this.Request.QueryString["stepid"];
            string            str2             = this.Request.QueryString["groupid"];
            string            str3             = this.Request.QueryString["instanceid"];
            string            flowID           = str1;
            int               num              = 1;
            WorkFlowInstalled workFlowRunModel = workFlow.GetWorkFlowRunModel(flowID, num != 0);

            if (workFlowRunModel == null)
            {
                this.Response.Write("未找到流程运行实体");
                this.Response.End();
                return((ActionResult)null);
            }
            if (workFlowRunModel.Steps.Where <Step>((Func <Step, bool>)(p => p.ID == stepid.ToGuid())).Count <Step>() == 0)
            {
                this.Response.Write("未找到当前步骤");
                this.Response.End();
                return((ActionResult)null);
            }
            RoadFlow.Data.Model.WorkFlowTask workFlowTask2 = workFlowTask1.Get(this.Request.QueryString["taskid"].ToGuid());
            if (workFlowTask2 == null)
            {
                this.Response.Write("当前任务为空,请先保存再抄送!");
                this.Response.End();
                return((ActionResult)null);
            }
            if (collection != null)
            {
                List <RoadFlow.Data.Model.WorkFlowTask> taskList = workFlowTask1.GetTaskList(workFlowTask2.ID, true);
                List <RoadFlow.Data.Model.Users>        allUsers = new RoadFlow.Platform.Organize().GetAllUsers(this.Request.Form["user"] ?? "");
                StringBuilder stringBuilder = new StringBuilder();
                foreach (RoadFlow.Data.Model.Users users in allUsers)
                {
                    RoadFlow.Data.Model.Users user = users;
                    if (taskList.Find((Predicate <RoadFlow.Data.Model.WorkFlowTask>)(p => p.ReceiveID == user.ID)) == null)
                    {
                        Step step = workFlowRunModel.Steps.Where <Step>((Func <Step, bool>)(p => p.ID == this.Request.QueryString["stepid"].ToGuid())).First <Step>();
                        RoadFlow.Data.Model.WorkFlowTask model = new RoadFlow.Data.Model.WorkFlowTask();
                        if (step.WorkTime > Decimal.Zero)
                        {
                            model.CompletedTime = new DateTime?(DateTimeNew.Now.AddHours((double)step.WorkTime));
                        }
                        model.FlowID      = workFlowTask2.FlowID;
                        model.GroupID     = workFlowTask2.GroupID;
                        model.ID          = Guid.NewGuid();
                        model.Type        = 5;
                        model.InstanceID  = workFlowTask2.InstanceID;
                        model.Note        = "抄送任务";
                        model.PrevID      = workFlowTask2.PrevID;
                        model.PrevStepID  = workFlowTask2.PrevStepID;
                        model.ReceiveID   = user.ID;
                        model.ReceiveName = user.Name;
                        model.ReceiveTime = DateTimeNew.Now;
                        model.SenderID    = workFlowTask2.ReceiveID;
                        model.SenderName  = workFlowTask2.ReceiveName;
                        model.SenderTime  = model.ReceiveTime;
                        model.Status      = 0;
                        model.StepID      = workFlowTask2.StepID;
                        model.StepName    = workFlowTask2.StepName;
                        model.Sort        = workFlowTask2.Sort;
                        model.Title       = workFlowTask2.Title;
                        workFlowTask1.Add(model);
                        stringBuilder.Append(model.ReceiveName);
                        stringBuilder.Append(",");
                    }
                }
                // ISSUE: reference to a compiler-generated field
                if (WorkFlowRunController.\u003C\u003Eo__18.\u003C\u003Ep__0 == null)
                {
                    // ISSUE: reference to a compiler-generated field
                    WorkFlowRunController.\u003C\u003Eo__18.\u003C\u003Ep__0 = CallSite <Func <CallSite, object, string, object> > .Create(Binder.SetMember(CSharpBinderFlags.None, "script", typeof(WorkFlowRunController), (IEnumerable <CSharpArgumentInfo>) new CSharpArgumentInfo[2]
                    {
                        CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, (string)null),
                        CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, (string)null)
                    }));
                }
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                object obj = WorkFlowRunController.\u003C\u003Eo__18.\u003C\u003Ep__0.Target((CallSite)WorkFlowRunController.\u003C\u003Eo__18.\u003C\u003Ep__0, this.ViewBag, "alert('成功抄送给:" + stringBuilder.ToString().TrimEnd(',') + "');new RoadUI.Window().close();");
            }
            return((ActionResult)this.View());
        }