TTable userTable = DBMgr::getdb()->query("SELECT K AS Names FROM S_CFG");
vector<string> vec;
for(int i=0;i<userTable.size();i++) {
string stmp = userTable.getValue(i,"Names");
vec.push_back("{\"id\":\""+stmp+"\",\"name\":\""+stmp+"\"}");
}
string json = "[" + StringUtil::join(vec, ",") + "]";
wMDropdown1->setOptions(json, 0);