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 (empty.IsGuid())
            {
                workFlowTask2 = workFlowTask.Get(empty.ToGuid());
            }
            if (workFlowTask2 != null)
            {
                text = base.Request.Form["Status"];
                if (text.IsInt())
                {
                    string oldXML = workFlowTask2.Serialize();
                    workFlowTask2.Status = text.ToInt();
                    workFlowTask.Update(workFlowTask2);
                    RoadFlow.Platform.Log.Add("改变了流程任务状态", "改变了流程任务状态", RoadFlow.Platform.Log.Types.流程相关, oldXML, workFlowTask2.Serialize());
                    base.ViewBag.Script = "alert('设置成功!');new RoadUI.Window().reloadOpener();new RoadUI.Window().close();";
                }
            }
            base.ViewBag.Status = text;
            return(View());
        }
 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 (text.IsGuid())
             {
                 string text2 = base.Request.Form["member_" + text];
                 if (!text2.IsNullOrEmpty())
                 {
                     dictionary.Add(text.ToGuid(), text2);
                 }
             }
         }
         RoadFlow.Data.Model.WorkFlowTask workFlowTask  = null;
         RoadFlow.Platform.WorkFlowTask   workFlowTask2 = new RoadFlow.Platform.WorkFlowTask();
         string str = base.Request.QueryString["taskid"];
         workFlowTask = workFlowTask2.Get(str.ToGuid());
         bool flag = workFlowTask2.GoToTask(workFlowTask, dictionary);
         base.ViewBag.script = "alert('跳转" + (flag ? "成功" : "失败") + "');new RoadUI.Window().reloadOpener();new RoadUI.Window().close();";
     }
     return(View());
 }
        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"], base.Request.QueryString["title"].UrlEncode(), 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 str   = base.Request.QueryString["taskid"];
            string text2 = base.Request.QueryString["displaymodel"];

            if (!str.IsGuid())
            {
                return(View(new List <RoadFlow.Data.Model.WorkFlowTask>()));
            }
            RoadFlow.Data.Model.WorkFlowTask workFlowTask2 = workFlowTask.Get(str.ToGuid());
            if (workFlowTask2 == null || workFlowTask2.SubFlowGroupID.IsNullOrEmpty())
            {
                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 str2 in array)
            {
                list.AddRange(workFlowTask.GetTaskList(Guid.Empty, str2.ToGuid()));
            }
            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));
        }
        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 (empty.IsGuid())
            {
                workFlowTask2 = workFlowTask.Get(empty.ToGuid());
            }
            string text = "";

            if (workFlowTask2 != null)
            {
                text = workFlowTask2.Status.ToString();
            }
            base.ViewBag.Status = text;
            return(View());
        }
Example #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());
        }
 public ActionResult ShowForm()
 {
     string str = base.Request.QueryString["taskid"];
     if (str.IsGuid())
     {
         RoadFlow.Platform.WorkFlowTask workFlowTask = new RoadFlow.Platform.WorkFlowTask();
         RoadFlow.Data.Model.WorkFlowTask workFlowTask2 = workFlowTask.Get(str.ToGuid());
         if (workFlowTask2 != null)
         {
             List<RoadFlow.Data.Model.WorkFlowTask> bySubFlowGroupID = workFlowTask.GetBySubFlowGroupID(workFlowTask2.GroupID);
             if (bySubFlowGroupID.Count > 0)
             {
                 RoadFlow.Data.Model.WorkFlowTask workFlowTask3 = (from p in bySubFlowGroupID
                 orderby p.Sort descending
                 select p).FirstOrDefault();
                 string url = (("1" == base.Request.QueryString["ismobile"]) ? "Index_App" : "Index") + "?flowid=" + workFlowTask3.FlowID + "&stepid=" + workFlowTask3.StepID + "&instanceid=" + workFlowTask3.InstanceID + "&taskid=" + workFlowTask3.ID + "&groupid=" + workFlowTask3.GroupID + "&appid=" + base.Request.QueryString["appid"] + "&display=1&tabid=" + base.Request.QueryString["tabid"];
                 return Redirect(url);
             }
         }
     }
     return View();
 }
        public string QueryInstanceList()
        {
            RoadFlow.Platform.WorkFlowTask workFlowTask = new RoadFlow.Platform.WorkFlowTask();
            RoadFlow.Platform.WorkFlow     workFlow     = new RoadFlow.Platform.WorkFlow();
            string str    = base.Request.Form["Title"];
            string flowid = base.Request.Form["FlowID"];
            string text   = base.Request.Form["SenderID"];
            string date   = base.Request.Form["Date1"];
            string date2  = base.Request.Form["Date2"];
            string str2   = base.Request.Form["Status"];
            string text2  = base.Request.Form["sidx"];
            string text3  = base.Request.Form["sord"];
            string typeID = base.Request.Form["typeid"];
            string text4  = base.Request.Form["appid"];
            Dictionary <Guid, string> instanceManageFlowIDList = workFlow.GetInstanceManageFlowIDList(RoadFlow.Platform.Users.CurrentUserID, typeID);
            List <Guid> list = new List <Guid>();

            foreach (KeyValuePair <Guid, string> item in from p in instanceManageFlowIDList
                     orderby p.Value
                     select p)
            {
                list.Add(item.Key);
            }
            Guid[]    flowID     = list.ToArray();
            int       pageSize   = RoadFlow.Utility.Tools.GetPageSize();
            int       pageNumber = RoadFlow.Utility.Tools.GetPageNumber();
            string    order      = (text2.IsNullOrEmpty() ? "SenderTime" : text2) + " " + (text3.IsNullOrEmpty() ? "asc" : text3);
            long      count;
            DataTable instances = workFlowTask.GetInstances1(flowID, new Guid[0], text.IsNullOrEmpty() ? new Guid[0] : new Guid[1]
            {
                text.Replace("u_", "").ToGuid()
            }, out count, pageSize, pageNumber, str.Trim1(), flowid, date, date2, str2.ToInt(), order);
            JsonData jsonData = new JsonData();

            foreach (DataRow row in instances.Rows)
            {
                RoadFlow.Data.Model.WorkFlowTask lastTask = workFlowTask.GetLastTask(row["FlowID"].ToString().ToGuid(), row["GroupID"].ToString().ToGuid());
                if (lastTask != null)
                {
                    string        flowName;
                    string        stepName      = workFlow.GetStepName(lastTask.StepID, lastTask.FlowID, out flowName);
                    string        text5         = string.Format("flowid={0}&stepid={1}&instanceid={2}&taskid={3}&groupid={4}&appid={5}&display=1", lastTask.FlowID, lastTask.StepID, lastTask.InstanceID, lastTask.ID, lastTask.GroupID, text4);
                    StringBuilder stringBuilder = new StringBuilder();
                    stringBuilder.Append("<a style=\"margin-right:5px; background:url(" + base.Url.Content("~/Images/ico/mouse.png") + ") no-repeat left center; padding-left:18px;\" href=\"javascript:void(0);\" onclick=\"manage('" + lastTask.FlowID.ToString() + "','" + lastTask.GroupID.ToString() + "');\">管理</a>");
                    if (lastTask.Status.In(-1, 0, 1))
                    {
                        stringBuilder.Append("<a style=\"background:url(" + base.Url.Content("~/Images/ico/trash.gif") + ") no-repeat left center; padding-left:18px;\" href=\"javascript:void(0);\" onclick=\"delete1('" + lastTask.FlowID.ToString() + "','" + lastTask.GroupID.ToString() + "');\">删除</a>");
                    }
                    JsonData jsonData2 = new JsonData();
                    jsonData2["id"]          = lastTask.ID.ToString();
                    jsonData2["Title"]       = "<a href=\"javascript:void(0);\" onclick=\"openTask('/WorkFlowRun/Index?" + text5 + "','" + lastTask.Title.RemoveHTML().UrlEncode() + "','" + lastTask.ID + "');return false;\" class=\"blue\">" + lastTask.Title.HtmlEncode() + "</a>";
                    jsonData2["FlowName"]    = flowName;
                    jsonData2["StepName"]    = stepName;
                    jsonData2["ReceiveName"] = lastTask.ReceiveName;
                    jsonData2["ReceiveTime"] = lastTask.ReceiveTime.ToDateTimeStringS();
                    jsonData2["StatusTitle"] = lastTask.Status;
                    jsonData2["Opation"]     = stringBuilder.ToString();
                    jsonData.Add(jsonData2);
                }
            }
            return("{\"userdata\":{\"total\":" + count + ",\"pagesize\":" + pageSize + ",\"pagenumber\":" + pageNumber + "},\"rows\":" + jsonData.ToJson() + "}");
        }
Example #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());
        }
 public ActionResult FlowCopyFor(FormCollection collection)
 {
     RoadFlow.Platform.WorkFlow workFlow = new RoadFlow.Platform.WorkFlow();
     RoadFlow.Platform.WorkFlowTask workFlowTask = new RoadFlow.Platform.WorkFlowTask();
     WorkFlowInstalled workFlowInstalled = null;
     RoadFlow.Data.Model.WorkFlowTask workFlowTask2 = null;
     string flowID = base.Request.QueryString["flowid"];
     string stepid = base.Request.QueryString["stepid"];
     string text = base.Request.QueryString["groupid"];
     string text2 = base.Request.QueryString["instanceid"];
     workFlowInstalled = workFlow.GetWorkFlowRunModel(flowID);
     if (workFlowInstalled == null)
     {
         base.Response.Write("未找到流程运行实体");
         base.Response.End();
         return null;
     }
     if ((from p in workFlowInstalled.Steps
     where p.ID == stepid.ToGuid()
     select p).Count() == 0)
     {
         base.Response.Write("未找到当前步骤");
         base.Response.End();
         return null;
     }
     workFlowTask2 = workFlowTask.Get(base.Request.QueryString["taskid"].ToGuid());
     if (workFlowTask2 == null)
     {
         base.Response.Write("当前任务为空,请先保存再抄送!");
         base.Response.End();
         return null;
     }
     if (collection != null)
     {
         List<RoadFlow.Data.Model.WorkFlowTask> taskList = workFlowTask.GetTaskList(workFlowTask2.ID);
         List<RoadFlow.Data.Model.Users> allUsers = new RoadFlow.Platform.Organize().GetAllUsers(base.Request.Form["user"] ?? "");
         StringBuilder stringBuilder = new StringBuilder();
         foreach (RoadFlow.Data.Model.Users item in allUsers)
         {
             if (taskList.Find((RoadFlow.Data.Model.WorkFlowTask p) => p.ReceiveID == item.ID) == null)
             {
                 Step step = (from p in workFlowInstalled.Steps
                 where p.ID == base.Request.QueryString["stepid"].ToGuid()
                 select p).First();
                 RoadFlow.Data.Model.WorkFlowTask workFlowTask3 = new RoadFlow.Data.Model.WorkFlowTask();
                 if (step.WorkTime > decimal.Zero)
                 {
                     workFlowTask3.CompletedTime = DateTimeNew.Now.AddHours((double)step.WorkTime);
                 }
                 workFlowTask3.FlowID = workFlowTask2.FlowID;
                 workFlowTask3.GroupID = workFlowTask2.GroupID;
                 workFlowTask3.ID = Guid.NewGuid();
                 workFlowTask3.Type = 5;
                 workFlowTask3.InstanceID = workFlowTask2.InstanceID;
                 workFlowTask3.Note = "抄送任务";
                 workFlowTask3.PrevID = workFlowTask2.PrevID;
                 workFlowTask3.PrevStepID = workFlowTask2.PrevStepID;
                 workFlowTask3.ReceiveID = item.ID;
                 workFlowTask3.ReceiveName = item.Name;
                 workFlowTask3.ReceiveTime = DateTimeNew.Now;
                 workFlowTask3.SenderID = workFlowTask2.ReceiveID;
                 workFlowTask3.SenderName = workFlowTask2.ReceiveName;
                 workFlowTask3.SenderTime = workFlowTask3.ReceiveTime;
                 workFlowTask3.Status = 0;
                 workFlowTask3.StepID = workFlowTask2.StepID;
                 workFlowTask3.StepName = workFlowTask2.StepName;
                 workFlowTask3.Sort = workFlowTask2.Sort;
                 workFlowTask3.Title = workFlowTask2.Title;
                 workFlowTask.Add(workFlowTask3);
                 stringBuilder.Append(workFlowTask3.ReceiveName);
                 stringBuilder.Append(",");
             }
         }
         base.ViewBag.script = "alert('成功抄送给:" + stringBuilder.ToString().TrimEnd(',') + "');new RoadUI.Window().close();";
     }
     return View();
 }
Example #10
0
        public static void Hasten(string types, string users, string contents, RoadFlow.Data.Model.WorkFlowTask task, string othersParams = "")
        {
            if (!users.IsNullOrEmpty() && !types.IsNullOrEmpty() && task != null)
            {
                string[] array = users.Split(',');
                Guid     guid  = Guid.NewGuid();
                List <RoadFlow.Data.Model.WorkFlowTask> list = new WorkFlowTask().GetNextTaskList(task.ID).FindAll((RoadFlow.Data.Model.WorkFlowTask p) => p.Status.In(0, 1));
                string text = "";
                text = ((!(HttpContext.Current.Request.Url != null) || !HttpContext.Current.Request.Url.AbsolutePath.EndsWith(".aspx", StringComparison.CurrentCultureIgnoreCase)) ? "/WorkFlowRun/Index" : "/Platform/WorkFlowRun/Default.aspx");
                string[] array2 = types.Split(',');
                for (int i = 0; i < array2.Length; i++)
                {
                    int test;
                    if (array2[i].IsInt(out test))
                    {
                        string[] array3 = array;
                        foreach (string id in array3)
                        {
                            Guid userGuid;
                            if (Users.RemovePrefix(id).IsGuid(out userGuid))
                            {
                                RoadFlow.Data.Model.WorkFlowTask workFlowTask = list.Find((RoadFlow.Data.Model.WorkFlowTask p) => p.ReceiveID == userGuid);
                                string linkUrl = (workFlowTask == null) ? "" : ("javascript:openApp('" + text + "?flowid=" + workFlowTask.FlowID + "&stepid=" + workFlowTask.StepID + "&instanceid=" + workFlowTask.InstanceID + "&taskid=" + workFlowTask.ID + "&groupid=" + workFlowTask.GroupID + "',0,'" + workFlowTask.Title.Replace1(",", "") + "','tab_" + workFlowTask.ID + "');closeMessage('" + guid + "');");
                                switch (test)
                                {
                                case 1:
                                    SMSLog.SendSMS(new Users().GetMobileNumber(userGuid), contents);
                                    break;

                                case 2:
                                    Email.Send(userGuid, "任务催办", contents);
                                    break;

                                case 3:
                                {
                                    RoadFlow.Data.Model.Users users3 = new Users().Get(userGuid);
                                    if (users3 != null)
                                    {
                                        ShortMessage.Send(users3.ID, users3.Name, "任务催办", contents, 0, linkUrl, task.ID.ToString(), guid.ToString());
                                    }
                                    break;
                                }

                                case 4:
                                {
                                    RoadFlow.Data.Model.Users users2 = new Users().Get(userGuid);
                                    if (users2 != null)
                                    {
                                        new Message().SendText(contents, users2.Account, "", "", 0, new Agents().GetAgentIDByCode("weixinagents_waittasks"), true);
                                    }
                                    break;
                                }
                                }
                            }
                        }
                    }
                }
                RoadFlow.Data.Model.HastenLog hastenLog = new RoadFlow.Data.Model.HastenLog();
                hastenLog.Contents     = contents;
                hastenLog.ID           = Guid.NewGuid();
                hastenLog.SendTime     = DateTimeNew.Now;
                hastenLog.SendUser     = Users.CurrentUserID;
                hastenLog.SendUserName = Users.CurrentUserName;
                hastenLog.OthersParams = (othersParams.IsNullOrEmpty() ? task.ID.ToString() : othersParams);
                hastenLog.Types        = types;
                hastenLog.Users        = users;
                new HastenLog().Add(hastenLog);
            }
        }