⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 edithouseinfo.jsp

📁 由于信息产业、网络通讯、电子技术的高速发展、宽频网络的应用
💻 JSP
字号:
<%@ page language="java" pageEncoding="gbk" import="dbManager.DBManager,java.sql.ResultSet"%>


<html>
  <head>
<title>编辑房屋信息</title>

<script type="text/javascript">

		// 检验输入内容是否合法      
        function checkText()
        {            
             if( form1.houseID.value.length==0 )
             {
             	alert('房屋编号不能为空!');
             	return false;
             }
             if( form1.houseUse.value.length==0 )
             {
             	alert('请输入房屋用途!');
             	return false;
             }
             if( form1.dropTypeName.value == "00")
             {
             	alert('请选择一种收费类型');
             	return false;
             }
             else
             {
             	if( confirm('确认保存数据?') )
                {
                	document.form1.submit();               	
                }
                else 
                	return false;
             }        
        }
        
        function windowClose()
        {
        	this.opener.location='../../../houseInfo.do';
        	window.close();
        }
</script>
</head>
  
<body bgcolor="#e8edfa">
<%
	DBManager db = new DBManager();	
	String s = request.getParameter("s");
	s = s.substring(0,s.length()-1);
	String editSql = "select houseID,houseArea,case houseState when '1' then '使用中' when '2' then '未使用' end houseStateText,houseState,houseUse,typeName,t_house.typeID from t_house,t_type where t_house.typeID = t_type.typeID and t_house.houseID='"+ s +"'";
	ResultSet rs = db.getResult(editSql);
    rs.next(); 
%>
<form method="post" name="form1" action="../../../editHouseInfo.do">
<table width="99%" >
 <tr>	    
    <td height="36" colspan="2" align="left"><div align="left"><strong><font size="2">增加房屋信息:</font></strong> 
        </div></td>	    
    <td height="36"><img src="../../../images/queren1.gif" width="69" height="22" style="cursor:hand"
	   	    onmouseover="this.src='../../../images/queren2.gif'"
	    	onmouseout="this.src='../../../images/queren1.gif'"
	    	onclick="return checkText();"></td>
	    
    <td height="36"><img src="../../../images/fanhui1.gif" width="69" height="22" style="cursor:hand"
	    	onmouseover="this.src='../../../images/fanhui2.gif'"
	    	onmouseout="this.src='../../../images/fanhui1.gif'"
	    	onclick="windowClose();"></td>
  </tr>
</table>	
  <div id="Layer1" style="position:absolute; width:99%; height:115px; z-index:1; left: 6px; top: 78px;"> 
  <table width="99%" style="font-size: x-small">
  <tr> 
     <td width="5%" height="29"><div align="left">房屋编号</div></td>
	    <td width="8%"><div align="left">
          <input type="text" name="houseID" value=<%=rs.getString("houseID") %>  style="width:99%;background-color:#bcd7f8" readonly="readonly"/>
        </div></td>
	    <td width="5%"><div align="left">房屋用途</div></td>
	    <td width="8%"><div align="left">
          <input type="text" name="houseUse"  style="width:99%" value=<%=rs.getString("houseUse") %> />
        </div></td>
 </tr>
 
  <tr>	    
    <td height="33"><div align="left">房屋状态</div></td>
	    <td><div align="left">
          <input type="text" value="<%=rs.getString("houseStateText") %>" style="width:99%;background-color:#bcd7f8 "  readonly="readonly" />
          <input type="hidden" name="houseState" value="<%=rs.getString("houseState") %>"/>
        </div></td>
	    <td><div align="left">建筑面积</div></td>
	    <td><div align="left">
          <input type="text" name="houseArea"  style="width:99%" value=<%=rs.getString("houseArea") %> />
        </div></td>
  </tr>
   <%			  	
			 String sql = "select * from t_type";
			 ResultSet rs2 = db.getResult(sql);
   %>
  <tr>	    
    <td height="30" ><div align="left">收费类型</div></td>	    
      <td> <div align="left">
          <select name="dropTypeName" style="width:99%" onChange="typeID.value=this.value">
          <option value="00">请选择收费类型</option>
			 <%
			  	while(rs2.next() )
			  	{
			  %>
			  	<option value="<%=rs2.getString("typeID") %>">
			  	<%=rs2.getString("typeName") %>
			  	</option>
			<%	
			  	}
   			%>
          </select>
        </div></td>
	    <td><div align="left">类型编号</div></td>
	    <td><div align="left">
          <input type="text" id="typeID" name="typeID" value=<%=rs.getString("typeID") %>  style="width:99%;background-color:#bcd7f8 "  readonly="readonly"/>
        </div></td>
	  </tr>
	</table>
  </div>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -