示例#1
0
 /** 扩展字段 创建下拉列表 Select aa = dataDom.getExtend().getSelect("字段"); */
 public void creatSel(Select select, String strSQL, boolean canNull) {
   try {
     Rowset rs = Database.getRowset(strSQL);
     if (select != null) {
       for (int i = 0; i < select.getOptions().size(); i++) {
         select.removeOption(i);
       }
     }
     if (canNull) {
       select.addOption(new Option("", ""));
     }
     if (rs != null)
       while (rs.next()) select.addOption(new Option(rs.getString(1), rs.getString(2)));
   } catch (Exception e) {
     Log.error(e);
   }
 }
示例#2
0
 /**
  * 初始化评委
  *
  * @param dataDom
  * @addTime 2014-3-19 下午02:30:01
  * @author Libo
  */
 private void initEvalSel(DataDom dataDom) {
   Table table = dataDom.getTable("YXPBPFLIN");
   String PBPF_NO = table.getSafeRowColumnValue("PBPF_NO");
   String pfTyp = table.getSafeRowColumnValue("PF_TYP");
   String prjl_no = table.getSafeRowColumnValue("PRJL_NO");
   Select select = dataDom.getExtend().getSelect("evalSelector");
   select.getOptions().clear();
   if ("A".equals(pfTyp)) {
     select.addOption(new Option("无评委", "-1"));
   } else if ("B".equals(pfTyp)) {
     creatSel(
         select,
         "select EVAL_PERS_NAM,EVAL_PERS_NO from YXPJEVALPERSMST where EVAL_PERS_NO in(select EVAL_PERS_NO from YXHSPWLIN where PRJ_NO=(SELECT PRJ_NO FROM YXPBPFMST WHERE PBPF_NO = '"
             + PBPF_NO
             + "') and PRJL_NO='"
             + prjl_no
             + "' and EVAL_TYP='B')",
         false,
         false);
   }
 }