《软件工程综合实践》第二次小结

第一周第三、四、五天老师主要带领我们完成了网页前端样式的编写和网页前端与数据库后台的连接,前端一共做了三个jsp格式的网页

进入web工程的第一个网页界面是:

该页面代码如下:

index.jsp

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
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 'index.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>
<center>
<div class="divcss5">
<center><h1><font color="red">操作列表</font></h1>
<s:a href="jsp/custInfo.jsp">客户信息管理</s:a><br><br><br>
<s:a href="listComany.action">查询公司信息</s:a></center>
</div>
<center>
</body>
</html>

查询公司信息功能暂时没有完成,点击客户信息管理就会进入第二个网页:

页面编写代码:

<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!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=ISO-8859-1">
<title>客户信息维护</title>
<style>
.divcss5{width:600px;height:120px;border:1px solid #000}
body,table{
font-size:12px;
}
table{
table-layout:fixed;
empty-cells:show;
border-collapse: collapse;
margin:0 auto;
}
td{
height:30px;
}
h1,h2,h3{
font-size:12px;
margin:0;
padding:0;
}
.table{
border:1px solid #000;
color:#000;
}
.table th {
background-repeat:repeat-x;
height:30px;
}
.table td,.table th{
border:1px solid #000;
padding:0 1em 0;
}
.table tr.alter{
background-color:#000;
}
</style>
</head>
<script language="JavaScript" type="text/javascript">
function openwind(){
feature="dialogWidth:650px;dialogHeight:200px;status:no;help:no;scrollbars:no;dialogTop:150;";
window.showModalDialog("custAdd.jsp",null,feature);
};
function funDelete(){
//window.onload = alert(111);
if(confirm('确定要执行此操作吗?')){
return true;
}else{
return false;
}
}
</script>
<body>
<s:action name="listCust"></s:action>
<CENTER>
<center><div><font color="red" size="6">客户信息维护</font></div></center>
<div style="width:20px"></div>
<div class="divcss5">
<s:form action="findCdtCustList" theme="simple">
<div style="width:10px"></div>
客户编号:<s:textfield name="cust.custno" label="custno"></s:textfield>
客户名称:<s:textfield name="cust.custname" label="custname"></s:textfield>
公司地址:<s:textfield name="cust.address" label="address"></s:textfield>
电话号码:<s:textfield name="cust.telephone" label="telephone"></s:textfield>
<div style="width:20px:"></div>
<input width="100" type="button" id="add" name="btn" value="新增" onClick="openwind();"/>
<s:submit value="查询"></s:submit>
<input width="100" type="button" id="smt" name="btn" value="返回" onClick="history.go(-1)"/>
</s:form>
</div>
<div style="width:20px"></div>
<table border="1" width="47%" class="table">
<tr>
<td>客户编号</td>
<td>姓名</td>
<td>性别</td>
<td>年龄</td>
<td>联系方式</td>
<td>公司职务</td>
<td>录入时间</td>
<td width="80">操作</td>
</tr>
<s:iterator value="#request.list" id="cust">
<tr>
<td><s:property value="#cust.custno"/></td>
<td><s:property value="#cust.custname"/></td>
<td>
<s:if test="#cust.sex==1">
<s:property value="'男'"/>
</s:if>
<s:elseif test="#cust.sex==2">
<s:property value="'女'"/>
</s:elseif>
<s:elseif test="#cust.sex==3">
<s:property value="'其它'"/>
</s:elseif>
</td>
<td><s:property value="#cust.age"/></td>
<td><s:property value="#cust.telephone"/></td>
<td><s:property value="#cust.position"/></td>
<td><s:property value="#cust.logindate"/></td>
<td>
<s:a href="updateCust.action?cust.id=%{#cust.id}">修改</s:a>
<s:a href="delectCust.action?cust.id=%{#cust.id}" onClick="return funDelete();">删除</s:a>
</td>
</tr>
</s:iterator>
</table>
</CENTER>

</body>
</html>

最上面的表格是用于查询功能,下面的表格是进入该页面时刻数据库中的数据,每次进入该页面都会自己读取并显示,列出表格的右端有两个按钮,其中删除按钮已经实现其功能,修改功能尚未完成,点击新增进入第三个网页:

新增客户信息页面代码如下:

<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!-- 下拉菜单 -->
<s:action name="typeAction" id="list"></s:action>
<!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=ISO-8859-1">
<title>新增客户信息</title>
</head>
<body>
<CENTER>
<div><font size="5" color="red">新增客户信息</font></div>
<center></center>
<div style="width:20px"></div>
<div class="divcss5">
<s:form action="saveCust" theme="simple">
<div style="width:10px"></div>
客户编号:<s:textfield name="cust.custno" label="custno"></s:textfield><br>
客户名称:<s:textfield name="cust.custname" label="custname"></s:textfield><br>
性别:<s:select name="strList" headerKey="0" headerValue="-----------请选择-----------" list="#list.strList" listKey="id" listValue="name"/><br>
电话号码:<s:textfield name="cust.telephone" label="telephone"></s:textfield><br>
客户年龄:<s:textfield name="cust.age" label="age"></s:textfield><br>
<tr><td>&nbsp;</td></tr>
<s:submit value="保存"></s:submit>
<input width="100" type = "button" id = "smt" name = "btn" value="关闭" onClick="window.close();"/>
</s:form>
</div>
<div style="width:20px"></div>
</CENTER>
</body>
</html>

在这个页面下可以填入客户信息,点击保存后会将数据存入数据库中

在第一周的实现过程中,遇到最多的问题是各种别名的对应,一个别名对应用在多个不同的地方,有一个地方打错一个字母就无法完整实现功能。

 

转载于:https://www.cnblogs.com/gaho213/p/7103682.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
根据提供的引用内容,第二章主要介绍了软件项目经济分析和评价的相关内容,包括软件项目可行性的目的、内容和作用,软件工程经济分析的基本要素,基于资金时间价值的现金流的贴现和预计,招投标的特征、程序和标书的内容,投标的三个阶段和各阶段的策略,以及项目评价与决策方法等方面。 具体来说,第二章的内容包括以下几个方面: 1.软件项目可行性的目的、内容和作用 - 目的:评估软件项目的可行性,确定是否值得投资。 - 内容:市场分析、技术可行性分析、经济可行性分析、风险分析等。 - 作用:为软件项目的决策提供依据。 2.软件工程经济分析的基本要素 成本:软件项目的开发成本、运行成本、维护成本等。 - 效益:软件项目的经济效益、社会效益等。 - 时间:软件项目的开发周期、运行周期等。 3.基于资金时间价值的现金流的贴现和预计 - 贴现:将未来的现金流折算为当前的价值。 - 预计:根据历史数据和市场趋势等因素,预测未来的现金流。 4.招投标的特征、程序和标书的内容 - 特征:公开、公正、公平、竞争。 - 程序:招标公告、投标文件、评标、中标公示等。 - 标书内容:投标人的基本情况、技术方案、商务方案、投标报价等。 5.投标的三个阶段和各阶段的策略 - 前期准备阶段:了解招标信息、确定投标策略、组织投标团队等。 - 投标准备阶段:编制投标文件、准备投标保证金等。 - 投标提交阶段:提交投标文件、参加开标会议等。 6.项目评价与决策方法 - 评价方法:财务评价、风险评价、技术评价、管理评价等。 - 决策方法:投资决策、合同决策、实施决策等。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值