protected override void OnPreRender(EventArgs e) { InitTreeNodes(WfApplicationAdapter.Instance.LoadAll()); var initPropeties = new { Key = "Default", Name = "全局参数", Properties = WfGlobalParameters.LoadDefault().Properties }; this.ClientScript.RegisterHiddenField("initProperties", JSONSerializerExecute.Serialize(initPropeties)); base.OnPreRender(e); }
protected void btnOK_Click(object sender, EventArgs e) { try { WfGlobalParameters parameters = WfGlobalParameters.LoadDefault(); parameters.Properties.Clear(); parameters.Properties.CopyFrom(propertyGrid.Properties); parameters.Update(); WebUtility.ResponseCloseWindowScriptBlock(); } catch (System.Exception ex) { WebUtility.ShowClientError(ex.Message, ex.StackTrace, "错误"); } }