protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { string taskid = Request.QueryString["taskid"]; Guid taskID; if (taskid.IsGuid(out taskID)) { string user = Request.Form["user"]; string openerid = Request.QueryString["openerid"]; RoadFlow.Platform.WorkFlowTask btask = new RoadFlow.Platform.WorkFlowTask(); var users = new RoadFlow.Platform.Organize().GetAllUsers(user); System.Text.StringBuilder sb = new System.Text.StringBuilder(); foreach (var user1 in users) { btask.DesignateTask(taskID, user1); RoadFlow.Platform.Log.Add("管理员指派了流程任务", "将任务" + taskID + "指派给了:" + user1.Name + user1.ID, RoadFlow.Platform.Log.Types.流程相关); sb.Append(user1.Name); sb.Append(","); } string userNames = sb.ToString().TrimEnd(','); Page.ClientScript.RegisterStartupScript(Page.GetType(), "ok", "alert('已成功指派给:" + userNames + "!');new RoadUI.Window().reloadOpener();new RoadUI.Window().close();", true); } } }
public ActionResult Designate(FormCollection collection) { string taskid = Request.QueryString["taskid"]; Guid taskID; if (taskid.IsGuid(out taskID)) { string user = Request.Form["user"]; string openerid = Request.QueryString["openerid"]; RoadFlow.Platform.WorkFlowTask btask = new RoadFlow.Platform.WorkFlowTask(); var users = new RoadFlow.Platform.Organize().GetAllUsers(user); System.Text.StringBuilder sb = new System.Text.StringBuilder(); foreach (var user1 in users) { btask.DesignateTask(taskID, user1); RoadFlow.Platform.Log.Add("管理员指派了流程任务", "将任务" + taskID + "指派给了:" + user1.Name + user1.ID, RoadFlow.Platform.Log.Types.流程相关); sb.Append(user1.Name); sb.Append(","); } string userNames = sb.ToString().TrimEnd(','); ViewBag.Script = "alert('已成功指派给:" + userNames + "!');new RoadUI.Window().reloadOpener();new RoadUI.Window().close();"; } return(View()); }
public ActionResult Designate(FormCollection collection) { Guid guid = default(Guid); if (MyExtensions.IsGuid(base.Request.QueryString["taskid"], ref guid)) { string idString = base.Request.Form["user"]; string text = base.Request.QueryString["openerid"]; RoadFlow.Platform.WorkFlowTask workFlowTask = new RoadFlow.Platform.WorkFlowTask(); List <RoadFlow.Data.Model.Users> allUsers = new RoadFlow.Platform.Organize().GetAllUsers(idString); StringBuilder stringBuilder = new StringBuilder(); foreach (RoadFlow.Data.Model.Users item in allUsers) { workFlowTask.DesignateTask(guid, item); RoadFlow.Platform.Log.Add("管理员指派了流程任务", "将任务" + guid + "指派给了:" + item.Name + item.ID, RoadFlow.Platform.Log.Types.流程相关); stringBuilder.Append(item.Name); stringBuilder.Append(","); } string str = stringBuilder.ToString().TrimEnd(','); base.ViewBag.Script = "alert('已成功指派给:" + str + "!');new RoadUI.Window().reloadOpener();new RoadUI.Window().close();"; } return(View()); }