Exemplo n.º 1
0
 private void SetPersistedValueFor(JobParameter controlDto)
 {
     if (PersistedValues.ContainsKey(controlDto.Id))
     {
         Definitions.SetValue(controlDto.Control, PersistedValues[controlDto.Id]);
     }
 }
Exemplo n.º 2
0
        private static Control CreateRowFor(JobParameter jobParameter)
        {
            var rowContainer = new HtmlGenericControl("div");

            rowContainer.Attributes.Add("class", "parameter-control-container");
            var control = jobParameter.Control;

            if (jobParameter.ShowLabel)
            {
                var label = new Label
                {
                    AssociatedControlID = jobParameter.Id,
                    Text    = jobParameter.LabelText,
                    ToolTip = jobParameter.Description
                };
                rowContainer.Controls.Add(label);
            }
            else
            {
                var noLabelContainer = new HtmlGenericControl("div");
                noLabelContainer.Attributes.Add("title", jobParameter.Description);
                noLabelContainer.Attributes.Add("class", "control-without-label");
                noLabelContainer.Controls.Add(jobParameter.Control);
                control = noLabelContainer;
            }
            var controlContainer = new HtmlGenericControl("div");

            controlContainer.Attributes.Add("class", "control-container");
            controlContainer.Controls.Add(control);
            rowContainer.Controls.Add(controlContainer);
            return(rowContainer);
        }