예제 #1
0
        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);
            }
        }
예제 #2
0
        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();
        }