private void SetPersistedValueFor(ParameterControlDTO controlDto) { if (!PersistedValues.ContainsKey(controlDto.Id)) return; Definitions.SetValue(controlDto.Control, PersistedValues[controlDto.Id]); }
private static Control CreateRowFor(ParameterControlDTO parameterControlDto) { var rowContainer = new HtmlGenericControl("div"); rowContainer.Attributes.Add("class", "parameter-control-container"); var control = parameterControlDto.Control; if (parameterControlDto.ShowLabel) { var label = new Label { AssociatedControlID = parameterControlDto.Id, Text = parameterControlDto.LabelText, ToolTip = parameterControlDto.Description }; rowContainer.Controls.Add(label); } else { var noLabelContainer = new HtmlGenericControl("div"); noLabelContainer.Attributes.Add("title", parameterControlDto.Description); noLabelContainer.Attributes.Add("class", "control-without-label"); noLabelContainer.Controls.Add(parameterControlDto.Control); control = noLabelContainer; } var controlContainer = new HtmlGenericControl("div"); controlContainer.Attributes.Add("class", "control-container"); controlContainer.Controls.Add(control); rowContainer.Controls.Add(controlContainer); return rowContainer; }