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

📄 storeoutmodify.jsp

📁 J2EE电子商务系统开发从入门到精通---基于Struts和Hibernate技术实现
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %>
<%@page import = "java.util.*"%>
<%@page import = "model.store.hibernate.*"%>
<%
    request.setCharacterEncoding("gb2312");
    List clientList = (List)session.getAttribute("clientlist");
    List productList = (List)session.getAttribute("productlist");
    List storeroomList = (List)session.getAttribute("storeroomlist");
    Storeout storeout = (Storeout)session.getAttribute("storeout");
%>
<%@ include file="..\taglibs.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>STORE SYSTEM</title>
</head>

<body>
<form name="form1" method="post" action="/EMIS/storeoutmodify.do?id=<%=storeout.getId()%>">
  <html:errors/>
  <table width="503" height="224" border="0" align="center">
    <tr bgcolor="#DFDFFF">
      <td height="26" colspan="2"><div align="center">出库单信息管理--修改</div></td>
    </tr>
    <tr bgcolor="#FFFFCA">
      <td height="23"><div align="right">出库单名称</div></td>
      <td><span class="TitleColor">
        <input name="name" type="text" id="password" value="<%=storeout.getName()%>">
      </span></td>
    </tr>
    <tr bgcolor="#FFFFCA">
      <td height="23"><div align="right">库房名称</div></td>
      <td><span class="TitleColor">
        <select name="roomId" id="roomId">
          <%
                                for (int i=0; i<storeroomList.size(); i++) {
                                    Storeroom storeroom = (Storeroom)storeroomList.get(i);
                                    String index = String.valueOf(storeroom.getId());
                                    String name = String.valueOf(storeroom.getName());
                                    if (name.equals(storeout.getStoreroom().getName())) {
                            %>
                        <option value=<%=index%> selected><%=name%></option>
                        <%
                                 }
                                    else {
                            %>
                            <option value=<%=index%>><%=name%></option>
                            <%
                                    }
                                }
%>
        </select>
      </span></td>
    </tr>
    <tr bgcolor="#FFFFCA">
      <td height="23"><div align="right">货物名称</div></td>
      <td><span class="TitleColor">
        <select name="productId" id="productId">
                            <%
                                for (int i=0; i<productList.size(); i++) {
                                    Product product = (Product)productList.get(i);
                                    String index = String.valueOf(product.getId());
                                    String name = String.valueOf(product.getName());
                                    if (name.equals(storeout.getProduct().getName())) {
                            %>
                                    <option value=<%=index%> selected><%=name%></option>
                            <%
                                }
                                    else {
                            %>
                            <option value=<%=index%>><%=name%></option>
                            <%
                                    }
                                }
                            %>
                        </select>
      </span></td>
    </tr>
    <tr bgcolor="#FFFFCA">
      <td height="23"><div align="right">客户名称</div></td>
      <td><span class="TitleColor">
        <select name="clientId" id="clientId">
                            <%
                                for (int i=0; i<clientList.size(); i++) {
                                    Client client = (Client)clientList.get(i);
                                    String index = String.valueOf(client.getId());
                                    String name = String.valueOf(client.getName());
                                    if (name.equals(storeout.getClient().getName())) {
                            %>
                                    <option value=<%=index%> selected><%=name%></option>
                            <%
                                }
                                    else {
                            %>
                            <option value=<%=index%>><%=name%></option>
                            <%
                                    }
                                }
                            %>
                        </select>
      </span></td>
    </tr>
    <tr bgcolor="#FFFFCA">
      <td width="179" height="23"><div align="right">出库时间</div></td>
      <td width="314"><span class="TitleColor">
        <select name="outYear" id="outYear">
          <%
                            String[] year = {
							"2011", "2010", "2009",
							"2008", "2007", "2006",
							"2005", "2004", "2003",
                                        "2002", "2001", "2000",
                                        "1999", "1998", "1997",
                                        "1996", "1995", "1994",
                                        "1993", "1992", "1991",
                            };
                            String y = storeout.getOuttime().substring(0, 4);
                            for (int i=0; i<year.length; i++) {
                                if (year[i].equals(y)) {
                        %>
            <option value=<%=year[i]%> selected><%=year[i]%></option>
            <%
                                }
                                else {
                        %>
            <option value=<%=year[i]%>><%=year[i]%></option>
            <%
                                }
                            }
                         %>
        </select>
        <select name="outMonth" id="outMonth">
          <%
                            String[] month = {
                                        "01", "02", "03",
                                        "04", "05", "06",
                                        "07", "08", "09",
                                        "10", "11", "12"
                            };
                            String m = storeout.getOuttime().substring(4, 6);
                            for (int i=0; i<month.length; i++) {
                                if (month[i].equals(m)) {
                        %>
      <option value=<%=month[i]%> selected><%=month[i]%></option>
      <%
                                } 
                                else {
                        %>
      <option value=<%=month[i]%>><%=month[i]%></option>
      <%
                                }
                            }
                        %>
        </select>
        <select name="outDay" id="outDay">
          <%
                            String[] day = {
                                        "01", "02", "03",
                                        "04", "05", "06",
                                        "07", "08", "09",
                                        "10", "11", "12",
                                        "13", "14", "15",
                                        "16", "17", "18",
                                        "19", "20", "21",
                                        "22", "23", "24",
                                        "25", "26", "27",
                                        "28", "29", "30",
                                        "31"
                            };
                            String d = storeout.getOuttime().substring(6, 8);
                            for (int i=0; i<day.length; i++) {
                                if (day[i].equals(d)) {
                        %>
      <option value=<%=day[i]%> selected><%=day[i]%></option>
      <%
                                }
                                else {
                        %>
      <option value=<%=day[i]%>><%=day[i]%></option>
      <%
                                }
                            }
                         %>
        </select>
        日 </span></td>
    </tr>
    <tr bgcolor="#FFFFCA">
      <td height="23"><div align="right">备注</div></td>
      <td><textarea name="remarks" cols="50" rows="5" id="remarks"><%=storeout.getRemarks()%></textarea></td>
    </tr>
    <tr bgcolor="#DFDFFF">
      <td height="21" colspan="2"><div align="left">
          <div align="center">
            <input type="submit" name="Submit" value="修改">
          </div>
      </div></td>
    </tr>
  </table>
</form>
</body>
</html>

⌨️ 快捷键说明

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