Example #1
0
        public ActionResult Detail()
        {
            RoadFlow.Platform.WorkFlowTask bworkFlowTask = new RoadFlow.Platform.WorkFlowTask();
            RoadFlow.Platform.WorkFlow     bworkFlow     = new RoadFlow.Platform.WorkFlow();

            string flowid       = Request.QueryString["flowid1"] ?? Request.QueryString["flowid"];
            string groupid      = Request.QueryString["groupid"];
            string displayModel = Request.QueryString["displaymodel"];

            var    wfInstall = bworkFlow.GetWorkFlowRunModel(flowid);
            var    tasks     = bworkFlowTask.GetTaskList(flowid.ToGuid(), groupid.ToGuid()).OrderBy(p => p.Sort);
            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}",
                                             flowid, 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"]
                                             );

            ViewBag.flowid       = flowid;
            ViewBag.groupid      = groupid;
            ViewBag.displayModel = displayModel;
            ViewBag.wfInstall    = wfInstall;
            ViewBag.query        = query;
            return(View(tasks));
        }
Example #2
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));
        }
        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));
        }
        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();
        }
Example #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            flowid       = Request.QueryString["flowid1"] ?? Request.QueryString["flowid"];
            groupid      = Request.QueryString["groupid"];
            displayModel = Request.QueryString["displaymodel"];

            wfInstall = bworkFlow.GetWorkFlowRunModel(flowid);
            tasks     = bworkFlowTask.GetTaskList(flowid.ToGuid(), groupid.ToGuid()).OrderBy(p => p.Sort);
            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}",
                                      flowid, 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"]
                                      );
        }
Example #6
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());
        }
        public ActionResult InstanceManage()
        {
            RoadFlow.Platform.WorkFlowTask workFlowTask = new RoadFlow.Platform.WorkFlowTask();
            RoadFlow.Platform.WorkFlow     workFlow     = new RoadFlow.Platform.WorkFlow();
            string            text             = base.Request.QueryString["flowid1"];
            string            text2            = base.Request.QueryString["groupid"];
            WorkFlowInstalled workFlowRunModel = workFlow.GetWorkFlowRunModel(text);
            IOrderedEnumerable <RoadFlow.Data.Model.WorkFlowTask> orderedEnumerable = from p in workFlowTask.GetTaskList(MyExtensions.ToGuid(text), MyExtensions.ToGuid(text2))
                                                                                      orderby p.Sort
                                                                                      select p;
            JsonData jsonData = new JsonData();

            foreach (RoadFlow.Data.Model.WorkFlowTask item in orderedEnumerable)
            {
                StringBuilder stringBuilder = new StringBuilder();
                stringBuilder.Append("<a style=\"background:url(" + base.Url.Content("~/Images/ico/permission.gif") + ") no-repeat left center; padding-left:18px;\" href=\"javascript:void(0);\" onclick=\"cngStatus('" + item.ID + "');\">状态</a>");
                if (MyExtensions.In(item.Status, new int[2]
                {
                    0,
                    1
                }))
                {
                    stringBuilder.Append("<a style=\"background:url(" + base.Url.Content("~/Images/ico/arrow_medium_lower_left.png") + ") no-repeat left center; padding-left:16px;\" href=\"javascript:void(0);\" onclick=\"designate('" + item.ID + "');\">指派</a>");
                    stringBuilder.Append("<a style=\"background:url(" + base.Url.Content("~/Images/ico/arrow_medium_lower_right.png") + ") no-repeat left center; padding-left:16px;\" href=\"javascript:void(0);\" onclick=\"goTo('" + item.ID + "');\">跳转</a>");
                }
                JsonData jsonData2 = new JsonData();
                jsonData2["id"]             = item.ID.ToString();
                jsonData2["StepID"]         = workFlow.GetStepName(item.StepID, workFlowRunModel);
                jsonData2["SenderName"]     = item.SenderName;
                jsonData2["ReceiveTime"]    = MyExtensions.ToDateTimeStringS(item.ReceiveTime);
                jsonData2["ReceiveName"]    = item.ReceiveName;
                jsonData2["CompletedTime1"] = (item.CompletedTime1.HasValue ? MyExtensions.ToDateTimeStringS(item.CompletedTime1.Value) : "");
                jsonData2["Status"]         = workFlowTask.GetStatusTitle(item.Status);
                jsonData2["Comment"]        = item.Comment;
                jsonData2["Opation"]        = stringBuilder.ToString();
                jsonData.Add(jsonData2);
            }
            base.ViewBag.list = jsonData.ToJson();
            return(View());
        }
        public ActionResult Detail()
        {
            RoadFlow.Platform.WorkFlowTask workFlowTask = new RoadFlow.Platform.WorkFlowTask();
            RoadFlow.Platform.WorkFlow     workFlow     = new RoadFlow.Platform.WorkFlow();
            string            text             = base.Request.QueryString["flowid1"] ?? base.Request.QueryString["flowid"];
            string            text2            = base.Request.QueryString["groupid"];
            string            text3            = base.Request.QueryString["displaymodel"];
            WorkFlowInstalled workFlowRunModel = workFlow.GetWorkFlowRunModel(text);
            IOrderedEnumerable <RoadFlow.Data.Model.WorkFlowTask> orderedEnumerable = from p in workFlowTask.GetTaskList(MyExtensions.ToGuid(text), MyExtensions.ToGuid(text2))
                                                                                      where p.Status != -1
                                                                                      orderby p.Sort, p.StepSort
            select p;
            string text4 = string.Format("&flowid1={0}&groupid={1}&appid={2}&tabid={3}&iframeid={4}&openerid={5}", text, text2, base.Request.QueryString["appid"], base.Request.QueryString["tabid"], base.Request.QueryString["iframeid"], base.Request.QueryString["openerid"]);
            string text5 = string.Format("&groupid={0}&appid={1}&tabid={2}&ismobile={3}", text2, base.Request.QueryString["appid"], base.Request.QueryString["tabid"], base.Request.QueryString["ismobile"]);

            base.ViewBag.flowid       = text;
            base.ViewBag.groupid      = text2;
            base.ViewBag.displayModel = text3;
            base.ViewBag.wfInstall    = workFlowRunModel;
            base.ViewBag.query        = text4;
            base.ViewBag.query1       = text5;
            JsonData jsonData = new JsonData();

            foreach (RoadFlow.Data.Model.WorkFlowTask item in orderedEnumerable)
            {
                JsonData jsonData2 = new JsonData();
                jsonData2["StepName"]       = item.StepName;
                jsonData2["SenderName"]     = item.SenderName;
                jsonData2["SenderTime"]     = MyExtensions.ToDateTimeStringS(item.SenderTime);
                jsonData2["ReceiveName"]    = item.ReceiveName;
                jsonData2["CompletedTime1"] = (item.CompletedTime1.HasValue ? MyExtensions.ToDateTimeStringS(item.CompletedTime1.Value) : "");
                jsonData2["StatusTitle"]    = workFlowTask.GetStatusTitle(item.Status);
                jsonData2["Comment"]        = item.Comment;
                jsonData2["Note"]           = item.Note;
                jsonData.Add(jsonData2);
            }
            base.ViewBag.list = (jsonData.IsArray ? jsonData.ToJson() : "{}");
            return(View(orderedEnumerable));
        }