?? contractproductinsert.jsp
字號:
<jsp:useBean id="account" class="src.wuyang.Account" scope="page"/>
<jsp:useBean id="ContractProduct" class="src.wuyang.ContractProduct" 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>
<% }
%>
<%! String contractId;%>
<%! int productNum;%>
<%
contractId = request.getParameter("contractId");
productNum=ContractProduct.query("contractId='"+contractId+"'","");
%>
<html>
<head>
<link rel="stylesheet" href="../pub/style.css">
</head>
<body>
<table border="1">
<tr bgcolor="#9cc1c1">
<td>合同編號 :</td>
<td>產品編號 : </td>
<td>產品名稱 </td>
<td>英文名稱 </td>
<td>規格/型號 </td>
<td>數量 : </td>
<td>單價 : </td>
<td>買賣標記0 賣1 買 :</td>
<td>總金額 </td>
<td> </td>
<td> </td>
</tr>
<%
float totalPrice=0;
ContractProduct.next();
for(int i=0;i<productNum;i++)
{
%>
<form method="post" name="contractProduct" action="UpdateContractProduct.jsp?contractId=<%= contractId %>&pageName=<%=request.getParameter("pageName")%>" onsubmit="return VerifyInput(this);" >
<input type="hidden" name="contractId" value="<%= contractId %>" >
<tr>
<td><%=contractId %></td>
<td>
<input type="hidden" name="productId" value="<%=ContractProduct.getProductId()%>" > <%=ContractProduct.getProductId()%>
</td>
<% product.load(ContractProduct.getProductId());
%>
<td><%=product.getProductName()%></td>
<td><%=product.getProductEName()%></td>
<td><%=product.getProductDesc()%></td>
<td >
<input type="text" name="unitPrice" value="<%=ContractProduct.getUnitPrice()%>" size="12" maxlength="12" >
</td>
<td >
<input type="text" name="quantity" value="<%=ContractProduct.getQuantity()%>" size="12" maxlength="12">
</td>
<td >
<% float subPrice=ContractProduct.getUnitPrice()*ContractProduct.getQuantity();
%>
<%=subPrice%>
</td>
<td>
<input type="submit" name="update" value="修改" />
</td>
<td>
<input type="submit" name="delete" value="刪除" />
</td>
</tr>
</form>
<%
ContractProduct.next();
totalPrice = totalPrice + subPrice;
}
%>
<form method="post" name="contractProduct0" action="UpdateContractProduct.jsp?contractId=<%= contractId %>&pageName=<%=request.getParameter("pageName")%>" onsubmit="return VerifyInput(this);" >
<input type="hidden" name="contractId" value="<%= contractId %>" >
<tr>
<td><%=contractId %></td>
<td>
<input type="text" name="productId" value="" size="10" maxlength="10" >
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
<input type="text" name="unitPrice" value="" size="12" maxlength="12" >
</td>
<td>
<input type="text" name="quantity" value="" size="12" maxlength="12" >
</td>
<td><%=totalPrice%></td>
<td>
<input type="submit" name="insert" value="增加" >
</td>
<td>
</td>
</form>
</table>
<form method="post" name="contractProduct0" action="ContractInstalmentInsert.jsp?contractId=<%= contractId %>" >
<input type="submit" name="return" value="下一步" >
</form>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -