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

📄 productionupdate.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>
<link rel="stylesheet" href="css.css" type="text/css">
</head>
<%
String productId = request.getParameter("productId");
String mode = request.getParameter("mode");
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="ProductionUpdate.jsp" > 
	<jsp:param name="mode" value="ok" />
</jsp:forward>

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

<%  
	}  
}

	int count = product.load(productId);
	
	if (count <= 0) {
%>
<jsp:forward page="../pub/DBErr.jsp" > 
	<jsp:param name="rtcode" value="-103" />
</jsp:forward>
<%
	}
%>

<body bgcolor=#949b93><table width="100%" border="1" height="90%" bordercolorlight="#616860" bordercolordark="#CCCCCC" bgcolor="#4c7171" cellpadding="0" cellspacing="0">
  <tr> 
    <td valign="top">
      <blockquote><br>
        <br><form method="post" action="ProductionUpdate.jsp">
	<input type="hidden" name="productId" value="<%=product.getProductId()%>">
	<input type="hidden" name="mode" value="update"/>
          <table width="43%" border="0" class="textb">
            <tr> 
              <td width="35%"><b>产品编号:</b></td>
              <td width="65%"><b><%=product.getProductId()%></b></td>
            </tr>
            <tr> 
              <td width="35%"><b>产品名称:</b></td>
              <td width="65%"> <b> 
                <input type="text" name="productName" value="<%=product.getProductName()%>"/>
                </b></td>
            </tr>
            <tr> 
              <td width="35%"><b>产品英文名:</b></td>
              <td width="65%"> <b> 
                <input type="text" name="productEName" value="<%=product.getProductEName()%>"/>
                </b></td>
            </tr>
            <tr> 
              <td width="35%"><b>产品描述:</b></td>
              <td width="65%"> <b> 
                <input type="text" name="productDesc" value="<%=product.getProductDesc()%>"/>
                </b></td>
            </tr>
            <tr> 
              <td width="35%"><b>产品产地:</b></td>
              <td width="65%"> <b> 
                <input type="text" name="productAddress" value="<%=product.getProductAddress()%>"/>
                </b></td>
            </tr>
            <tr> 
              <td width="35%"><b>产品类别:</b></td>
              <td width="65%"> <b> 
                <select name="classId">
                  <%
		     productClass.query("", "");
		     while (productClass.next() == 1){ 
%>
                  <option value="<%=productClass.getClassId()%>" <%if ((productClass.getClassId()).equals(product.getClassId())){%> selected <%}%>> 
                  <%=productClass.getClassDesc()%> </option>
                  <% 
			} 
%>
                </select>
                </b></td>
            </tr>
            <tr> 
              <td width="35%"><b>产品单位:</b></td>
              <td width="65%"> <b> 
                <input type="text" name="unit" value="<%=product.getUnit()%>"/>
                </b></td>
            </tr>
            <tr> 
              <td width="35%"><b>安全库存量:</b></td>
              <td width="65%"> <b> 
                <input type="text" name="attenQuantity" value="<%=product.getAttenQuantity()%>"/>
                </b></td>
            </tr>
            <tr> 
              <td width="35%"><b>主营部门:</b></td>
              <td width="65%"> <b> 
                <select name="deptId">
                  <%
		     dept.query("", "");
		     while (dept.next() == 1){ 
%>
                  <option value="<%=dept.getDeptId()%>" <%if ((dept.getDeptId()).equals(product.getDeptId())){%> selected <%}%>> 
                  <%=dept.getDeptName()%> </option>
                  <% 
	        	}
%>
                </select>
                </b></td>
            </tr>
            <tr> 
              <td colspan="2"> 
                <div align="center"> <b><br>
                  <input type="submit" name="update" value="修改" />
                  <input type="reset" value="重置" name="reset" />
                  </b></div>
              </td>
            </tr>
          </table>
         </form>
</blockquote>
    </td>
  </tr>
</table>
</html>

⌨️ 快捷键说明

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