protected void LinkButton1_Click(object sender, EventArgs e) { FoWoSoft.Data.Model.WorkFlowCustomEventParams parmas = new FoWoSoft.Data.Model.WorkFlowCustomEventParams(); string instanceid1 = new FoWoSoft.Platform.WorkFlow().SaveFromData(Request.QueryString["instanceid"], parmas); Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "ok", "alert('保存成功!');new RoadUI.Window().reloadOpener();new RoadUI.Window().close();", true); }
protected void Page_Load(object sender, EventArgs e) { appid = Request.QueryString["appid"]; tabid = Request.QueryString["tabid"]; typeid = Request.QueryString["typeid"]; title = string.Empty; FoWoSoft.Platform.WorkFlowArchives BWFA = new FoWoSoft.Platform.WorkFlowArchives(); FoWoSoft.Platform.WorkFlow BWF = new FoWoSoft.Platform.WorkFlow(); if (IsPostBack) { title = Request.Form["Title1"]; } 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 ); query1 = string.Format("{0}&pagesize={1}&pagenumber={2}", query, Request.QueryString["pagesize"], Request.QueryString["pagenumber"]); string pager; Dt = BWFA.GetPagerData(out pager, query, title, BWF.GetFlowIDFromType(typeid.ToGuid())); this.Pager.Text = pager; }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string json = context.Request.Form["json"]; string msg = new FoWoSoft.Platform.WorkFlow().SaveFlow(json); FoWoSoft.Platform.Log.Add("保存了流程", json + "(" + msg + ")", FoWoSoft.Platform.Log.Types.流程相关); context.Response.Write(msg); }
protected void Page_Load(object sender, EventArgs e) { string flowid = Request.QueryString["flowid"]; if (IsPostBack && flowid.IsGuid() && !Request.Form["save"].IsNullOrEmpty()) { string newName = Request.Form["NewFlowName"]; saveOpen = Request.Form["SaveOpen"]; var wf = new FoWoSoft.Platform.WorkFlow().SaveAs(flowid.ToGuid(), newName); if (wf != null) { newid = wf.ID.ToString(); Page.ClientScript.RegisterStartupScript(Page.GetType(), "ok", "alert('另存成功!');", true); } } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string id = context.Request.Form["id"]; string type = context.Request.Form["type"]; FoWoSoft.Platform.WorkFlow bworkFlow = new FoWoSoft.Platform.WorkFlow(); var flow = bworkFlow.Get(id.ToGuid()); if (flow == null) { context.Response.Write("该流程还未保存!"); context.Response.End(); } else { if ("0" == type) { flow.Status = 3; bworkFlow.Update(flow); bworkFlow.RefreshWrokFlowCache(flow.ID); FoWoSoft.Platform.Log.Add("卸载了流程", flow.Serialize(), FoWoSoft.Platform.Log.Types.流程相关); context.Response.Write("1"); context.Response.End(); } else if ("1" == type) { flow.Status = 4; bworkFlow.Update(flow); //bworkFlow.ClearWorkFlowCache(flow.ID); FoWoSoft.Platform.AppLibrary APP = new FoWoSoft.Platform.AppLibrary(); var app = APP.GetByCode(flow.ID.ToString()); if (app != null) { APP.Delete(app.ID); new FoWoSoft.Platform.RoleApp().DeleteByAppID(app.ID); } FoWoSoft.Platform.Log.Add("删除了流程", flow.Serialize(), FoWoSoft.Platform.Log.Types.流程相关); context.Response.Write("1"); context.Response.End(); } } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string flowid = context.Request.QueryString["flowid"]; string type = context.Request.QueryString["type"]; if (!flowid.IsGuid()) { context.Response.Write("{}"); return; } var flow = new FoWoSoft.Platform.WorkFlow().Get(flowid.ToGuid()); if (flow == null) { context.Response.Write("{}"); } else { context.Response.Write("0" == type ? flow.RunJSON : flow.DesignJSON); } }
protected void Page_Load(object sender, EventArgs e) { isoneself = "1" == Request.QueryString["isoneself"]; if (isoneself) { this.S_UserID.Disabled = true; this.S_UserID.Value = FoWoSoft.Platform.Users.PREFIX + FoWoSoft.Platform.Users.CurrentUserID.ToString(); } FoWoSoft.Platform.WorkFlowDelegation bworkFlowDelegation = new FoWoSoft.Platform.WorkFlowDelegation(); FoWoSoft.Platform.Organize borganize = new FoWoSoft.Platform.Organize(); FoWoSoft.Platform.Users busers = new FoWoSoft.Platform.Users(); FoWoSoft.Platform.WorkFlow bworkFlow = new FoWoSoft.Platform.WorkFlow(); string startTime = string.Empty; string endTime = string.Empty; string suserid = string.Empty; string Query1 = string.Format("&appid={0}&tabid={1}&isoneself={2}", Request.QueryString["appid"], Request.QueryString["tabid"], Request.QueryString["isoneself"]); if (IsPostBack) { 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); FoWoSoft.Platform.Log.Add("删除了流程意见", comment.Serialize(), FoWoSoft.Platform.Log.Types.流程相关); } } bworkFlowDelegation.RefreshCache(); } startTime = Request.Form["S_StartTime"]; endTime = Request.Form["S_EndTime"]; suserid = Request.Form["S_UserID"]; } else { startTime = Request.QueryString["S_StartTime"]; endTime = Request.QueryString["S_EndTime"]; suserid = Request.QueryString["S_UserID"]; } Query1 += "&S_StartTime=" + startTime + "&S_EndTime=" + endTime + "&S_UserID=" + suserid; string pager; bool isOneSelf = "1" == Request.QueryString["isoneself"]; if (isOneSelf) { workFlowDelegationList = bworkFlowDelegation.GetPagerData(out pager, Query1, FoWoSoft.Platform.Users.CurrentUserID.ToString(), startTime, endTime); } else { workFlowDelegationList = bworkFlowDelegation.GetPagerData(out pager, Query1, FoWoSoft.Platform.Users.RemovePrefix(suserid), startTime, endTime); } this.Pager.Text = pager; }