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

📄 order_10_1.jsp

📁 该系统是一个B/S结构的公司定饭系统,整套软件由JSP编制,希望大家能够多提宝贵意见,但请不要将它应用于商业环境,如实在要使用的话,请与作者联系!(使用此系统无比要有ORACLE8i以上版本数据库!)
💻 JSP
字号:
<%@ page contentType="text/html; charset=GB2312" %>
<%@ page import="com.hzs.order.*" %>
<jsp:useBean id="DB" scope="page" class="com.hzs.order.DBHandle" />
<%
if (session.getAttribute("grade")==null || !(session.getAttribute("grade").toString().equals("6")))
{
%>
      <jsp:forward page="con_error.jsp">
      <jsp:param name="error_nm" value="非 法 操 作" />
      <jsp:param name="error_all" value="非法操作,您并不是超级管理员!" />
     </jsp:forward>
<%
}
%>
<html>
<head>
<title>添加,修改定饭公司</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/global.css" type="text/css">
<style type="text/css">
<!--
td {  text-align: center}
-->
</style>
<script language="javascript" src="js/global.js"></script>
<script language="JavaScript">
<!--
function do_del()
{
  return confirm("当前数据库中此公司的信息都将删除,确定吗?!");
}
function go_page()
{
  window.location.replace('order_supad.jsp');
}
function confirm_all()
{
  GxTrimStr(document.fo_main.tx_cpnm);
   if (GxIsEmpty(document.fo_main.tx_cpnm))
 {
   document.fo_main.tx_cpnm.select();
   alert("请输入公司名!");
   return false;
  }
GxTrimStr(document.fo_main.tx_tel);
if (GxIsEmpty(document.fo_main.tx_tel))
  {
   document.fo_main.tx_tel.select();
    alert("请输入定饭电话!");
    return false;
  }
 GxTrimStr(document.fo_main.tx_add);
return true;
}
-->
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000" background="images/menu.gif">
<h2>---添 加 定 饭 公 司--- </h2>
<center>
  <form name="fo_main" method="post" action="order_10_2.jsp" onsubmit="return confirm_all();">
    <table width="338">
      <tr>
        <th>公 司 名:</th>
        <td>
          <div align="left">
            <input type="text" name="tx_cpnm" size="20" maxlength="20">
          </div>
        </td>
      </tr>
      <tr>
        <th>定饭电话:</th>
        <td>
          <div align="left">
            <input type="text" name="tx_tel" size="15" maxlength="15">
          </div>
        </td>
      </tr>
      <tr>
        <th>公司地址:</th>
        <td>
          <div align="left">
            <input type="text" name="tx_add" size="20" maxlength="40">
          </div>
        </td>
      </tr>
      <tr>
        <td colspan="2">
          <div align="center">
            <input type="submit" name="sb_1" value="添 加">
                  
            <input type="button" name="bt_1" value="返 回" onclick="go_page();">
          </div>
        </td>
      </tr>
    </table>
  </form>
  <br>
  <span class="tishi">注意:</span><span class="help">下面已经存在的公司,不可以再次添加! </span>
  <br><br>
<%
  Vector Result=new Vector();
  try{
  DB.connect();
  Result=DB.select("SELECT * FROM all_cp order by cp_id");
  DB.close();
  }
  catch(DBException  e)
{
%>
      <jsp:forward page="con_error.jsp">
      <jsp:param name="error_nm" value="数 据 库 错 误" />
      <jsp:param name="error_all" value="<%=e.getMessage()%>"/>
      </jsp:forward>
<%
}
finally{
        DB.close();
          }

  out.print("<h2>---定 饭 公 司 一 览---<br></h2>");
  if (Result.size()==0)
  {
    out.print("<span class=\"help\">当前数据库中尚没有定饭公司记录,您可以在上面添加!</span>");
  }
  else
  {
    out.print("<table><tr><th>联系电话:</th><th>公司名:</th><th>地址:</th><th>&nbsp;</th><th>&nbsp;</th></tr>");
    int i;
    for (i=0;i<Result.size();i++)
    {
     if (Result.elementAt(i+2)==null)
     {
        Result.setElementAt("",i+2);
      }
      String tempstr=Result.elementAt(i).toString();
      out.print("<tr><td>"+Result.elementAt(i++).toString()+"</td><td>"+Result.elementAt(i++).toString()+"</td><td>"+Result.elementAt(i).toString()+"</td><td width=\"50\"><a href=\"order_10_3.jsp?id="+tempstr+"\">编 辑</a></td><td width=\"50\"><a href=\"order_10_5.jsp?id="+tempstr+"\" onclick=\"return do_del();\">删 除</a></td></tr>");
    }
  }
%>

</center>
</body>
</html>

⌨️ 快捷键说明

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