最近要做一个GridView显示Oracle的查询结果,包括:日期、城市、基站名称、退服时长。需要有根据日期和城市来查询的功能。还有,能进行单行从数据库提醒并删除的功能。现在程序已经写得差不多了。只是有以下几个地方有问题:
1)根据城市查询还没做好。因为要在后台的selectcommand里加城市转换函数效率比较低,数据库中的城市都是用一串数字来表示,要转换成文字“南京市”,要通过一个函数转换;
2)点击“删除”后,页面会跳到原始页面,不能回到刚刚选择的日期的查询结果,这个不太人性化;
网友有更好的方法希望能给我留言或者晾一下代码。
前台页面代码,数据源控件配出来的。
<%
@ Page Language
=
"
C#
"
AutoEventWireup
=
"
true
"
CodeFile
=
"
Default.aspx.cs
"
Inherits
=
"
_Default
"
Debug
=
"
true
"
%>
<% @ Register Assembly = " System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 "
Namespace = " System.Web.UI " TagPrefix = " asp " %>
<% @ Register Assembly = " RJS.Web.WebControl.PopCalendar " Namespace = " RJS.Web.WebControl "
TagPrefix = " rjs " %>
<! DOCTYPE html PUBLIC " -//W3C//DTD XHTML 1.0 Transitional//EN " " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd " >
< html id = " Html1 " xmlns:v = " urn:schemas-microsoft-com:vml "
xmlns:o = " urn:schemas-microsoft-com:office:office "
xmlns:w = " urn:schemas-microsoft-com:office:word "
xmlns:m = " http://schemas.microsoft.com/office/2004/12/omml "
xmlns:st1 = " urn:schemas-microsoft-com:office:smarttags "
xmlns = " http://www.w3.org/TR/REC-html40 " runat = " server " >
< head runat = " server " >
< title > 基站退服核减 </ title >
</ head >
< body lang = ZH - CN link = " #003399 " vlink = purple style = ' tab-interval:21.0pt; text-justify-trim:punctuation ' >
< form id = " formMain " runat = " server " >
< asp:ScriptManager ID = " ScriptManager1 " runat = " server " >
< Scripts >
</ Scripts >
</ asp:ScriptManager >
< asp:HiddenField ID = " QueryDate " runat = " server " />
<% @ Register Assembly = " System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 "
Namespace = " System.Web.UI " TagPrefix = " asp " %>
<% @ Register Assembly = " RJS.Web.WebControl.PopCalendar " Namespace = " RJS.Web.WebControl "
TagPrefix = " rjs " %>
<! DOCTYPE html PUBLIC " -//W3C//DTD XHTML 1.0 Transitional//EN " " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd " >
< html id = " Html1 " xmlns:v = " urn:schemas-microsoft-com:vml "
xmlns:o = " urn:schemas-microsoft-com:office:office "
xmlns:w = " urn:schemas-microsoft-com:office:word "
xmlns:m = " http://schemas.microsoft.com/office/2004/12/omml "
xmlns:st1 = " urn:schemas-microsoft-com:office:smarttags "
xmlns = " http://www.w3.org/TR/REC-html40 " runat = " server " >
< head runat = " server " >
< title > 基站退服核减 </ title >
</ head >
< body lang = ZH - CN link = " #003399 " vlink = purple style = ' tab-interval:21.0pt; text-justify-trim:punctuation ' >
< form id = " formMain " runat = " server " >
< asp:ScriptManager ID = " ScriptManager1 " runat = " server " >
< Scripts >
</ Scripts >
</ asp:ScriptManager >
< asp:HiddenField ID = " QueryDate " runat = " server " />