//---------------------------------------------------------------------------------------------------- private void Populate_TablesSelect(jQuery select) { select.html("<option value='-1'></option>"); var tables = this.ViewModel.AllTables_InDb; if (tables == null) { return; } for (int i = 0; i < tables.Length; i++) { var item = tables[i]; string s = JsStr.StrFormat3("<option value='{0}'>{1}.{2}</option>", item.TableId.As <string>(), item.Schema, item.TableName); select.append(s); } }
//---------------------------------------------------------------------------------------------------- private void Populate_SelectOptions(jQuery jSelectElement, string listPropertiesSetting, object[] optionsObjects, ModelListCommand cmd) { jSelectElement.html(""); for (int i = 0; i < optionsObjects.Length; i++) { var optionsObj = JsObj.O(optionsObjects[i]); string value = optionsObj.Property2(cmd.Item_Value, ""); string text = optionsObj.Property2(cmd.Item_Text, ""); string style = optionsObj.Property2(cmd.Item_Style, ""); string styleAttribute = ""; if (style.Length > 0) { styleAttribute = "style='" + style + "'"; } jSelectElement.append(JsStr.StrFormat3("<option value='{0}' {1} >{2}</option>", value, styleAttribute, text)); } }