public HtmlString GetPatientParameterLayout() { var name_element = "Value"; HtmlString layout = new HtmlString(""); if (!parameter.MetaData.Is_var) { var _object = new Dictionary <string, object>(); _object["Name"] = parameter.Name; _object["Value"] = parameter.Value; var renderer = new TextBoxRenderer(); return(new HtmlString(renderer.GetLayout(_object, name_prefix, name_element).ToString())); } else { var _object = new Dictionary <string, object>(); _object["Name"] = parameter.Name; var _Variants = new Dictionary <string, string>(); for (int i = 0; i < parameter.MetaData.Variants.Length; i++) { _Variants.Add(String.Format("name-{0}", i), parameter.MetaData.Variants[i].Value); } _object["Variants"] = _Variants; if (parameter.MetaData.Variants.Length <= BaseRenderer.limit_length_of_list) { var renderer = new ListBoxRenderer(); return(new HtmlString(renderer.GetLayout(_object, name_prefix, name_element).ToString())); } else { var renderer = new DropDownBoxRenderer(); return(new HtmlString(renderer.GetLayout(_object, name_prefix, name_element).ToString())); } } }
public HtmlString GetPatientParameterLayout() { var name_element = "Value"; HtmlString layout = new HtmlString(""); if (!parameter.MetaData.Is_var) { var _object = new Dictionary<string, object>(); _object["Name"] = parameter.Name; _object["Value"] = parameter.Value; var renderer = new TextBoxRenderer(); return new HtmlString(renderer.GetLayout(_object, name_prefix, name_element).ToString()); } else { var _object = new Dictionary<string, object>(); _object["Name"] = parameter.Name; var _Variants = new Dictionary<string, string>(); for (int i = 0; i < parameter.MetaData.Variants.Length; i++) { _Variants.Add(String.Format("name-{0}", i), parameter.MetaData.Variants[i].Value); } _object["Variants"] = _Variants; if (parameter.MetaData.Variants.Length <= BaseRenderer.limit_length_of_list) { var renderer = new ListBoxRenderer(); return new HtmlString(renderer.GetLayout(_object, name_prefix, name_element).ToString()); } else { var renderer = new DropDownBoxRenderer(); return new HtmlString(renderer.GetLayout(_object, name_prefix, name_element).ToString()); } } }