<%@ page contentType="text/html;charset=gbk" %>
<%@ page import="java.util.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.system.*" %>
<%@ page import="net.sz600.formEngine.*" %>
<%@ page import="net.sz600.formEngine2.*" %>
<%@ page import="net.sz600.formCreate.*" %>
<%@ include file="/xml/formEngine2/sessionInfo2.jsp"%>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link href="<%=strSkin_SESSION%>/css2007.css" rel="stylesheet" type="text/css">
</head>
<%
    BdOpenSelect bdOpenSelect = new BdOpenSelect();
    int i = 0;
    int iLen = 0;
    ArrayList list = bdOpenSelect.getList();
  
    String sModule = SzConvert.toSpaceStr(request.getParameter("module")); 
    if (!sModule.equals("") && !sModule.endsWith(".xml")) {
    	sModule = sModule + ".xml";
    }

    BdFormControl formControl = new BdFormControl();
		boolean isFormEngine = formControl.isFormEngine(sModule);    
		
	  String sObjectType = SzConvert.toSpaceStr(request.getParameter("ObjectType"));
	  String sFunction = "OpenSelectWin";

    if (sObjectType.equals("101")) {
      sFunction = "OpenDetailSelectWin";
    }

%>
<!-----信息列表----->
<table width="100%" border="1" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" class="tableClass" cellpadding="1" cellspacing="0">
  <form name="formList" method="post">

  <tr class="trClassTitle2">
    <td>关联名称</td>
    <td>关联说明</td>
    <td>所属模块</td>      

    <td width="65">操作</td>
  </tr>
<%
		String temp = "";
		String str[]=null;
		BdOpenSelectInfo info = null;
		iLen = list.size();
		int j = 0;
    for (i=0; i<iLen; i++ ) {
    	info = (BdOpenSelectInfo)list.get(i);
   	
    	if (!sModule.equals("") && !sModule.equals(info.getModuleName())) {
    		continue;
    	}
    	temp = info.getGLSM();
    	j ++;
    	
%>
  <tr onMouseOver="javascript:this.className='trMouseOver'" onMouseOut="javascript:this.className='trMouseOut'">
    <td><%=temp%>&nbsp;</td>
    <td><%=info.getGLBZ()%>&nbsp;</td>
    <td><%=info.getModuleName()%>&nbsp;</td>
    <td width="30"><a href="#"  OnClick="Save('<%=temp %>');">确定</a></td>
  </tr>
<%
    }
    out.println(SzPageHelp.outIndexTableTr(j, SzProperties.I_PageSize, 4));
%>
  </form>
</table>

<!-----下面的工具栏------>
<table width="100%" cellpadding="1" cellspacing="0">
  <form name="formPage" method="post">
  <tr>
    <td align="right">
      &nbsp;
    </td>
  </tr>
  </form>
</table>

<!-----这里包含要提交的内容--->
<form name="formHidden" method="post">
</form>
<script language="javascript" src="<%=strLevel_SESSION%>share/js/commonTool.js"></script>
<script language="javascript">
  function Save(name) { 
    //把生成的选择html放到
    //var oWindow = window.opener;
    var oWindow = window.dialogArguments;
    var vHtml = "";
    vHtml += "<input type='button' name='btnSelect' class='btnClassShort' value='选择' ";  
    vHtml += " OnClick=\"javascript:<%=sFunction%>('" + name + "');\">";
    oWindow.AddSelectHtml(vHtml);
    window.close();
  }
</script>
