示例#1
0
 protected void innerBuildCodeList(FXmlNodes config, String name, ISqlConnect connect) {
   // 去数据库去CodeList
   if (_logger.debugAble()) {
     _logger.debug(this, "buildItemNodes", "Find item nodes. (codelist={0})", name);
   }
   FSqlQuery sql = new FSqlQuery(connect, getClass(), SQL_CODE_LIST);
   sql.bindString("name", name);
   FDataset dataset = sql.fetchDataset();
   for (FRow row : dataset) {
     FXmlNode itemNode = config.create(XListItem.NAME);
     itemNode.set(XListItem.PTY_VALUE, row.get(XListItem.PTY_VALUE));
     itemNode.set(XListItem.PTY_LABEL, row.get(XListItem.PTY_LABEL));
   }
 }
示例#2
0
 protected void innerBuildList(FXmlNodes config, String name) {
   // 通过列表取数据
   XList xlist = get(name);
   if (xlist.hasChild()) {
     IXmlObjects xitems = xlist.children();
     int count = xitems.count();
     for (int n = 0; n < count; n++) {
       XListItem xitem = (XListItem) xitems.get(n);
       if (null != xitem) {
         FXmlNode itemNode = config.create(XListItem.NAME);
         itemNode.set(XListItem.PTY_VALUE, xitem.getValue());
         itemNode.set(XListItem.PTY_LABEL, xitem.getLabel());
       }
     }
   }
 }