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

📄 productiondetail.jsp

📁 (Java+SQL)-大型企业JAVA的ERP系统
💻 JSP
字号:
<jsp:useBean id="product" class="src.wuyang.Production" scope="page"/>
<jsp:useBean id="productClass" class="src.wuyang.ProductClass" scope="page" />
<jsp:useBean id="dept" class="src.wuyang.Department" scope="page" />
<jsp:useBean id="global" class="src.com.MyGlobal" scope="session"/>

<% if (global.isLogined == false) {
%>
<jsp:forward page="../pub/DBErr.jsp" > 
	<jsp:param name="rtcode" value="-4" />
</jsp:forward>
<%	}
%>


<html>
<head>
<title>产品信息</title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../pub/style.css">
</head>

<%
String productId = request.getParameter("productId");
String mode = request.getParameter("mode");
System.out.println("mode="+ mode);
productId = new String(productId.getBytes("8859_1"));

if (request.getParameter("update")!=null && mode.equals("update") ){ 
	product.setGlobal(global);	
%>
<jsp:setProperty name="product" property="*" />
<%
	int rtcode = product.update();

	if(rtcode >= 0) {
%>
<jsp:forward page="ProductionDetail.jsp" > 
	<jsp:param name="success" value="ok" />
	<jsp:param name="mode" value="ok" />
</jsp:forward>

<% 	
	}else {  
%>
<jsp:forward page="../pub/DBErr.jsp" > 
	<jsp:param name="rtcode" value="<%= rtcode %>" />
</jsp:forward>

<%  
	}  
}

	product.load(productId);
	
%>

<html>
<form method="post" action="ProductionDetail.jsp">
	<input type="hidden" name="productId" value="<%=product.getProductId()%>">
	<input type="hidden" name="mode" value="update"/>
	产品编号:<%=product.getProductId()%> 
	<br>
	产品名称:<input type="text" name="productName" value="<%=product.getProductName()%>"/>
	<br>
	产品英文名:<input type="text" name="productEName" value="<%=product.getProductEName()%>"/>
	<br>
	产品描述:<input type="text" name="productDesc" value="<%=product.getProductDesc()%>"/>
	<br>
	产品产地:<input type="text" name="productAddress" value="<%=product.getProductAddress()%>"/>
	<br>
	产品类别:<select name="classId">
<%
		     productClass.query("", "");
		     while (productClass.next() == 1){ 
%> 
	              <option value="<%=productClass.getClassId()%>" <%if ((productClass.getClassId()).equals(product.getClassId())){%> selected <%}%>>
	              <%=productClass.getClassDesc()%>
	              </option>
<% 
			} 
%> 
	     </select>
	<br>
	产品单位:<input type="text" name="unit" value="<%=product.getUnit()%>"/>
	<br>
	安全库存量<input type="text" name="attenQuantity" value="<%=product.getAttenQuantity()%>"/>
	<br>
	主营部门: <select name="deptId">
<%
		     dept.query("deptId>'007'", "");
		     while (dept.next() == 1){ 
%> 
	              <option value="<%=dept.getDeptId()%>" <%if ((dept.getDeptId()).equals(product.getDeptId())){%> selected <%}%>>
	              <%=dept.getDeptName()%>
	              </option>
<% 
	        	}
%>
		</select>
	<p>
	<input type="submit" name="update" value="修改" />
	<input type="reset" value="重置" />
</form>
</html>

⌨️ 快捷键说明

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