protected void btnSave_Click(object sender, EventArgs e) { try { if (CurrentProcess != null) { this.propertyGrid.Properties.FillDictionary(CurrentProcess.ApplicationRuntimeParameters); WfRuntime.ProcessContext.AffectedProcesses.AddOrReplace(CurrentProcess); WfRuntime.PersistWorkflows(); PropertyValueCollection properties = ObjectToPropertiesHelper.ToProperties <string, object>(CurrentProcess.ApplicationRuntimeParameters); responseData.Value = JSONSerializerExecute.Serialize(properties); Page.ClientScript.RegisterStartupScript(this.GetType(), "notifyTop", "notifyTopWindowDataChange();", true); } } catch (System.Exception ex) { responseData.Value = string.Empty; Page.ClientScript.RegisterStartupScript(this.GetType(), "notifyTop", "notifyTopWindowDataChange();", true); WebUtility.RegisterClientErrorMessage(ex); } }
protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); if (CurrentProcess != null) { PropertyValueCollection properties = ObjectToPropertiesHelper.ToProperties <string, object>(CurrentProcess.ApplicationRuntimeParameters); this.propertyGrid.Properties.Clear(); this.propertyGrid.Properties.CopyFrom(properties); btnSave.Visible = WfClientContext.IsProcessAdmin(DeluxeIdentity.CurrentUser, CurrentProcess); } autoClose.Value = WebUtility.GetRequestQueryValue("autoClose", false).ToString(); }