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

📄 stockupdate.jsp

📁 精美的画面。完善的功能
💻 JSP
字号:
<%@ page contentType="text/html;charset=GBK"%>
<%
 if(session.getAttribute("midentity")==null)
    {
      //  request.setAttribute("result","您没有权力进入此页");
       // getServletContext().getRequestDispatcher("display.jsp").forward(request,response);
        response.sendRedirect("FlowerIndex.jsp");
    }
%>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=GBK">
    <title>untitled</title>
    <link href="css/jdeveloper.css" rel="stylesheet" media="screen"/>
  </head>
  <body>
    <table cellspacing="0" cellpadding="0" border="0" width="578" align="left">
      <tr>
        <td>
          <H1 align="center">库存信息更新</H1>
          <form action="stockservlet" method="post">
            <DIV align="center">
              <table cellspacing="0" cellpadding="0" border="1" width="60%" align="center">
                <%
                    Connection con1=null;
                    PreparedStatement pstmt1=null;
                    ResultSet rs1=null;
                    con1=DBConnect.getConnection();
                    String stockid11=request.getParameter("stockid12");
                    if(stockid11==null)
                    {
                      stockid11="";
                    }
                    pstmt1=con1.prepareStatement("select * from Stock where Stockid=?");
                    pstmt1.setString(1,stockid11);
                    rs1=pstmt1.executeQuery();
                    while(rs1.next())
                    {
                %>
                <tr>
                  <td>
                    <FONT color="#ff9966">库存编号:</FONT>
                  </td>
                  <td>
                    <input type="text" name="stockid" value="<%=rs1.getString(1)%>" readonly/>
                  </td>
                </tr>
                <tr>
                
                  <td>
                    <FONT color="#ff9966">商品编号:</FONT>
                  </td>
                  <td>
                    <select name="goodsid">
                    <%
                      Connection con=null;
                      PreparedStatement pstmt=null;
                      ResultSet rs=null;
                      String stockid=request.getParameter("goodsid");
                      if(stockid==null)
                      {
                        stockid="";
                      }
                      con=DBConnect.getConnection();
                      pstmt=con.prepareStatement("select GoodsID from Goodsinfo");
                      rs=pstmt.executeQuery();
                      while(rs.next())
                      {
                          String stockid1=rs.getString(1);
                  %>
                      <option value="<%=stockid1%>" selected="selected"><%=stockid1%></option>
                  <%    
                      }
                      rs.close();
                      pstmt.close();
                      con.close();
                  %> 
                  </select>
                  </td>
                </tr>
                <tr>
                  <td>
                    <FONT color="#ff9966">库存数量:</FONT>
                  </td>
                  <td>
                    <input type="text" name="stocknum" value="<%=rs1.getLong(3)%>"/>
                  </td>
                </tr>
                <%
                    }
                    rs1.close();
                    pstmt1.close();
                    con1.close();
                %>
                
                
                
                
                
                
                <tr>
                  <td>
                    <FONT color="#0033cc">系统提示:</FONT>
                  </td>
                  <td>
                  <%
                    
                  String result="请注意系统提示";
                  if(request.getAttribute("result")!=null)
                  {
                    result=request.getAttribute("result").toString();
                      
                  }
                %>
                <font color="red"><%=result%></font>
                  </td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>
                    <input type="submit" value="提交"/>
                    <input type="reset" value="重置"/>
                    <input type="hidden" name="action" value="update"/>
                  </td>
                </tr>
              </table>
              <P align="left">
                <%@ page import="java.sql.*"%>
                <%@ page import="Flower.model.DBConnect"%>
              </P>
            </DIV>
          </form>
          <P>&nbsp;</P>
          <P>&nbsp;</P>
        </td>
      </tr>
    </table>
  </body>
</html>

⌨️ 快捷键说明

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