<%@ page contentType="text/html;charset=gbk" %>
<%@ page import="java.util.*" %>
<%@ page import="net.sz600.basicdata.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.database.SzPageInfo" %>
<%@ page import="net.sz600.system.SzProperties" %>
<%@ page import="net.sz600.system.SzPageHelp" %>
<%@ page import="net.sz600.formEngine2.*" %>
<%@ include file="sessionInfo2.jsp"%>
<html>
<head>
<BASE target=_self>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link href="<%=strSkin_SESSION%>/css2007.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
    BdForm bdForm = new BdForm();
    String XML_str[] = bdForm.getXMLModuleList(1);    
    //根据moduleName获取响应的表单信息 
	String moduleName = SzConvert.strWriteData(request.getParameter("moduleName"));
    String formName = SzConvert.strWriteData(request.getParameter("formName"));
%>    
<table width="100%">
  <form name="formUpdate" method="post" action="form_select.jsp">
  <tr>
    <td>选择模块</td>
    <td><%=SzPageHelp.selectArraySubmit(XML_str, XML_str, "moduleName", moduleName, "txtClass1")%></td>
  </tr>    
  <tr>
    <td>选择表单</td>
    <td><select name="formName" style="width:150;" onChange="this.form.submit();">
    <option value="">===请选择===</option>
<%
    //根据
    Iterator iterForm = null;
    String sFormName = "";
    BdFormInfo bdFormInfo = null;      
    if (!moduleName.equals("")) {
    	iterForm = bdForm.getFormInfoList(moduleName, 1).iterator();
    }
    while (iterForm != null && iterForm.hasNext()) {
      	bdFormInfo = (BdFormInfo)iterForm.next();        
      	sFormName = bdFormInfo.getFormName();    	  
%>
	<option value="<%=sFormName%>" <%if(formName.equals(sFormName)) {%>selected<%}%> ><%=bdFormInfo.getFormDesc()%></option>
<%    	  
    }
%></select>
	</td>
  </tr>
  <tr>
    <td colspan="2" align="center"  class="trClassTitle">                        
      <input type="button" value="确定" class="btnClass" OnClick="Ok();">
      <input type="button" value="关闭" class="btnClass" OnClick="window.close();">
    </td>  
  </tr>    
  </form>
</table>
</body>
</html>
<script language="javascript">
  function Ok() {
	var oWindow = window.dialogArguments;
	eval("oWindow.formUpdate.moduleNameTemp.value='" + formUpdate.moduleName.value + "';");
	eval("oWindow.formUpdate.formNameTemp.value='" + formUpdate.formName.value + "';");	

	window.close();
  }
</script>

