在很多人眼里,北京是一个物欲横流的社会,生活节奏之快,让你一丝都不能停下来,走在路上伴随着人群急速往前涌,或许有些人都不知道要去哪、也不知道自己想要的是什么?在一个浮躁的社会里,多了一些浮躁的人,到处的寻找捷径,脚踏实地已经跑得无影无踪。
公司里项目一个接一个的上线,上线后一个接一个的出现问题,或许是我们该反思的时候了,在时间、质量、成本三者需要平衡的时候,我们总是会在时间和成本上做考虑,上线之前的演示只是一个纸老虎,其实离使用的程度差的很远,我们总会一开始把客户的欲望调得很高,但是种种的问题终究会在上线之后暴露出来,让客户产生一种落差,要想再逆转这种结局需要付出百倍的努力,每个人都是消防队员,哪里需要救火就到哪里去,远看形势一片美好,近看火海一拨比一拨高。
最近又调回公司做一个救火的项目,我主要负责在线报名部分,包括以下几个内容:
1、专业人士门票的索取
2、企业展会的报名
3、后台包括专业人士和企业展会的查询、搜索和导出。
功能上没有什么技术难点,但是必须在3天内上线,回来之后就开始了苦逼的生活,建表、建实体、写接口、数据库操作类、业务操作类,一切在掌控中进行。其中的企业展会包括参会企业信息和参会人员两部分,一个企业可能对应多个参会人员,经过考虑采用了以下布局模式:
后台代码:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
GCMS.Model.EntAttendPerson entAttendPerModel =
new
Model.EntAttendPerson();
GCMS.CMS.EntAttendInfo entAttend =
new
CMS.EntAttendInfo();
entAttendPerModel.Name =
this
.txtName.Value;
if
(!
string
.IsNullOrEmpty(Request.Form[
"Sex"
]))
entAttendPerModel.Sex =
int
.Parse(Request.Form[
"Sex"
]);
entAttendPerModel.Job =
this
.txtJob.Value;
entAttendPerModel.Telphone =
this
.txtTelphone.Value;
entAttendPerModel.Mobile =
this
.txtMobile.Value;
entAttendPerModel.Email =
this
.txtEmail.Value;
if
(!
string
.IsNullOrEmpty(Request.Form[
"radAccomRequire"
]))
entAttendPerModel.AccomRequire =
int
.Parse(Request.Form[
"radAccomRequire"
]);
if
(!
string
.IsNullOrEmpty(Request.Form[
"txtAccomDateStart"
]))
entAttendPerModel.AccomDateStart = DateTime.Parse(
this
.txtAccomDateStart.Value);
if
(!
string
.IsNullOrEmpty(Request.Form[
"txtAccomDateEnd"
]))
entAttendPerModel.AccomDateEnd = DateTime.Parse(
this
.txtAccomDateEnd.Value);
entAttendPerModel.EntAttendNum =
this
.hidGuid.Value;
int
count = 0;
if
(
string
.IsNullOrEmpty(Request.QueryString[
"id"
]))
count = entAttend.AddEntAttendPer(entAttendPerModel);
else
{
entAttendPerModel.Id =
int
.Parse(Request.QueryString[
"id"
]);
count = entAttend.UpdateEntAttendPer(entAttendPerModel);
}
this
.Page.ClientScript.RegisterStartupScript(
this
.GetType(), String.Empty,
"addEntAttendPerTip("
+ count +
");"
,
true
);
|
前台js:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<head runat=
"server"
>
<title>中国智慧城市大会_在线报名</title>
<base target=
"_self"
/>
<script type=
"text/javascript"
>
window.onload =
function
a() {
//取得传入参数
var
argu = window.dialogArguments;
if
(argu) {
if
(argu.guid !=
""
) {
document.getElementById(
"hidGuid"
).value = argu.guid;
}
}
}
function
addEntAttendPerTip(addCount) {
if
(addCount > 0) {
alert(
"操作成功!"
);
var
result =
new
Object();
result.IsAdd = addCount;
window.returnValue = result;
window.close();
}
else
{
alert(
"操作失败!"
);
}
}
<script>
|
添加完成以后,刷新下面的列表。并可对列表中的参会人员进行编辑和删除。
在临近上线的时候,突然出现了一个问题,当在添加完参会人员关闭模式窗口的时候,”奇迹“出现了,在关闭的时候弹出了一个新的页面提示操作成功,并伴有是否关闭窗口的提示框,火狐中并不会出现问题,IE中会出现此问题,在胜利到来的时候,老天总会和你开一些玩笑,兵来将挡水来土掩,查找资料,原因就在于点击添加的时候,出现了一个新窗口而不是在原有的窗口上面完成添加操作,最后在在添加参会人员的模式窗体 head 中添加 <base target="_self" />,让页面自己去处理请求,问题迎刃而解。