コード例 #1
0
        private static bool HasPermission(IWfProcess process)
        {
            bool result = MostSupervisor;

            if (result == false)
            {
                result = WfClientContext.IsProcessAdmin(DeluxeIdentity.CurrentUser, process);
            }

            return(result);
        }
コード例 #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();
        }
コード例 #3
0
        protected override void InitDialogContent(Control container)
        {
            base.InitDialogContent(container);

            this._ProcessParametersGrid = (DeluxeGrid)this.FindControlByID("RuntimeParametersInfoDeluxeGrid", true);
            this._ProcessParametersGrid.PageIndexChanging += new System.Web.UI.WebControls.GridViewPageEventHandler(ProcessParametersGrid_PageIndexChanging);

            string editorTitle = Translator.Translate(Define.DefaultCulture, "编辑流程参数");

            HtmlInputButton editBtn = (HtmlInputButton)this.FindControlByID("editBtn", true);

            if (editBtn != null)
            {
                editBtn.Visible = CurrentProcess != null && WfClientContext.IsProcessAdmin(DeluxeIdentity.CurrentUser, CurrentProcess);
                editBtn.Attributes["onclick"] = string.Format("$find(\"{0}\").showEditParametersDialog();", this.ClientID);
            }

            this._refreshButton = (Button)this.FindControlByID("refreshButton", true);
        }