protected void Page_Load(object sender, EventArgs e) { string pager; string appid = Request.QueryString["appid"]; string tabid = Request.QueryString["tabid"]; string typeid = Request.QueryString["typeid"]; string title1 = Request.QueryString["title1"]; string address = Request.QueryString["address"]; FoWoSoft.Platform.AppLibrary bapp = new FoWoSoft.Platform.AppLibrary(); if (IsPostBack) { title1 = Request.Form["Title1"]; address = Request.Form["Address"]; //删除 if (!Request.Form["Button1"].IsNullOrEmpty()) { string deleteID = Request.Form["checkbox_app"]; System.Text.StringBuilder delxml = new System.Text.StringBuilder(); foreach (string id in deleteID.Split(',')) { Guid gid; if (id.IsGuid(out gid)) { var app = bapp.Get(gid); if (app != null) { delxml.Append(app.Serialize()); bapp.Delete(gid); } } } FoWoSoft.Platform.Log.Add("删除了一批应用程序库", delxml.ToString(), FoWoSoft.Platform.Log.Types.角色应用); } } FoWoSoft.Platform.Dictionary bdict = new FoWoSoft.Platform.Dictionary(); string typeidstring = typeid.IsGuid() ? bapp.GetAllChildsIDString(typeid.ToGuid()) : ""; Query = string.Format("&appid={0}&tabid={1}&title1={2}&typeid={3}&address={4}", Request.QueryString["appid"], Request.QueryString["tabid"], title1.UrlEncode(), typeid, address.UrlEncode() ); Query1 = string.Format("{0}&pagesize={1}&pagenumber={2}", Query, Request.QueryString["pagesize"], Request.QueryString["pagenumber"]); AppList = bapp.GetPagerData(out pager, Query, title1, typeidstring, address); this.Pager.Text = pager; }
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(); } } }