deluser.aspx
上传用户:shjujing
上传日期:2022-07-28
资源大小:11244k
文件大小:2k
源码类别:

Email客户端

开发平台:

Visual C++

  1. <%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="deluser.aspx.cs" Inherits="Manage_deluser" Title="用户删除" %>
  2. <asp:Content ID="Content1" ContentPlaceHolderID="main" Runat="Server">
  3.     <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="UID,UserName"
  4.         DataSourceID="SqlDataSource1" BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2" OnRowDataBound="GridView1_RowDataBound">
  5.         <Columns>
  6.             <asp:BoundField DataField="UID" HeaderText="用户ID" InsertVisible="False" ReadOnly="True"
  7.                 SortExpression="UID" />
  8.             <asp:BoundField DataField="UserName" HeaderText="用户名" ReadOnly="True" SortExpression="UserName" />
  9.             <asp:BoundField DataField="Email" HeaderText="电子邮件" SortExpression="Email" />
  10.             <asp:CommandField ShowDeleteButton="True" />
  11.         </Columns>
  12.         <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
  13.         <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
  14.         <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
  15.         <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
  16.         <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
  17.     </asp:GridView>
  18.     <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TZroomConnectionString %>"
  19.         SelectCommand="SELECT [UID], [UserName], [Email] FROM [U_Info]" DeleteCommand="DELETE FROM [U_Info] WHERE [UID] = @UID AND [UserName] = @UserName" InsertCommand="INSERT INTO [U_Info] ([UserName], [Email]) VALUES (@UserName, @Email)" UpdateCommand="UPDATE [U_Info] SET [Email] = @Email WHERE [UID] = @UID AND [UserName] = @UserName">
  20.         <DeleteParameters>
  21.             <asp:Parameter Name="UID" Type="Int32" />
  22.             <asp:Parameter Name="UserName" Type="String" />
  23.         </DeleteParameters>
  24.         <UpdateParameters>
  25.             <asp:Parameter Name="Email" Type="String" />
  26.             <asp:Parameter Name="UID" Type="Int32" />
  27.             <asp:Parameter Name="UserName" Type="String" />
  28.         </UpdateParameters>
  29.         <InsertParameters>
  30.             <asp:Parameter Name="UserName" Type="String" />
  31.             <asp:Parameter Name="Email" Type="String" />
  32.         </InsertParameters>
  33.     </asp:SqlDataSource>
  34. </asp:Content>