📄 cpgl2.aspx
字号:
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Cpgl2.aspx.cs" Inherits="WebForm_Cpgl2" Title="删除车票" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<br />
<table style="width: 535px; height: 348px">
<tr>
<td colspan="2" rowspan="2" style="width: 434px">
<asp:GridView ID="GridView1" runat="server" CellPadding="4" DataSourceID="SqlDataSource1" DataKeyNames="车次编号"
ForeColor="#333333" GridLines="None" Width="532px" OnRowDeleting="GridView1_RowDeleting" DataMember="DefaultView">
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:CommandField DeleteText="<div id="de" onclick="JavaScript:return confirm('确定删除吗?')">删除</div> "
ShowDeleteButton="True" />
</Columns>
</asp:GridView>
<asp:Label ID="Label1" runat="server" ForeColor="Red"></asp:Label>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [车次编号], [目的地点], [发车地点], [票价], [数量], [发车时间], [备注] FROM [unbuy]" DeleteCommand="DELETE FROM unbuy WHERE (车次编号 = @车次编号)">
<DeleteParameters>
<asp:Parameter Name="车次编号" />
</DeleteParameters>
</asp:SqlDataSource>
</td>
</tr>
</table>
</asp:Content>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -