public ActionResult Detail() { Business.Platform.WorkFlowTask bworkFlowTask = new Business.Platform.WorkFlowTask(); Business.Platform.WorkFlow bworkFlow = new Business.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)); }
public ActionResult CompletedList(FormCollection collection) { Business.Platform.WorkFlowTask bworkFlowTask = new Business.Platform.WorkFlowTask(); Business.Platform.WorkFlow bworkFlow = new Business.Platform.WorkFlow(); string title = ""; string flowid = ""; string sender = ""; string date1 = ""; string date2 = ""; if (collection != null) { title = Request.Form["Title"]; flowid = Request.Form["FlowID"]; sender = Request.Form["SenderID"]; date1 = Request.Form["Date1"]; date2 = Request.Form["Date2"]; } else { title = Request.QueryString["title"]; flowid = Request.QueryString["flowid"]; sender = Request.QueryString["sender"]; date1 = Request.QueryString["date1"]; date2 = Request.QueryString["date2"]; } ViewBag.title = title; ViewBag.flowid = flowid; ViewBag.sender = sender; ViewBag.date1 = date1; ViewBag.date2 = date2; string query2 = string.Format("&appid={0}&tabid={1}&title={2}&flowid={3}&sender={4}&date1={5}&date2={6}", Request.QueryString["appid"], Request.QueryString["tabid"], title.UrlEncode(), flowid, sender, date1, date2 ); string query = string.Format("{0}&pagesize={1}&pagenumber={2}", query2, Request.QueryString["pagesize"], Request.QueryString["pagenumber"] ); string pager; var taskList = bworkFlowTask.GetTasks(Business.Platform.Users.CurrentUserID, out pager, query2, title, flowid, sender, date1, date2, 1); ViewBag.pager = pager; ViewBag.flowOptions = bworkFlow.GetOptions(flowid); ViewBag.query = query; return(View(taskList)); }
public string GetSubTableData() { string secondtable = Request["secondtable"]; string primarytablefiled = Request["primarytablefiled"]; string secondtableprimarykey = Request["secondtableprimarykey"]; string primarytablefiledvalue = Request["primarytablefiledvalue"]; string secondtablerelationfield = Request["secondtablerelationfield"]; string dbconnid = Request["dbconnid"]; LitJson.JsonData data = new Business.Platform.WorkFlow().GetSubTableData(dbconnid, secondtable, secondtablerelationfield, primarytablefiledvalue, secondtableprimarykey); return(data.ToJson()); }
public ActionResult Index(FormCollection collection) { Business.Platform.WorkFlowDelegation bworkFlowDelegation = new Business.Platform.WorkFlowDelegation(); Business.Platform.Organize borganize = new Business.Platform.Organize(); Business.Platform.Users busers = new Business.Platform.Users(); Business.Platform.WorkFlow bworkFlow = new Business.Platform.WorkFlow(); IEnumerable <Data.Model.WorkFlowDelegation> workFlowDelegationList; string startTime = string.Empty; string endTime = string.Empty; string query1 = string.Format("&appid={0}&tabid={1}&isoneself={2}", Request.QueryString["appid"], Request.QueryString["tabid"], Request.QueryString["isoneself"]); if (collection != null) { if (!Request.Form["DeleteBut"].IsNullOrEmpty()) { string ids = Request.Form["checkbox_app"]; foreach (string id in ids.Split(',')) { Guid bid; if (!id.IsGuid(out bid)) { continue; } var comment = bworkFlowDelegation.Get(bid); if (comment != null) { bworkFlowDelegation.Delete(bid); Business.Platform.Log.Add("删除了流程意见", comment.Serialize(), Business.Platform.Log.Types.流程相关); } } bworkFlowDelegation.RefreshCache(); } } string pager; bool isOneSelf = "1" == Request.QueryString["isoneself"]; if (isOneSelf) { workFlowDelegationList = bworkFlowDelegation.GetPagerData(out pager, query1, Business.Platform.Users.CurrentUserID.ToString(), startTime, endTime); } else { workFlowDelegationList = bworkFlowDelegation.GetPagerData(out pager, query1, "", startTime, endTime); } ViewBag.Query1 = query1; return(View(workFlowDelegationList)); }
public string GetJSON() { string flowid = Request.QueryString["flowid"]; string type = Request.QueryString["type"]; if (!flowid.IsGuid()) { return("{}"); } var flow = new Business.Platform.WorkFlow().Get(flowid.ToGuid()); if (flow == null) { return("{}"); } else { return("0" == type ? flow.RunJSON : flow.DesignJSON); } }
public ActionResult Open_List(FormCollection collection) { Business.Platform.WorkFlow bwf = new Business.Platform.WorkFlow(); string name = string.Empty; string type = Request.QueryString["typeid"]; if (collection != null) { name = Request.Form["flow_name"]; } IEnumerable <Data.Model.WorkFlow> flows = bwf.GetAll().Where(p => p.Status != 4); if (!name.IsNullOrEmpty()) { flows = flows.Where(p => p.Name.IndexOf(name) >= 0); } ViewBag.Name = name; return(View(flows)); }
public ActionResult List(FormCollection collection) { string appid = Request.QueryString["appid"]; string tabid = Request.QueryString["tabid"]; string typeid = Request.QueryString["typeid"]; string title = string.Empty; Business.Platform.WorkFlowArchives BWFA = new Business.Platform.WorkFlowArchives(); Business.Platform.WorkFlow BWF = new Business.Platform.WorkFlow(); if (collection != null) { title = Request.Form["Title"]; } else { title = Request.QueryString["Title"]; } string query = string.Format("&appid={0}&tabid={1}&Title={2}&typeid={3}", Request.QueryString["appid"], Request.QueryString["tabid"], title.UrlEncode(), typeid ); string query1 = string.Format("{0}&pagesize={1}&pagenumber={2}", query, Request.QueryString["pagesize"], Request.QueryString["pagenumber"]); string pager; System.Data.DataTable Dt = BWFA.GetPagerData(out pager, query, title, BWF.GetFlowIDFromType(typeid.ToGuid())); ViewBag.Pager = pager; ViewBag.Title1 = title; ViewBag.appid = appid; ViewBag.tabid = tabid; ViewBag.typeid = typeid; ViewBag.Query1 = query1; return(View(Dt)); }
public ActionResult instanceList1(FormCollection collection) { Business.Platform.WorkFlowTask bworkFlowTask = new Business.Platform.WorkFlowTask(); Business.Platform.WorkFlow bworkFlow = new Business.Platform.WorkFlow(); string title = ""; string flowid = ""; string sender = ""; string date1 = ""; string date2 = ""; string status = ""; string typeid = Request.QueryString["typeid"]; if (collection != null) { title = Request.Form["Title"]; flowid = Request.Form["FlowID"]; sender = Request.Form["SenderID"]; date1 = Request.Form["Date1"]; date2 = Request.Form["Date2"]; status = Request.Form["Status"]; } else { title = Request.QueryString["Title"]; flowid = Request.QueryString["FlowID"]; sender = Request.QueryString["SenderID"]; date1 = Request.QueryString["Date1"]; date2 = Request.QueryString["Date2"]; status = Request.QueryString["Status"]; } string query1 = string.Format("&appid={0}&tabid={1}&title={2}&flowid={3}&sender={4}&date1={5}&date2={6}&status={7}", Request.QueryString["appid"], Request.QueryString["tabid"], title.UrlEncode(), flowid, sender, date1, date2, status); string query = string.Format("{0}&pagesize={1}&pagenumber={2}", query1, Request.QueryString["pagesize"], Request.QueryString["pagenumber"]); string pager; List <SelectListItem> statusItems = new List <SelectListItem>(); statusItems.Add(new SelectListItem() { Text = "==全部==", Value = "0", Selected = "0" == status }); statusItems.Add(new SelectListItem() { Text = "未完成", Value = "1", Selected = "1" == status }); statusItems.Add(new SelectListItem() { Text = "已完成", Value = "2", Selected = "2" == status }); //可管理的流程ID数组 var flows = bworkFlow.GetInstanceManageFlowIDList(Business.Platform.Users.CurrentUserID, typeid); List <Guid> flowids = new List <Guid>(); foreach (var flow in flows.OrderBy(p => p.Value)) { flowids.Add(flow.Key); } Guid[] manageFlows = flowids.ToArray(); string flowOptions = bworkFlow.GetOptions(flows, typeid, flowid); var taskList = bworkFlowTask.GetInstances(manageFlows, new Guid[] { }, sender.IsNullOrEmpty() ? new Guid[] { } : new Guid[] { sender.Replace(Business.Platform.Users.PREFIX, "").ToGuid() }, out pager, query1, title, flowid, date1, date2, status.ToInt()); ViewBag.Query = query; ViewBag.Pager = pager; ViewBag.StatusItems = statusItems; ViewBag.Title1 = title; ViewBag.FlowOptions = flowOptions; ViewBag.Sender = sender; ViewBag.Date1 = date1; ViewBag.Date2 = date2; return(View(taskList)); }