代码语言
.
CSharp
.
JS
Java
Asp.Net
C
MSSQL
PHP
Css
PLSQL
Python
Shell
EBS
ASP
Perl
ObjC
VB.Net
VBS
MYSQL
GO
Delphi
AS
DB2
Domino
Rails
ActionScript
Scala
代码分类
文件
系统
字符串
数据库
网络相关
图形/GUI
多媒体
算法
游戏
Jquery
Extjs
Android
HTML5
菜单
网页交互
WinForm
控件
企业应用
安全与加密
脚本/批处理
开放平台
其它
【
Asp.Net
】
模拟模态窗口 实现父子页面信息交换
作者:
Dezai.CN
/ 发布于
2011/5/11
/
625
<div> <div><span style="color: #000000">父页面: </span><span style="color: #000000"><</span><span style="color: #000000">head runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">title</span><span style="color: #000000">></span><span style="color: #000000">无标题页</span><span style="color: #000000"></</span><span style="color: #000000">title</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #0000ff">base</span><span style="color: #000000"> target</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">_self</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">script language</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">javascript</span><span style="color: #800000">"</span><span style="color: #000000"> type</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">text/javascript</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> function jsUpdate(a) { var a </span><span style="color: #000000">=</span><span style="color: #000000"> window.showModalDialog(</span><span style="color: #800000">"</span><span style="color: #800000">EditPage.aspx?caozuo=xiugai&id=</span><span style="color: #800000">"</span><span style="color: #000000">+</span><span style="color: #000000">a,</span><span style="color: #800000">"</span><span style="color: #800000">kjklk</span><span style="color: #800000">"</span><span style="color: #000000">,</span><span style="color: #800000">"</span><span style="color: #800000">dialogWidth=350px;dialogHeight=360px</span><span style="color: #800000">"</span><span style="color: #000000">) window.location.reload(</span><span style="color: #0000ff">true</span><span style="color: #000000">); } function jsAdd() { var a </span><span style="color: #000000">=</span><span style="color: #000000"> window.showModalDialog(</span><span style="color: #800000">"</span><span style="color: #800000">EditPage.aspx?caozuo=add</span><span style="color: #800000">"</span><span style="color: #000000">,</span><span style="color: #800000">""</span><span style="color: #000000">,</span><span style="color: #800000">"</span><span style="color: #800000">dialogWidth=350px;dialogHeight=360px</span><span style="color: #800000">"</span><span style="color: #000000">); window.location.reload(</span><span style="color: #0000ff">true</span><span style="color: #000000">); } </span><span style="color: #000000"></</span><span style="color: #000000">script</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">script language</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">javascript</span><span style="color: #800000">"</span><span style="color: #000000"> type</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">text/javascript</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> function Show(content) { document.getElementById(</span><span style="color: #800000">"</span><span style="color: #800000">td1</span><span style="color: #800000">"</span><span style="color: #000000">).innerText</span><span style="color: #000000">=</span><span style="color: #000000">content; var x </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">event</span><span style="color: #000000">.clientX</span><span style="color: #000000">+</span><span style="color: #000000">document.body.scrollLeft; var y </span><span style="color: #000000">=</span><span style="color: #0000ff">event</span><span style="color: #000000">.clientY</span><span style="color: #000000">+</span><span style="color: #000000">document.body.scrollTop</span><span style="color: #000000">+</span><span style="color: #800080">4</span><span style="color: #000000">; document.getElementById(</span><span style="color: #800000">"</span><span style="color: #800000">MyDiv</span><span style="color: #800000">"</span><span style="color: #000000">).style.display</span><span style="color: #000000">=</span><span style="color: #800000">'</span><span style="color: #800000">block</span><span style="color: #800000">'</span><span style="color: #000000">; document.getElementById(</span><span style="color: #800000">"</span><span style="color: #800000">MyDiv</span><span style="color: #800000">"</span><span style="color: #000000">).style.left</span><span style="color: #000000">=</span><span style="color: #000000">x; document.getElementById(</span><span style="color: #800000">"</span><span style="color: #800000">MyDiv</span><span style="color: #800000">"</span><span style="color: #000000">).style.top </span><span style="color: #000000">=</span><span style="color: #000000">y; } function Hide() { document.getElementById(</span><span style="color: #800000">"</span><span style="color: #800000">MyDiv</span><span style="color: #800000">"</span><span style="color: #000000">).style.display</span><span style="color: #000000">=</span><span style="color: #800000">'</span><span style="color: #800000">none</span><span style="color: #800000">'</span><span style="color: #000000">; } </span><span style="color: #000000"></</span><span style="color: #000000">script</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">head</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">body style</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">font-family: 'Courier New'</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">form id</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">form1</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">div id</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">MyDiv</span><span style="color: #800000">"</span><span style="color: #000000"> style</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">display: none; position: absolute</span><span style="color: #800000">"</span><span style="color: #000000"> width</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">300px</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">table border</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">0</span><span style="color: #800000">"</span><span style="color: #000000"> style</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">border: solid 1px blue; font-size: smaller</span><span style="color: #800000">"</span><span style="color: #000000"> cellpadding</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">0</span><span style="color: #800000">"</span><span style="color: #000000"> width</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">280px</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">tr</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">td align</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">center</span><span style="color: #800000">"</span><span style="color: #000000"> style</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">color: #004080; background: #6699ff; color: Red</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> 处罚结果 </span><span style="color: #000000"></</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">tr</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">tr</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">td id</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">td1</span><span style="color: #800000">"</span><span style="color: #000000"> style</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">color: black; background: inactivecaption</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">tr</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">table</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">div</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">div style</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">font-size: smaller; width: 835px;</span><span style="color: #800000">"</span><span style="color: #000000"> align</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">right</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">a href</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">#</span><span style="color: #800000">"</span><span style="color: #000000"> onclick</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">jsAdd()</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000">添加数据</span><span style="color: #000000"></</span><span style="color: #000000">a</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">div</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">div style</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">font-size: smaller</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:GridView ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">GridView1</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> AutoGenerateColumns</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">False</span><span style="color: #800000">"</span><span style="color: #000000"> OnRowDataBound</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">GridView1_RowDataBound</span><span style="color: #800000">"</span><span style="color: #000000"> BackColor</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">White</span><span style="color: #800000">"</span><span style="color: #000000"> BorderColor</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">#CCCCCC</span><span style="color: #800000">"</span><span style="color: #000000"> BorderStyle</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">None</span><span style="color: #800000">"</span><span style="color: #000000"> BorderWidth</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">1px</span><span style="color: #800000">"</span><span style="color: #000000"> CellPadding</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">3</span><span style="color: #800000">"</span><span style="color: #000000"> Font</span><span style="color: #000000">-</span><span style="color: #000000">Size</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Smaller</span><span style="color: #800000">"</span><span style="color: #000000"> OnRowDeleting</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">GridView1_RowDeleting</span><span style="color: #800000">"</span><span style="color: #000000"> OnRowCommand</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">GridView1_RowCommand</span><span style="color: #800000">"</span><span style="color: #000000"> Style</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">font-family: 'Courier New'</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">Columns</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:BoundField DataField</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">编号</span><span style="color: #800000">"</span><span style="color: #000000"> HeaderText</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">编号</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">ItemStyle HorizontalAlign</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Left</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">HeaderStyle HorizontalAlign</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Center</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">asp:BoundField</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:BoundField DataField</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">处罚大类</span><span style="color: #800000">"</span><span style="color: #000000"> HeaderText</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">处罚大类</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">ItemStyle HorizontalAlign</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Left</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">HeaderStyle HorizontalAlign</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Center</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">asp:BoundField</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:BoundField DataField</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">处罚小类</span><span style="color: #800000">"</span><span style="color: #000000"> HeaderText</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">处罚小类</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">ItemStyle HorizontalAlign</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Left</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">HeaderStyle HorizontalAlign</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Center</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">asp:BoundField</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:BoundField DataField</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">纳税人编码</span><span style="color: #800000">"</span><span style="color: #000000"> HeaderText</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">纳税人编码</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">ItemStyle HorizontalAlign</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Left</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">HeaderStyle HorizontalAlign</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Center</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">asp:BoundField</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:BoundField DataField</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">纳税人识别码</span><span style="color: #800000">"</span><span style="color: #000000"> HeaderText</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">纳税人识别码</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">ItemStyle HorizontalAlign</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Left</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">HeaderStyle HorizontalAlign</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Center</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">asp:BoundField</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:BoundField DataField</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">企业名称</span><span style="color: #800000">"</span><span style="color: #000000"> HeaderText</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">企业名称</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">ItemStyle HorizontalAlign</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Left</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">HeaderStyle HorizontalAlign</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Center</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">asp:BoundField</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:TemplateField HeaderText</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">处罚结果</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">ItemTemplate</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><%<span style="color: #000000">#Eval(</span><span style="color: #800000">"</span><span style="color: #800000">处罚结果</span><span style="color: #800000">"</span><span style="color: #000000">).ToString().Length</span><span style="color: #000000">></span><span style="color: #800080">15</span><span style="color: #000000">?</span><span style="color: #000000">Eval(</span><span style="color: #800000">"</span><span style="color: #800000">处罚结果</span><span style="color: #800000">"</span><span style="color: #000000">).ToString().Substring(</span><span style="color: #800080">0</span><span style="color: #000000">,</span><span style="color: #800080">15</span><span style="color: #000000">)</span><span style="color: #000000">+</span><span style="color: #800000">"</span><span style="color: #800000">....</span><span style="color: #800000">"</span><span style="color: #000000">:Eval(</span><span style="color: #800000">"</span><span style="color: #800000">处罚结果</span><span style="color: #800000">"</span><span style="color: #000000">) .ToString() </span><span style="color: #000000">%></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">ItemTemplate</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">asp:TemplateField</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:BoundField DataField</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">处罚日期</span><span style="color: #800000">"</span><span style="color: #000000"> HeaderText</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">处罚日期</span><span style="color: #800000">"</span><span style="color: #000000"> DataFormatString</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">{0:yyyy-MM-dd}</span><span style="color: #800000">"</span><span style="color: #000000"> HtmlEncode</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">False</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">ItemStyle HorizontalAlign</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Left</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">HeaderStyle HorizontalAlign</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Center</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">asp:BoundField</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:BoundField DataField</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">处罚金额</span><span style="color: #800000">"</span><span style="color: #000000"> DataFormatString</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">{0:c}</span><span style="color: #800000">"</span><span style="color: #000000"> HeaderText</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">处罚金额</span><span style="color: #800000">"</span><span style="color: #000000"> HtmlEncode</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">False</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">ItemStyle HorizontalAlign</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Left</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">HeaderStyle HorizontalAlign</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Center</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">asp:BoundField</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:TemplateField HeaderText</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">操作</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">ItemTemplate</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">a href</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">#</span><span style="color: #800000">"</span><span style="color: #000000"> onclick</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">jsUpdate('<%#Eval(</span><span style="color: #800000">"</span><span style="color: #000000">编号</span><span style="color: #800000">"</span><span style="color: #800000">) %>')</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000">修改</span><span style="color: #000000"></</span><span style="color: #000000">a</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:LinkButton ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">LinkButton7</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> CommandName</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Del</span><span style="color: #800000">"</span><span style="color: #000000"> CommandArgument</span><span style="color: #000000">=</span><span style="color: #800000">'</span><span style="color: #800000"><%#Eval("编号") %></span><span style="color: #800000">'</span><span style="color: #000000"> OnClientClick</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">return confirm('确认删除')</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000">删除</span><span style="color: #000000"></</span><span style="color: #000000">asp:LinkButton</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">ItemTemplate</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">asp:TemplateField</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">Columns</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">FooterStyle BackColor</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">White</span><span style="color: #800000">"</span><span style="color: #000000"> ForeColor</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">#000066</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">RowStyle ForeColor</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">#000066</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">SelectedRowStyle BackColor</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">#669999</span><span style="color: #800000">"</span><span style="color: #000000"> Font</span><span style="color: #000000">-</span><span style="color: #000000">Bold</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">True</span><span style="color: #800000">"</span><span style="color: #000000"> ForeColor</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">White</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">PagerStyle BackColor</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">White</span><span style="color: #800000">"</span><span style="color: #000000"> ForeColor</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">#000066</span><span style="color: #800000">"</span><span style="color: #000000"> HorizontalAlign</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Left</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">HeaderStyle BackColor</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">#006699</span><span style="color: #800000">"</span><span style="color: #000000"> Font</span><span style="color: #000000">-</span><span style="color: #000000">Bold</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">True</span><span style="color: #800000">"</span><span style="color: #000000"> ForeColor</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">White</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">asp:GridView</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:Label ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Label1</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> Text</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Label</span><span style="color: #800000">"</span><span style="color: #000000">></</span><span style="color: #000000">asp:Label</span><span style="color: #000000">>&</span><span style="color: #000000">nbsp;</span><span style="color: #000000">&</span><span style="color: #000000">nbsp; </span><span style="color: #000000"><</span><span style="color: #000000">asp:Label ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Label2</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> Text</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Label</span><span style="color: #800000">"</span><span style="color: #000000">></</span><span style="color: #000000">asp:Label</span><span style="color: #000000">>&</span><span style="color: #000000">nbsp;</span><span style="color: #000000">&</span><span style="color: #000000">nbsp; </span><span style="color: #000000"><</span><span style="color: #000000">asp:Label ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Label3</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> Text</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Label</span><span style="color: #800000">"</span><span style="color: #000000">></</span><span style="color: #000000">asp:Label</span><span style="color: #000000">>&</span><span style="color: #000000">nbsp;</span><span style="color: #000000">&</span><span style="color: #000000">nbsp; </span><span style="color: #000000"><</span><span style="color: #000000">asp:LinkButton ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">LinkButton1</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> Style</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">text-decoration: none</span><span style="color: #800000">"</span><span style="color: #000000"> OnClick</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">LinkButton1_Click</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000">首页</span><span style="color: #000000"></</span><span style="color: #000000">asp:LinkButton</span><span style="color: #000000">>&</span><span style="color: #000000">nbsp;</span><span style="color: #000000">&</span><span style="color: #000000">nbsp; </span><span style="color: #000000"><</span><span style="color: #000000">asp:LinkButton ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">LinkButton2</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> Style</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">text-decoration: none</span><span style="color: #800000">"</span><span style="color: #000000"> OnClick</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">LinkButton2_Click</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000">上一页</span><span style="color: #000000"></</span><span style="color: #000000">asp:LinkButton</span><span style="color: #000000">>&</span><span style="color: #000000">nbsp;</span><span style="color: #000000">&</span><span style="color: #000000">nbsp; </span><span style="color: #000000"><</span><span style="color: #000000">asp:LinkButton ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">LinkButton3</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> Style</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">text-decoration: none</span><span style="color: #800000">"</span><span style="color: #000000"> OnClick</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">LinkButton3_Click</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000">下一页</span><span style="color: #000000"></</span><span style="color: #000000">asp:LinkButton</span><span style="color: #000000">>&</span><span style="color: #000000">nbsp;</span><span style="color: #000000">&</span><span style="color: #000000">nbsp; </span><span style="color: #000000"><</span><span style="color: #000000">asp:LinkButton ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">LinkButton4</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> Style</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">text-decoration: none</span><span style="color: #800000">"</span><span style="color: #000000"> OnClick</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">LinkButton4_Click</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000">尾页</span><span style="color: #000000"></</span><span style="color: #000000">asp:LinkButton</span><span style="color: #000000">>&</span><span style="color: #000000">nbsp;</span><span style="color: #000000">&</span><span style="color: #000000">nbsp; </span><span style="color: #000000"><</span><span style="color: #000000">asp:TextBox ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">TextBox1</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> Width</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">24px</span><span style="color: #800000">"</span><span style="color: #000000">></</span><span style="color: #000000">asp:TextBox</span><span style="color: #000000">>&</span><span style="color: #000000">nbsp;</span><span style="color: #000000">&</span><span style="color: #000000">nbsp; </span><span style="color: #000000"><</span><span style="color: #000000">asp:LinkButton ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">LinkButton5</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> Style</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">text-decoration: none</span><span style="color: #800000">"</span><span style="color: #000000"> OnClick</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">LinkButton5_Click</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000">跳转</span><span style="color: #000000"></</span><span style="color: #000000">asp:LinkButton</span><span style="color: #000000">></</span><span style="color: #000000">div</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000">&</span><span style="color: #000000">nbsp;</span><span style="color: #000000">&</span><span style="color: #000000">nbsp; </span><span style="color: #000000"><</span><span style="color: #000000">asp:Label ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Label4</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> Text</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">1</span><span style="color: #800000">"</span><span style="color: #000000"> Visible</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">False</span><span style="color: #800000">"</span><span style="color: #000000">></</span><span style="color: #000000">asp:Label</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">form</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">body</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">html</span><span style="color: #000000">></span></div> <div></div> <div><span style="color: #000000"><span class="cnblogs_code_collapse">父页面后台</span> <div style="display: block" id="cnblogs_code_open_2816dc0d-63c7-45b1-ad20-5528ee96ace9" class="cnblogs_code_hide" jquery1305129338801="3"> <pre><div><span style="color: #000000"> </span><span style="color: #0000ff">protected</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> Page_Load(</span><span style="color: #0000ff">object</span><span style="color: #000000"> sender, EventArgs e) { </span><span style="color: #0000ff">if</span><span style="color: #000000"> (</span><span style="color: #000000">!</span><span style="color: #000000">IsPostBack) { databind(); } } </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> databind() { SqlConnection con </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlConnection(</span><span style="color: #800000">@"</span><span style="color: #800000">Data Source=.\sqlexpress;Initial Catalog=Northwind;Integrated Security=True</span><span style="color: #800000">"</span><span style="color: #000000">); SqlCommand cmd </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlCommand(); cmd.CommandText </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">select * from 明细一览表</span><span style="color: #800000">"</span><span style="color: #000000">; cmd.Connection </span><span style="color: #000000">=</span><span style="color: #000000"> con; SqlDataAdapter da </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlDataAdapter(cmd); DataSet ds </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> DataSet(); da.Fill(ds); </span><span style="color: #0000ff">this</span><span style="color: #000000">.Label1.Text </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">共</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> ds.Tables[</span><span style="color: #800080">0</span><span style="color: #000000">].Rows.Count.ToString() </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">条数据</span><span style="color: #800000">"</span><span style="color: #000000">; PagedDataSource ps </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> PagedDataSource(); ps.DataSource </span><span style="color: #000000">=</span><span style="color: #000000"> ds.Tables[</span><span style="color: #800080">0</span><span style="color: #000000">].DefaultView; ps.AllowPaging </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">true</span><span style="color: #000000">; ps.PageSize </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800080">10</span><span style="color: #000000">; </span><span style="color: #0000ff">this</span><span style="color: #000000">.Label2.Text </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">每页</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> ps.PageSize.ToString() </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">条记录</span><span style="color: #800000">"</span><span style="color: #000000">; ps.CurrentPageIndex </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">int</span><span style="color: #000000">.Parse(</span><span style="color: #0000ff">this</span><span style="color: #000000">.Label4.Text) </span><span style="color: #000000">-</span><span style="color: #000000"> </span><span style="color: #800080">1</span><span style="color: #000000">; </span><span style="color: #0000ff">this</span><span style="color: #000000">.Label3.Text </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">共</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> ps.PageCount.ToString() </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">页</span><span style="color: #800000">"</span><span style="color: #000000">; </span><span style="color: #0000ff">this</span><span style="color: #000000">.GridView1.DataSource </span><span style="color: #000000">=</span><span style="color: #000000"> ps; </span><span style="color: #0000ff">this</span><span style="color: #000000">.GridView1.DataKeyNames </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> </span><span style="color: #0000ff">string</span><span style="color: #000000">[] { </span><span style="color: #800000">"</span><span style="color: #800000">编号</span><span style="color: #800000">"</span><span style="color: #000000"> }; </span><span style="color: #0000ff">this</span><span style="color: #000000">.GridView1.DataBind(); } </span><span style="color: #0000ff">protected</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> LinkButton1_Click(</span><span style="color: #0000ff">object</span><span style="color: #000000"> sender, EventArgs e) { </span><span style="color: #0000ff">this</span><span style="color: #000000">.Label4.Text </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">1</span><span style="color: #800000">"</span><span style="color: #000000">; </span><span style="color: #0000ff">this</span><span style="color: #000000">.GridView1.PageIndex </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800080">0</span><span style="color: #000000">; databind(); } </span><span style="color: #0000ff">protected</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> LinkButton2_Click(</span><span style="color: #0000ff">object</span><span style="color: #000000"> sender, EventArgs e) { </span><span style="color: #0000ff">if</span><span style="color: #000000"> (</span><span style="color: #0000ff">this</span><span style="color: #000000">.Label4.Text </span><span style="color: #000000">==</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">1</span><span style="color: #800000">"</span><span style="color: #000000">) { </span><span style="color: #0000ff">return</span><span style="color: #000000">; } </span><span style="color: #0000ff">this</span><span style="color: #000000">.Label4.Text </span><span style="color: #000000">=</span><span style="color: #000000"> Convert.ToString(</span><span style="color: #0000ff">int</span><span style="color: #000000">.Parse(</span><span style="color: #0000ff">this</span><span style="color: #000000">.Label4.Text) </span><span style="color: #000000">-</span><span style="color: #000000"> </span><span style="color: #800080">1</span><span style="color: #000000">); </span><span style="color: #0000ff">this</span><span style="color: #000000">.GridView1.PageIndex </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">int</span><span style="color: #000000">.Parse(</span><span style="color: #0000ff">this</span><span style="color: #000000">.Label4.Text) </span><span style="color: #000000">-</span><span style="color: #000000"> </span><span style="color: #800080">1</span><span style="color: #000000">; databind(); } </span><span style="color: #0000ff">protected</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> LinkButton3_Click(</span><span style="color: #0000ff">object</span><span style="color: #000000"> sender, EventArgs e) { </span><span style="color: #0000ff">string</span><span style="color: #000000"> s </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">this</span><span style="color: #000000">.Label3.Text.Trim().Substring(</span><span style="color: #800080">1</span><span style="color: #000000">, </span><span style="color: #0000ff">this</span><span style="color: #000000">.Label3.Text.Trim().Length </span><span style="color: #000000">-</span><span style="color: #000000"> </span><span style="color: #800080">2</span><span style="color: #000000">); </span><span style="color: #0000ff">if</span><span style="color: #000000"> (s.CompareTo(</span><span style="color: #0000ff">this</span><span style="color: #000000">.Label4.Text.Trim()) </span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #800080">0</span><span style="color: #000000">) { </span><span style="color: #0000ff">this</span><span style="color: #000000">.Label4.Text </span><span style="color: #000000">=</span><span style="color: #000000"> Convert.ToString(</span><span style="color: #0000ff">int</span><span style="color: #000000">.Parse(</span><span style="color: #0000ff">this</span><span style="color: #000000">.Label4.Text) </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #800080">1</span><span style="color: #000000">); </span><span style="color: #0000ff">this</span><span style="color: #000000">.GridView1.PageIndex </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">int</span><span style="color: #000000">.Parse(</span><span style="color: #0000ff">this</span><span style="color: #000000">.Label4.Text) </span><span style="color: #000000">-</span><span style="color: #000000"> </span><span style="color: #800080">1</span><span style="color: #000000">; databind(); } </span><span style="color: #0000ff">else</span><span style="color: #000000"> { </span><span style="color: #0000ff">return</span><span style="color: #000000">; } } </span><span style="color: #0000ff">protected</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> LinkButton4_Click(</span><span style="color: #0000ff">object</span><span style="color: #000000"> sender, EventArgs e) { </span><span style="color: #0000ff">string</span><span style="color: #000000"> s </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">this</span><span style="color: #000000">.Label3.Text.Trim().Substring(</span><span style="color: #800080">1</span><span style="color: #000000">, </span><span style="color: #0000ff">this</span><span style="color: #000000">.Label3.Text.Trim().Length </span><span style="color: #000000">-</span><span style="color: #000000"> </span><span style="color: #800080">2</span><span style="color: #000000">); </span><span style="color: #0000ff">this</span><span style="color: #000000">.Label4.Text </span><span style="color: #000000">=</span><span style="color: #000000"> s; </span><span style="color: #0000ff">this</span><span style="color: #000000">.GridView1.PageIndex </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">int</span><span style="color: #000000">.Parse(</span><span style="color: #0000ff">this</span><span style="color: #000000">.Label4.Text) </span><span style="color: #000000">-</span><span style="color: #000000"> </span><span style="color: #800080">1</span><span style="color: #000000">; databind(); } </span><span style="color: #0000ff">protected</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> LinkButton5_Click(</span><span style="color: #0000ff">object</span><span style="color: #000000"> sender, EventArgs e) { </span><span style="color: #0000ff">if</span><span style="color: #000000"> (</span><span style="color: #0000ff">this</span><span style="color: #000000">.TextBox1.Text.Trim().Length </span><span style="color: #000000">==</span><span style="color: #000000"> </span><span style="color: #800080">0</span><span style="color: #000000">) { </span><span style="color: #0000ff">return</span><span style="color: #000000">; } </span><span style="color: #0000ff">string</span><span style="color: #000000"> s </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">this</span><span style="color: #000000">.Label3.Text.Trim().Substring(</span><span style="color: #800080">1</span><span style="color: #000000">, </span><span style="color: #0000ff">this</span><span style="color: #000000">.Label3.Text.Trim().Length </span><span style="color: #000000">-</span><span style="color: #000000"> </span><span style="color: #800080">2</span><span style="color: #000000">); </span><span style="color: #0000ff">if</span><span style="color: #000000"> (s.CompareTo(</span><span style="color: #0000ff">this</span><span style="color: #000000">.TextBox1.Text.Trim()) </span><span style="color: #000000">>=</span><span style="color: #000000"> </span><span style="color: #800080">0</span><span style="color: #000000">) { </span><span style="color: #0000ff">this</span><span style="color: #000000">.Label4.Text </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">this</span><span style="color: #000000">.TextBox1.Text.Trim(); databind(); </span><span style="color: #0000ff">this</span><span style="color: #000000">.TextBox1.Text </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800000">""</span><span style="color: #000000">; } </span><span style="color: #0000ff">else</span><span style="color: #000000"> { </span><span style="color: #0000ff">this</span><span style="color: #000000">.TextBox1.Text </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800000">""</span><span style="color: #000000">; </span><span style="color: #0000ff">return</span><span style="color: #000000">; } } </span><span style="color: #0000ff">protected</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> GridView1_RowDataBound(</span><span style="color: #0000ff">object</span><span style="color: #000000"> sender, GridViewRowEventArgs e) { </span><span style="color: #0000ff">if</span><span style="color: #000000"> (e.Row.RowType </span><span style="color: #000000">==</span><span style="color: #000000"> DataControlRowType.DataRow) { e.Row.Attributes.Add(</span><span style="color: #800000">"</span><span style="color: #800000">onmouseover</span><span style="color: #800000">"</span><span style="color: #000000">, </span><span style="color: #800000">"</span><span style="color: #800000">Show('</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> DataBinder.Eval(e.Row.DataItem, </span><span style="color: #800000">"</span><span style="color: #800000">处罚结果</span><span style="color: #800000">"</span><span style="color: #000000">).ToString() </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">')</span><span style="color: #800000">"</span><span style="color: #000000">); e.Row.Attributes.Add(</span><span style="color: #800000">"</span><span style="color: #800000">onmouseout</span><span style="color: #800000">"</span><span style="color: #000000">, </span><span style="color: #800000">"</span><span style="color: #800000">Hide()</span><span style="color: #800000">"</span><span style="color: #000000">); </span><span style="color: #008000">//</span><span style="color: #008000"> e.Row.Cells[0].Text =Convert.ToString( e.Row.RowIndex+(this.GridView1.PageIndex) *this.GridView1.PageSize + 1);</span><span style="color: #008000"></span><span style="color: #000000"> } } </span><span style="color: #0000ff">protected</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> GridView1_RowDeleting(</span><span style="color: #0000ff">object</span><span style="color: #000000"> sender, GridViewDeleteEventArgs e) { SqlConnection con </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlConnection(</span><span style="color: #800000">@"</span><span style="color: #800000">Data Source=.\sqlexpress;Initial Catalog=Northwind;Integrated Security=True</span><span style="color: #800000">"</span><span style="color: #000000">); SqlCommand cmd </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlCommand(); cmd.CommandText </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">Delete from [明细一览表] where 编号=@编号</span><span style="color: #800000">"</span><span style="color: #000000">; cmd.Connection </span><span style="color: #000000">=</span><span style="color: #000000"> con; SqlParameter sp </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlParameter(</span><span style="color: #800000">"</span><span style="color: #800000">@编号</span><span style="color: #800000">"</span><span style="color: #000000">, SqlDbType.Int); sp.Value </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">this</span><span style="color: #000000">.GridView1.DataKeys[e.RowIndex].Value.ToString(); cmd.Parameters.Add(sp); </span><span style="color: #0000ff">if</span><span style="color: #000000"> (con.State </span><span style="color: #000000">==</span><span style="color: #000000"> ConnectionState.Closed) { con.Open(); } </span><span style="color: #0000ff">int</span><span style="color: #000000"> i </span><span style="color: #000000">=</span><span style="color: #000000"> cmd.ExecuteNonQuery(); </span><span style="color: #0000ff">if</span><span style="color: #000000"> (i </span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #800080">0</span><span style="color: #000000">) { Page.RegisterStartupScript(</span><span style="color: #800000">""</span><span style="color: #000000">, </span><span style="color: #800000">"</span><span style="color: #800000"><script language=javascript>alert('删除成功!');location='javascript:history.go(1)'</script></span><span style="color: #800000">"</span><span style="color: #000000">); } </span><span style="color: #0000ff">else</span><span style="color: #000000"> { Page.RegisterStartupScript(</span><span style="color: #800000">""</span><span style="color: #000000">, </span><span style="color: #800000">"</span><span style="color: #800000"><script language=javascript>alert('删除失败!');location='javascript:history.go(-1)'</script></span><span style="color: #800000">"</span><span style="color: #000000">); } databind(); } </span><span style="color: #0000ff">protected</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> GridView1_RowCommand(</span><span style="color: #0000ff">object</span><span style="color: #000000"> sender, GridViewCommandEventArgs e) { </span><span style="color: #0000ff">if</span><span style="color: #000000"> (e.CommandName </span><span style="color: #000000">==</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">Del</span><span style="color: #800000">"</span><span style="color: #000000">) { SqlConnection con </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlConnection(</span><span style="color: #800000">@"</span><span style="color: #800000">Data Source=.\sqlexpress;Initial Catalog=Northwind;Integrated Security=True</span><span style="color: #800000">"</span><span style="color: #000000">); SqlCommand cmd </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlCommand(); cmd.CommandText </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">Delete from [明细一览表] where 编号=@编号</span><span style="color: #800000">"</span><span style="color: #000000">; cmd.Connection </span><span style="color: #000000">=</span><span style="color: #000000"> con; SqlParameter sp </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlParameter(</span><span style="color: #800000">"</span><span style="color: #800000">@编号</span><span style="color: #800000">"</span><span style="color: #000000">, SqlDbType.Int); sp.Value </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">int</span><span style="color: #000000">.Parse(e.CommandArgument.ToString()); cmd.Parameters.Add(sp); </span><span style="color: #0000ff">if</span><span style="color: #000000"> (con.State </span><span style="color: #000000">==</span><span style="color: #000000"> ConnectionState.Closed) { con.Open(); } </span><span style="color: #0000ff">int</span><span style="color: #000000"> i </span><span style="color: #000000">=</span><span style="color: #000000"> cmd.ExecuteNonQuery(); </span><span style="color: #0000ff">if</span><span style="color: #000000"> (i </span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #800080">0</span><span style="color: #000000">) { Page.RegisterStartupScript(</span><span style="color: #800000">""</span><span style="color: #000000">, </span><span style="color: #800000">"</span><span style="color: #800000"><script language=javascript>alert('删除成功--ok!');location='javascript:history.go(1)'</script></span><span style="color: #800000">"</span><span style="color: #000000">); } </span><span style="color: #0000ff">else</span><span style="color: #000000"> { Page.RegisterStartupScript(</span><span style="color: #800000">""</span><span style="color: #000000">, </span><span style="color: #800000">"</span><span style="color: #800000"><script language=javascript>alert('删除失败--Error!!');location='javascript:history.go(-1)'</script></span><span style="color: #800000">"</span><span style="color: #000000">); } databind(); } }</span></div><div></div><div><span style="color: #000000"><div><span style="color: #000000">子页面: </span><span style="color: #000000"><</span><span style="color: #000000">title</span><span style="color: #000000">></span><span style="color: #000000">处罚信息管理</span><span style="color: #000000"></</span><span style="color: #000000">title</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">LINK rel</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">stylesheet</span><span style="color: #800000">"</span><span style="color: #000000"> type</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">text/css</span><span style="color: #800000">"</span><span style="color: #000000"> href</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">StyleSheet.css</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"></span><span style="color: #000000"></</span><span style="color: #000000">head</span><span style="color: #000000">></span><span style="color: #000000"></span><span style="color: #000000"><</span><span style="color: #000000">body</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">form id</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">form1</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">div align</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">center</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">table cellpadding</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">0</span><span style="color: #800000">"</span><span style="color: #000000"> cellspacing</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">0</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">thead</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">td colspan</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">2</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> 处罚信息 </span><span style="color: #000000"></</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">thead</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">tr</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:Label ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Label1</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> Text</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">编号:</span><span style="color: #800000">"</span><span style="color: #000000">></</span><span style="color: #000000">asp:Label</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">td align</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">left</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:TextBox ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">TextBox1</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> ReadOnly</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">True</span><span style="color: #800000">"</span><span style="color: #000000">></</span><span style="color: #000000">asp:TextBox</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">tr</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">tr</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:Label ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Label2</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> Text</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">处罚大类:</span><span style="color: #800000">"</span><span style="color: #000000">></</span><span style="color: #000000">asp:Label</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">td align</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">left</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:TextBox ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">TextBox2</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000">></</span><span style="color: #000000">asp:TextBox</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">tr</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">tr</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:Label ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Label3</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> Text</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">处罚小类:</span><span style="color: #800000">"</span><span style="color: #000000">></</span><span style="color: #000000">asp:Label</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">td align</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">left</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:TextBox ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">TextBox3</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000">></</span><span style="color: #000000">asp:TextBox</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">tr</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">tr</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:Label ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Label4</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> Text</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">纳税人编码:</span><span style="color: #800000">"</span><span style="color: #000000">></</span><span style="color: #000000">asp:Label</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">td align</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">left</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:TextBox ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">TextBox4</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000">></</span><span style="color: #000000">asp:TextBox</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">tr</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">tr</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:Label ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Label5</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> Text</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">企业名称:</span><span style="color: #800000">"</span><span style="color: #000000">></</span><span style="color: #000000">asp:Label</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">td align</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">left</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:TextBox ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">TextBox5</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000">></</span><span style="color: #000000">asp:TextBox</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">tr</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">tr</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:Label ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Label6</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> Text</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">处罚结果:</span><span style="color: #800000">"</span><span style="color: #000000">></</span><span style="color: #000000">asp:Label</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">td align</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">left</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:TextBox ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">TextBox6</span><span style="color: #800000">"</span><span style="color: #000000"> Height</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">80px</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> TextMode</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">MultiLine</span><span style="color: #800000">"</span><span style="color: #000000">></</span><span style="color: #000000">asp:TextBox</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">tr</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">tr</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">td colspan</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">2</span><span style="color: #800000">"</span><span style="color: #000000"> align</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">center</span><span style="color: #800000">"</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">input id</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Button3</span><span style="color: #800000">"</span><span style="color: #000000"> type</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">button</span><span style="color: #800000">"</span><span style="color: #000000"> value</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">修改</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> onclick</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">javascript:window.close();</span><span style="color: #800000">"</span><span style="color: #000000"> onserverclick</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Button1_Click</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">asp:Button ID</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">Button2</span><span style="color: #800000">"</span><span style="color: #000000"> runat</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">server</span><span style="color: #800000">"</span><span style="color: #000000"> Text</span><span style="color: #000000">=</span><span style="color: #800000">"</span><span style="color: #800000">取消</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">tr</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">table</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">div</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000"></</span><span style="color: #000000">form</span><span style="color: #000000">></span><span style="color: #000000"></span><span style="color: #000000"></</span><span style="color: #000000">body</span><span style="color: #000000">></span><span style="color: #000000"></span><span style="color: #000000"></</span><span style="color: #000000">html</span><span style="color: #000000">></span></div><div></div><div><span style="color: #000000"><span style="color: #0000ff">protected</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> Page_Load(</span><span style="color: #0000ff">object</span><span style="color: #000000"> sender, EventArgs e) { </span><span style="color: #0000ff">if</span><span style="color: #000000"> (</span><span style="color: #000000">!</span><span style="color: #000000">IsPostBack) { </span><span style="color: #0000ff">if</span><span style="color: #000000"> (Request.QueryString[</span><span style="color: #800000">"</span><span style="color: #800000">caozuo</span><span style="color: #800000">"</span><span style="color: #000000">] </span><span style="color: #000000">==</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000"> </span><span style="color: #000000">||</span><span style="color: #000000"> Request.QueryString[</span><span style="color: #800000">"</span><span style="color: #800000">caozuo</span><span style="color: #800000">"</span><span style="color: #000000">] </span><span style="color: #000000">==</span><span style="color: #000000"> </span><span style="color: #800000">""</span><span style="color: #000000">) { Page.RegisterStartupScript(</span><span style="color: #800000">""</span><span style="color: #000000">, </span><span style="color: #800000">"</span><span style="color: #800000"><script language=javascript>alert('登陆错误!');location='Default.aspx'</script></span><span style="color: #800000">"</span><span style="color: #000000">); } </span><span style="color: #0000ff">else</span><span style="color: #000000"> { </span><span style="color: #0000ff">if</span><span style="color: #000000"> (Request.QueryString[</span><span style="color: #800000">"</span><span style="color: #800000">caozuo</span><span style="color: #800000">"</span><span style="color: #000000">] </span><span style="color: #000000">==</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">add</span><span style="color: #800000">"</span><span style="color: #000000">) { MangeString </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">添加</span><span style="color: #800000">"</span><span style="color: #000000">; } </span><span style="color: #0000ff">else</span><span style="color: #000000"> { MangeString </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">修改</span><span style="color: #800000">"</span><span style="color: #000000">; databind(); } } } } </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">string</span><span style="color: #000000"> MangeString</span><span style="color: #000000">=</span><span style="color: #800000">""</span><span style="color: #000000">; </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> databind() { SqlConnection con </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlConnection(</span><span style="color: #800000">@"</span><span style="color: #800000">Data Source=.\sqlexpress;Initial Catalog=Northwind;Integrated Security=True</span><span style="color: #800000">"</span><span style="color: #000000">); SqlCommand cmd </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlCommand(); cmd.Connection </span><span style="color: #000000">=</span><span style="color: #000000"> con; cmd.CommandText </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">select * from 明细一览表 where 编号=@编号</span><span style="color: #800000">"</span><span style="color: #000000">; SqlParameter sp </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlParameter(</span><span style="color: #800000">"</span><span style="color: #800000">@编号</span><span style="color: #800000">"</span><span style="color: #000000">, SqlDbType.Int); sp.Value </span><span style="color: #000000">=</span><span style="color: #000000"> Request.QueryString[</span><span style="color: #800000">"</span><span style="color: #800000">id</span><span style="color: #800000">"</span><span style="color: #000000">].ToString(); cmd.Parameters.Add(sp); </span><span style="color: #0000ff">if</span><span style="color: #000000"> (con.State </span><span style="color: #000000">==</span><span style="color: #000000"> ConnectionState.Closed) { con.Open(); } SqlDataAdapter da </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlDataAdapter(cmd); DataSet ds </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> DataSet(); da.Fill(ds); </span><span style="color: #0000ff">this</span><span style="color: #000000">.TextBox1.Text </span><span style="color: #000000">=</span><span style="color: #000000"> Request.QueryString[</span><span style="color: #800000">"</span><span style="color: #800000">id</span><span style="color: #800000">"</span><span style="color: #000000">].ToString(); </span><span style="color: #0000ff">this</span><span style="color: #000000">.TextBox2.Text </span><span style="color: #000000">=</span><span style="color: #000000"> ds.Tables[</span><span style="color: #800080">0</span><span style="color: #000000">].Rows[</span><span style="color: #800080">0</span><span style="color: #000000">][</span><span style="color: #800080">1</span><span style="color: #000000">].ToString(); </span><span style="color: #0000ff">this</span><span style="color: #000000">.TextBox3.Text </span><span style="color: #000000">=</span><span style="color: #000000"> ds.Tables[</span><span style="color: #800080">0</span><span style="color: #000000">].Rows[</span><span style="color: #800080">0</span><span style="color: #000000">][</span><span style="color: #800080">2</span><span style="color: #000000">].ToString(); </span><span style="color: #0000ff">this</span><span style="color: #000000">.TextBox4.Text </span><span style="color: #000000">=</span><span style="color: #000000"> ds.Tables[</span><span style="color: #800080">0</span><span style="color: #000000">].Rows[</span><span style="color: #800080">0</span><span style="color: #000000">][</span><span style="color: #800080">3</span><span style="color: #000000">].ToString(); </span><span style="color: #0000ff">this</span><span style="color: #000000">.TextBox5.Text </span><span style="color: #000000">=</span><span style="color: #000000"> ds.Tables[</span><span style="color: #800080">0</span><span style="color: #000000">].Rows[</span><span style="color: #800080">0</span><span style="color: #000000">][</span><span style="color: #800080">5</span><span style="color: #000000">].ToString(); </span><span style="color: #0000ff">this</span><span style="color: #000000">.TextBox6.Text </span><span style="color: #000000">=</span><span style="color: #000000"> ds.Tables[</span><span style="color: #800080">0</span><span style="color: #000000">].Rows[</span><span style="color: #800080">0</span><span style="color: #000000">][</span><span style="color: #800080">6</span><span style="color: #000000">].ToString(); } </span><span style="color: #0000ff">protected</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> Button1_Click(</span><span style="color: #0000ff">object</span><span style="color: #000000"> sender, EventArgs e) { SqlConnection con </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlConnection(</span><span style="color: #800000">@"</span><span style="color: #800000">Data Source=.\sqlexpress;Initial Catalog=Northwind;Integrated Security=True</span><span style="color: #800000">"</span><span style="color: #000000">); SqlCommand cmd </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlCommand(); cmd.Connection </span><span style="color: #000000">=</span><span style="color: #000000"> con; </span><span style="color: #0000ff">if</span><span style="color: #000000"> (Request.QueryString[</span><span style="color: #800000">"</span><span style="color: #800000">caozuo</span><span style="color: #800000">"</span><span style="color: #000000">] </span><span style="color: #000000">==</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">add</span><span style="color: #800000">"</span><span style="color: #000000">) { cmd.CommandText </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">insert into [明细一览表](处罚大类,处罚小类,纳税人编码,纳税人识别码,企业名称,处罚结果,处罚日期,处罚金额) values(@a,@b,@c,@d,@e,@f,@g,@h)</span><span style="color: #800000">"</span><span style="color: #000000">; SqlParameter[] sp </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlParameter[</span><span style="color: #800080">8</span><span style="color: #000000">]; sp[</span><span style="color: #800080">0</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlParameter(</span><span style="color: #800000">"</span><span style="color: #800000">@a</span><span style="color: #800000">"</span><span style="color: #000000">,SqlDbType.NVarChar,</span><span style="color: #800080">50</span><span style="color: #000000">); sp[</span><span style="color: #800080">1</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlParameter(</span><span style="color: #800000">"</span><span style="color: #800000">@b</span><span style="color: #800000">"</span><span style="color: #000000">,SqlDbType.NVarChar,</span><span style="color: #800080">50</span><span style="color: #000000">); sp[</span><span style="color: #800080">2</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlParameter(</span><span style="color: #800000">"</span><span style="color: #800000">@c</span><span style="color: #800000">"</span><span style="color: #000000">,SqlDbType.NVarChar,</span><span style="color: #800080">50</span><span style="color: #000000">); sp[</span><span style="color: #800080">3</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlParameter(</span><span style="color: #800000">"</span><span style="color: #800000">@d</span><span style="color: #800000">"</span><span style="color: #000000">,SqlDbType.NVarChar,</span><span style="color: #800080">50</span><span style="color: #000000">); sp[</span><span style="color: #800080">4</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlParameter(</span><span style="color: #800000">"</span><span style="color: #800000">@e</span><span style="color: #800000">"</span><span style="color: #000000">,SqlDbType.NVarChar,</span><span style="color: #800080">50</span><span style="color: #000000">); sp[</span><span style="color: #800080">5</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlParameter(</span><span style="color: #800000">"</span><span style="color: #800000">@f</span><span style="color: #800000">"</span><span style="color: #000000">,SqlDbType.NVarChar,</span><span style="color: #800080">500</span><span style="color: #000000">); sp[</span><span style="color: #800080">6</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlParameter(</span><span style="color: #800000">"</span><span style="color: #800000">@g</span><span style="color: #800000">"</span><span style="color: #000000">,SqlDbType.DateTime); sp[</span><span style="color: #800080">7</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlParameter(</span><span style="color: #800000">"</span><span style="color: #800000">@h</span><span style="color: #800000">"</span><span style="color: #000000">,SqlDbType.Decimal,</span><span style="color: #800080">15</span><span style="color: #000000">); sp[</span><span style="color: #800080">0</span><span style="color: #000000">].Value </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">this</span><span style="color: #000000">.TextBox2.Text.Trim(); sp[</span><span style="color: #800080">1</span><span style="color: #000000">].Value </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">this</span><span style="color: #000000">.TextBox3.Text.Trim(); sp[</span><span style="color: #800080">2</span><span style="color: #000000">].Value </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">this</span><span style="color: #000000">.TextBox4.Text.Trim(); sp[</span><span style="color: #800080">3</span><span style="color: #000000">].Value </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">9787302034216</span><span style="color: #800000">"</span><span style="color: #000000">; sp[</span><span style="color: #800080">4</span><span style="color: #000000">].Value </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">this</span><span style="color: #000000">.TextBox5.Text.Trim(); sp[</span><span style="color: #800080">5</span><span style="color: #000000">].Value </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">this</span><span style="color: #000000">.TextBox6.Text.Trim(); sp[</span><span style="color: #800080">6</span><span style="color: #000000">].Value </span><span style="color: #000000">=</span><span style="color: #000000"> DateTime.Now.ToString(); sp[</span><span style="color: #800080">7</span><span style="color: #000000">].Value </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">decimal</span><span style="color: #000000">.Parse(</span><span style="color: #800000">"</span><span style="color: #800000">1234</span><span style="color: #800000">"</span><span style="color: #000000">); cmd.Parameters.AddRange(sp); </span><span style="color: #0000ff">if</span><span style="color: #000000"> (con.State </span><span style="color: #000000">==</span><span style="color: #000000"> ConnectionState.Closed) { con.Open(); } </span><span style="color: #0000ff">int</span><span style="color: #000000"> i </span><span style="color: #000000">=</span><span style="color: #000000"> cmd.ExecuteNonQuery(); </span><span style="color: #0000ff">if</span><span style="color: #000000"> (i </span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #800080">0</span><span style="color: #000000">) { Page.RegisterStartupScript(</span><span style="color: #800000">""</span><span style="color: #000000">, </span><span style="color: #800000">"</span><span style="color: #800000"><script language=javascript>window.returnValue=1;window.close();</script></span><span style="color: #800000">"</span><span style="color: #000000">); } </span><span style="color: #0000ff">else</span><span style="color: #000000"> { Page.RegisterStartupScript(</span><span style="color: #800000">""</span><span style="color: #000000">, </span><span style="color: #800000">"</span><span style="color: #800000"><script language=javascript>alert('添加失败失败');location='javascript:history.go(-1)'</script></span><span style="color: #800000">"</span><span style="color: #000000">); } } </span><span style="color: #0000ff">else</span><span style="color: #000000"> { cmd.CommandText </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">Update 明细一览表 set 纳税人编码=@纳税人编码 where 编号=@编号</span><span style="color: #800000">"</span><span style="color: #000000">; SqlParameter[] sp </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlParameter[</span><span style="color: #800080">2</span><span style="color: #000000">]; sp[</span><span style="color: #800080">0</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlParameter(</span><span style="color: #800000">"</span><span style="color: #800000">@纳税人编码</span><span style="color: #800000">"</span><span style="color: #000000">, SqlDbType.NVarChar, </span><span style="color: #800080">50</span><span style="color: #000000">); sp[</span><span style="color: #800080">1</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SqlParameter(</span><span style="color: #800000">"</span><span style="color: #800000">@编号</span><span style="color: #800000">"</span><span style="color: #000000">, SqlDbType.Int); sp[</span><span style="color: #800080">0</span><span style="color: #000000">].Value </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">this</span><span style="color: #000000">.TextBox4.Text.Trim(); sp[</span><span style="color: #800080">1</span><span style="color: #000000">].Value </span><span style="color: #000000">=</span><span style="color: #000000"> Request.QueryString[</span><span style="color: #800000">"</span><span style="color: #800000">id</span><span style="color: #800000">"</span><span style="color: #000000">].ToString(); cmd.Parameters.AddRange(sp); </span><span style="color: #0000ff">if</span><span style="color: #000000"> (con.State </span><span style="color: #000000">==</span><span style="color: #000000"> ConnectionState.Closed) { con.Open(); } </span><span style="color: #0000ff">int</span><span style="color: #000000"> i </span><span style="color: #000000">=</span><span style="color: #000000"> cmd.ExecuteNonQuery(); </span><span style="color: #0000ff">if</span><span style="color: #000000"> (i </span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #800080">0</span><span style="color: #000000">) { Page.RegisterStartupScript(</span><span style="color: #800000">""</span><span style="color: #000000">, </span><span style="color: #800000">"</span><span style="color: #800000"><script language=javascript>window.returnValue=1;window.close();</script></span><span style="color: #800000">"</span><span style="color: #000000">); } </span><span style="color: #0000ff">else</span><span style="color: #000000"> { Page.RegisterStartupScript(</span><span style="color: #800000">""</span><span style="color: #000000">, </span><span style="color: #800000">"</span><span style="color: #800000"><script language=javascript>alert('修改失败');location='javascript:history.go(-1)'</script></span><span style="color: #800000">"</span><span style="color: #000000">); } } }</span></span></div></span></div></pre> </div> </span></div> </div>
试试其它关键字
模态窗口
同语言下
.
gzip压缩
.
实现http多线程断点续传下载文件
.
实现多线程断点续传下载大文件
.
生成字符串的 CheckSum
.
根据 UserAgent 获取浏览器的类型和版本
.
根据 Agent 判断是否是智能手机
.
隐藏手机号中间四位为*方法
.
合并图片(二维码和其他图片合并)
.
ASP.NET CORE中判断是否移动端打开网页
.
ASP.NET(C#)实现页面计时(定时)自动跳转
可能有用的
.
C#实现的html内容截取
.
List 切割成几份 工具类
.
SQL查询 多列合并成一行用逗号隔开
.
一行一行读取txt的内容
.
C#动态修改文件夹名称(FSO实现,不移动文件)
.
c# 移动文件或文件夹
.
c#图片添加水印
.
Java PDF转换成图片并输出给前台展示
.
网站后台修改图片尺寸代码
.
处理大图片在缩略图时的展示
Dezai.CN
贡献的其它代码
(
4037
)
.
多线程Socket服务器模块
.
生成随机密码
.
清除浮动样式
.
弹出窗口居中
.
抓取url的函数
.
使用base HTTP验证
.
div模拟iframe嵌入效果
.
通过header转向的方法
.
Session操作类
.
执行sqlite输入插入操作后获得自动编号的ID
Copyright © 2004 - 2024 dezai.cn. All Rights Reserved
站长博客
粤ICP备13059550号-3