zoukankan      html  css  js  c++  java
  • MySQL之建设工程监管信息系统

    --创建SelfStudy数据库
    CREATE DATABASE  ConstructionDB
    ON
    PRIMARY --创建主数据库文件
    (
    NAME=' ConstructionDB', --数据文件的物理名称
    FILENAME='D:Project ConstructionDB.dbf', --数据文件的名称和路径
    SIZE=5MB,   --数据文件的初始容量
    MaxSize=20MB,   --数据文件的最大容量
    FileGrowth=1MB  --数据文件的增长量
    )
    LOG ON --创建日志文件
    (
    NAME='ConstructionDB', --数据文件的逻辑名称
    FileName='D:Project ConstructionDB.ldf', --数据文件的名称和路径
    Size=2MB,   --数据文件的初始容量
    MaxSize=20MB,   --数据文件的最大容量
    FileGrowth=1MB  --数据文件的增长量
    )
    GO
    
    use ConstructionDB
    go
    
    ---3.2 创建数据表
    create table T_enterprise_info(
    	Ent_id	char(32)  not null, -- 企业编号  主键
    	Ent_name	varchar(32)	not null, --企业名称	
    	Begin_date	datetime,	--建立时间	--日期型
    	Addr	varchar(64)	,--详细地址	
    	Reg_capital decimal(12,4),--注册资本 数值型,单位:万元
    
    )
    --插入数据
    insert into T_enterprise_info
    select '200200078','长沙城建有限公司','2002-01-01','长沙市天心区',1000 union all
    select '200400005','天信建筑企业有限公司','2004-01-01','长沙市芙蓉区',1500
    
    --设置主键
    alter table T_enterprise_info
    add constraint pk_T_enterprise_info_Ent_id primary key(Ent_id)
    
    select * from T_enterprise_info
    

     表格:

    project_add:

    <%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        <base href="<%=basePath%>">
        
        <title>My JSP 'project_add.jsp' starting page</title>
        
    	<meta http-equiv="pragma" content="no-cache">
    	<meta http-equiv="cache-control" content="no-cache">
    	<meta http-equiv="expires" content="0">    
    	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    	<meta http-equiv="description" content="This is my page">
    	<!--
    	<link rel="stylesheet" type="text/css" href="styles.css">
    	-->
    
      </head>
      <script language="javascript">
    function check(){
           var inputs = document.getElementsByTagName('input');
      for(var i=0,len=2;i<len;i++){
        if(inputs[i].value == ''){
         alert('必填项不能为空!');
         inputs[i].focus();
         return false;
        }
      }
      return true;
    }
    </script>
      
      <body>
       <table width="834" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="30" background="images/title01.jpg" class="title">>>项目信息录入</td>
        <td width="27" height="30"><img src="images/title02.jpg" width="27" height="30" /></td>
        <td height="30" bgcolor="#029AC5" class="txt">您的位置:招投标流程 > 建设工程报建 > 项目信息录入</td>
      </tr>
    </table>
    <br />
    <table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="100%" height="30" bgcolor="#80C6FF" class="titletxt">•建设工程报建—项目信息录入(以下带<span class="txtred">*</span>为必填项)</td>
      </tr>
      <tr>
        <td height="30" align="center"><form id="form1" name="form1" method="post" action="AddProjectServlet"  onsubmit="return check()"  >
          <table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bgcolor="#E7E7E7">
            <tr>
              <td width="24%" height="30" align="right" class="txt"><span class="txt">工程编号:</span></td>
              <td height="30" align="left"><label for="textfield"></label>
                <input  height="20" width="400" type="text" name="textfield1" id="textfield" />
                <span class="txtred">*</span></td>
            </tr>
            <tr>
              <td width="24%" height="30" align="right" class="txt"><span class="txt">工程名称:</span></td>
              <td height="30" align="left"><input  height="20" width="400" type="text" name="textfield2" id="textfield2" />
                <span class="txtred">*</span></td>
            </tr>
            
           
            <tr>
              <td height="30" align="right" class="txt">法人代表:</td>
              <td height="30" align="left"><input  height="20" width="150" type="text" name="textfield3" id="textfield3" /></td>
            </tr>
            <tr>
              <td height="30" align="right" class="txt">建设单位电话:</td>
              <td height="30" align="left"><input  height="20" width="200" type="text" name="textfield4" id="textfield4" /></td>
            </tr>
            <tr>
              <td height="30" align="right" class="txt">建设单位地址:</td>
              <td height="30" align="left"><span class="txtred">
                <input  height="20" width="400" type="text" name="textfield5" id="textfield5" />
              </span></td>
            </tr>
           
          </table>
            <p><input type="submit" name="button" id="button" value="  确  定  " /></p>
          </form>
        <p> </p></td>
      </tr>
    </table>
    <p> </p>
      </body>
    </html>
    

    project_list

    <%@ page language="java" import="java.util.*,biz.*,entity.*" pageEncoding="gbk"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        <base href="<%=basePath%>">
        
        <title>My JSP 'project_list.jsp' starting page</title>
        
    	<meta http-equiv="pragma" content="no-cache">
    	<meta http-equiv="cache-control" content="no-cache">
    	<meta http-equiv="expires" content="0">    
    	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    	<meta http-equiv="description" content="This is my page">
    	<!--
    	<link rel="stylesheet" type="text/css" href="styles.css">
    	-->
    
      </head>
      
      <body>
        <table width="834" border="0" cellpadding="0" cellspacing="0">
        <%
        ProjectBiz pb=new ProjectBizImpl();
        ArrayList<Project> list=pb.getProjects();
        Project p=null;		
        	
         %>
      <tr>
        <td height="30" background="images/title01.jpg" class="title">>>项目信息录入</td>
        <td width="27" height="30"><img src="images/title02.jpg" width="27" height="30" /></td>
        <td height="30" bgcolor="#029AC5" class="txt">您的位置:招投标流程 > 建设工程报建 > 项目信息录入</td>
      </tr>
    </table>
    <br />
    <table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="33%" height="37"> </td>
        <td width="34%" height="37"> </td>
        <td width="33%" height="37" align="right" valign="top"><a href="project_add.jsp" target="_self"><img src="images/addpro.JPG" border="0" /></a> </td>
      </tr>
      <tr>
        <td height="30" colspan="3" bgcolor="#029AC5" class="titletxt">•项目信息</td>
      </tr>
      <tr>
        <td height="30" colspan="3"><table width="100%" border="1" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="33%" height="30" align="center" bgcolor="#80C6FF"><span class="txt"><span class="titletxt">工程编号</span></span></td>
            <td width="34%" height="30" align="center" bgcolor="#80C6FF" class="titletxt">工程名称</td>
            <td width="33%" height="30" align="center" bgcolor="#80C6FF" class="titletxt">相关操作</td>
          </tr>
          <% for(int i=0;i<list.size();i++){
        		p=list.get(i); %>
          <tr>
            <td width="33%" height="30" align="center" bgcolor="#FFF5D7"><span class="txt"><%=p.getProject_id() %></span></td>
            <td width="34%" height="30" align="center" bgcolor="#FFF5D7"><span class="txt"><%=p.getProject_name() %></span></td>
            <td width="33%" height="30" align="center" bgcolor="#FFF5D7"><span class="txt">【修改】【删除】</span></td>
          </tr>
         <% } %>
        </table></td>
      </tr>
    </table>
    <p> </p>
    
      </body>
    </html>
    
  • 相关阅读:
    桥接模式(Bridge)
    Python中文件操作
    Python中字符的编码与解码
    反转部分单向链表
    删除链表的中间节点和a/b处的节点
    链表中删除倒数第K个节点
    如何实现链表的逆序
    Python高阶函数及函数柯里化
    Python函数作用域
    Python函数参数与参数解构
  • 原文地址:https://www.cnblogs.com/caidupingblogs/p/5950169.html
Copyright © 2011-2022 走看看