?? updatelocationstate.jsp
字號:
<jsp:useBean id="locationState" class="src.wuyang.LocationState" scope="page"/>
<jsp:useBean id="inventory" class="src.wuyang.Inventory" scope="page"/>
<jsp:useBean id="product" class="src.wuyang.Production" 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 locationId;
locationId = request.getParameter("locationId");
String productId = request.getParameter("productId");
String wearhouseId = request.getParameter("wearhouseId");
String mode = request.getParameter("mode");
String newQuantity = request.getParameter("newQuantity");
String newCounting = request.getParameter("newCounting");
%>
<%
locationState.load(locationId,productId);
float oldQuantity = locationState.getQuantity();
float oldCounting = locationState.getCounting();
locationState.setGlobal(global);
%>
<jsp:setProperty name="locationState" property = "*" />
<%
if(mode!=null){
int rtcode = locationState.update();
inventory.setGlobal(global);
inventory.setProductId(productId);
float delQuantity = locationState.getNewQuantity() - oldQuantity;
float delCounting = locationState.getNewCounting() - oldCounting;
inventory.setQuantity(delQuantity);
inventory.setCounting(delCounting);
inventory.setWearhouseId(wearhouseId);
inventory.setLocationId(locationId);
int flag = inventory.insertAdjust();
if(rtcode <= 0) {
%>
<jsp:forward page="../pub/DBErr.jsp" >
<jsp:param name="rtcode" value="<%= rtcode %>" />
</jsp:forward>
<% }
}
product.load(productId);
%>
<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="UpdateLocationState.jsp" >
<input type = "hidden" name="mode" vlue="update">
<input type="hidden" name="locationId" value="<%=locationId%>">
<input type="hidden" name="wearhouseId" value="<%=wearhouseId%>">
<table width="279">
<tr>
<td class="textb"><b>產品編碼</b></td>
<td>
<input type="hidden" name="productId" value="<%=product.getProductId()%>">
<%= product.getProductId() %></td>
</tr>
<br>
<tr>
<td class="textb"><b>產品名稱</b></td>
<td><%= product.getProductName() %></td>
</tr>
<br>
<tr>
<td class="textb"><b>盤存數量</b></td>
<td>
<input type = "text" name = "newQuantity" <%if(newQuantity!=null){%>value="<%=newQuantity%>"<%}%>>
</td>
</tr>
<br>
<tr>
<td class="textb"><b>盤存件數</b></td>
<td>
<input type = "text" name = "newCounting" <%if(newCounting!=null){%>value="<%=newCounting%>"<%}%>>
</td>
</tr>
</table>
<p>
<input type = "submit" name="check" value = "盤存">
</form>
</blockquote>
</td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -