protected override void OnPagePreRenderComplete(object sender, EventArgs e)
        {
            if (CurrentMode == ControlShowingMode.Dialog)
            {
                InitActivitiesListBox(_ActivitiesList);
                InitOpinionInputControl();

                HtmlTableRow reasonList = (HtmlTableRow)WebControlUtility.FindControlByHtmlIDProperty(this, "reasonList", true);

                if (reasonList != null)
                {
                    if (this.Reasons.Count > 0)
                    {
                        reasonList.Style["display"] = "inline";
                        HtmlSelect resonSelector = (HtmlSelect)WebControlUtility.FindControlByHtmlIDProperty(this, "resonSelector", true);

                        if (resonSelector != null)
                        {
                            foreach (var reason in this.Reasons)
                            {
                                resonSelector.Items.Add(new ListItem(reason.Description, reason.Key));
                            }
                        }
                    }
                }
            }

            base.OnPagePreRenderComplete(sender, e);
        }
예제 #2
0
        protected override void InitDialogContent(Control container)
        {
            base.InitDialogContent(container);

            this.ID = "OpinionInputDialog";

            Control opinionContainer = WebControlUtility.FindControlByHtmlIDProperty(container, "inputContainer", true);

            if (opinionContainer != null)
            {
                TextBox input = new TextBox();

                input.ID       = "OpinionInput";
                input.TextMode = TextBoxMode.MultiLine;
                input.Width    = Unit.Percentage(99);
                input.Height   = Unit.Percentage(99);

                opinionContainer.Controls.Add(input);
            }

            HtmlInputHidden promptText = (HtmlInputHidden)WebControlUtility.FindControlByHtmlIDProperty(container, "promptText", true);

            if (promptText != null)
            {
                if (AllowEmptyOpinion)
                {
                    promptText.Value = string.Empty;
                }
                else
                {
                    promptText.Value = EmptyOpinionPrompt;
                }
            }
        }
        protected override void InitDialogContent(Control container)
        {
            base.InitDialogContent(container);

            this.ID = "userSelectorDialog";

            HtmlForm form = (HtmlForm)WebControlUtility.FindParentControl(this, typeof(HtmlForm), true);

            if (form != null)
            {
                form.Style["width"]  = "100%";
                form.Style["height"] = "100%";
            }

            this.Width  = Unit.Percentage(100);
            this.Height = Unit.Percentage(100);

            InitUserInputControl(WebControlUtility.FindControlByHtmlIDProperty(container, "userInputContainer", true));

            if (this.IsConsign)
            {
                InitConsignTypeSelector(WebControlUtility.FindControlByHtmlIDProperty(container, "consignTypeContainer", true));
                InitSequenceTypeSelector(WebControlUtility.FindControlByHtmlIDProperty(container, "sequenceTypeContainer", true));
            }
        }
        private void InitAllAgreeWhenConsignCheckbox(Control checkbox)
        {
            if (checkbox != null)
            {
                bool visible = true;

                visible = (CurrentActivityDescriptor != null && AllowMultiUsers);

                this.allAgreeWhenConsignCheckbox = (HtmlInputCheckBox)checkbox;

                this.allAgreeWhenConsignCheckbox.Checked = GetAllAgreeWhenConsignCheckboxValue();

                if (visible == false)
                {
                    this.allAgreeWhenConsignCheckbox.Style["display"] = "none";
                }

                HtmlGenericControl label = (HtmlGenericControl)WebControlUtility.FindControlByHtmlIDProperty(allAgreeWhenConsignCheckbox.Parent, "allAgreeWhenConsignLabel", true);

                if (label != null)
                {
                    label.Attributes["for"] = allAgreeWhenConsignCheckbox.ClientID;

                    if (visible == false)
                    {
                        label.Style["display"] = "none";
                    }
                }
            }
        }
        /// <summary>
        /// 初始化对话框内容
        /// </summary>
        /// <param name="container"></param>
        protected override void InitDialogContent(Control container)
        {
            base.InitDialogContent(container);

            this.ID = "PredefinedOpinionDialog";

            _OpinionText = (HtmlTextArea)WebControlUtility.FindControlByHtmlIDProperty(container, "opinionText", true);
            InitOpinionInputBox(_OpinionText);
        }
        /// <summary>
        /// 初始化对话框内容
        /// </summary>
        /// <param name="container"></param>
        protected override void InitDialogContent(Control container)
        {
            base.InitDialogContent(container);

            this.ID = "RejectActivitySelector";

            _ActivitiesList =
                (HtmlSelect)WebControlUtility.FindControlByHtmlIDProperty(container, "activitiesList", true);
        }
예제 #7
0
        private TControl DealChildControl <TControl>(Control template, string controlID, InitControlDelegate <TControl> initDelegate) where TControl : Control
        {
            TControl ctrl = (TControl)WebControlUtility.FindControlByHtmlIDProperty(template, controlID, true);

            if (ctrl != null && initDelegate != null)
            {
                initDelegate(ctrl);
            }

            return(ctrl);
        }
        private void InitOpinionInputControl()
        {
            HtmlGenericControl opinionBody = (HtmlGenericControl)WebControlUtility.FindControlByHtmlIDProperty(this, "opinionBody", true);

            if (opinionBody != null)
            {
                if (ShowOpinionInput)
                {
                    opinionBody.Style["display"] = "inline";
                }
            }
        }
        private void InitCirculateControls(Control container)
        {
            Control circulateRow = WebControlUtility.FindControlByHtmlIDProperty(container, "circulateRow", true);

            if (circulateRow != null)
            {
                circulateRow.Visible = this.ShowCirculateUsers;
            }

            if (this.ShowCirculateUsers)
            {
                InitCirculateUserInput(WebControlUtility.FindControlByHtmlIDProperty(container, "circulateContainer", true));
            }
        }
예제 #10
0
        protected override void InitDialogContent(Control container)
        {
            base.InitDialogContent(container);
            this.ID = "ImageUploaderDialog";

            HtmlForm form = (HtmlForm)WebControlUtility.FindParentControl(this, typeof(HtmlForm), true);

            if (form != null)
            {
                form.Style["width"]  = "100%";
                form.Style["height"] = "100%";
            }
            this.DialogTitle = "上传图片";
            this.Width       = Unit.Percentage(100);
            this.Height      = Unit.Percentage(100);

            InitChildControls(WebControlUtility.FindControlByHtmlIDProperty(container, "imageUploader_container", true));
        }
        protected override void InitDialogContent(Control container)
        {
            this.Page.EnableViewState = false;

            base.InitDialogContent(container);

            this.ID = "activityEditorDialog";

            actName = (HtmlInputText)WebControlUtility.FindControlByHtmlIDProperty(container, "actName", true);

            if (this.Operation == "update" && CurrentActivityDescriptor != null)
            {
                actName.Value = CurrentActivityDescriptor.Name;
            }

            InitAllAgreeWhenConsignCheckbox(WebControlUtility.FindControlByHtmlIDProperty(container, "allAgreeWhenConsignCheckbox", true));
            InitVariableRow(WebControlUtility.FindControlByHtmlIDProperty(container, "variableRow", true));
            InitVariableCheckBoxes(WebControlUtility.FindControlByHtmlIDProperty(container, "variableList", true));

            InitUserInputArea(container);
        }
예제 #12
0
        private void InitOpinionInoutControl()
        {
            HtmlTableCell userInputCell = (HtmlTableCell)WebControlUtility.FindControlByHtmlIDProperty(this, "userInputCell", true);

            if (userInputCell != null)
            {
                if (ShowOpinionInput)
                {
                    userInputCell.Style["height"] = "64px";
                }
            }

            HtmlGenericControl opinionBody = (HtmlGenericControl)WebControlUtility.FindControlByHtmlIDProperty(this, "opinionBody", true);

            if (opinionBody != null)
            {
                if (ShowOpinionInput)
                {
                    opinionBody.Style["display"] = "inline";
                }
            }
        }
예제 #13
0
        private void InitChildControls(Control container)
        {
            Control addressDiv = WebControlUtility.FindControlByHtmlIDProperty(container, "div_serviceImport_serviceAddress", true);

            if (addressDiv != null)
            {
                this._ddlServiceAddress.Items.Clear();
                this._ddlServiceAddress.Style["width"] = "300px";
                this._ddlServiceAddress.Attributes.Add("onchange", "bindOperation()");

                this._ddlServiceAddress.DataSource     = WfGlobalParameters.Default.ServiceAddressDefs;
                this._ddlServiceAddress.DataTextField  = "Address";
                this._ddlServiceAddress.DataValueField = "Key";
                this._ddlServiceAddress.DataBind();

                addressDiv.Controls.Add(this._ddlServiceAddress);
            }

            Control operationDiv = WebControlUtility.FindControlByHtmlIDProperty(container, "div_serviceImport_serviceOperation", true);

            if (operationDiv != null && !string.IsNullOrEmpty(this._ddlServiceAddress.SelectedValue))
            {
                this._ddlServiceOperation.Items.Clear();
                this._ddlServiceOperation.Style["width"] = "300px";
                this._ddlServiceOperation.Attributes.Add("onchange", "analysisResult()");
                try
                {
                    this._ddlServiceOperation.DataSource = GetOperationList(this._ddlServiceAddress.SelectedValue);
                }
                catch { }
                this._ddlServiceOperation.DataBind();
                this._ddlServiceOperation.Items.Insert(0, new ListItem()
                {
                    Selected = true, Text = "请选择", Value = ""
                });
                operationDiv.Controls.Add(this._ddlServiceOperation);
            }
        }
예제 #14
0
 protected override void InitUserInputArea(Control container)
 {
     InitUserInput(WebControlUtility.FindControlByHtmlIDProperty(container, "resourceContainer", true));
 }