예제 #1
0
        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);
        }
예제 #2
0
        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, "错误");
            }
        }