⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 default2.aspx

📁 水晶报表详细资料水晶报表详细资料水晶报表详细资料
💻 ASPX
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DB_ADONETConnectionString %>"
            SelectCommand="SELECT * FROM [t_People]"></asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:DB_ADONETConnectionString %>"
            DeleteCommand="DELETE FROM [t_People] WHERE [tb_PID] = @tb_PID" InsertCommand="INSERT INTO [t_People] ([tb_PID], [tb_PName], [tb_PSex]) VALUES (@tb_PID, @tb_PName, @tb_PSex)"
            SelectCommand="SELECT tb_PID, tb_PName, tb_PSex FROM t_People WHERE (tb_PID = @tb_PID)"
            UpdateCommand="UPDATE [t_People] SET [tb_PName] = @tb_PName, [tb_PSex] = @tb_PSex WHERE [tb_PID] = @tb_PID">
            <DeleteParameters>
                <asp:Parameter Name="tb_PID" Type="String" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="tb_PName" Type="String" />
                <asp:Parameter Name="tb_PSex" Type="String" />
                <asp:Parameter Name="tb_PID" Type="String" />
            </UpdateParameters>
            <SelectParameters>
                <asp:ControlParameter ControlID="GridView1" Name="tb_PID" PropertyName="SelectedValue" />
            </SelectParameters>
            <InsertParameters>
                <asp:Parameter Name="tb_PID" Type="String" />
                <asp:Parameter Name="tb_PName" Type="String" />
                <asp:Parameter Name="tb_PSex" Type="String" />
            </InsertParameters>
        </asp:SqlDataSource>
    
    </div>
        <table>
            <tr>
                <td style="width: 87px">
                    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                        BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
                        CellPadding="4" DataKeyNames="tb_PID" DataSourceID="SqlDataSource1" Font-Size="9pt"
                        ForeColor="Black" GridLines="Horizontal" Height="1px" Width="237px" PageSize="4">
                        <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                        <Columns>
                            <asp:CommandField ShowSelectButton="True" />
                            <asp:BoundField DataField="tb_PID" HeaderText="tb_PID" ReadOnly="True" SortExpression="tb_PID" />
                            <asp:BoundField DataField="tb_PName" HeaderText="tb_PName" SortExpression="tb_PName" />
                            <asp:BoundField DataField="tb_PSex" HeaderText="tb_PSex" SortExpression="tb_PSex" />
                        </Columns>
                        <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                        <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
                    </asp:GridView>
                </td>
                <td style="width: 100px" valign=top>
                    <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" BackColor="White"
                        BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="4" DataKeyNames="tb_PID"
                        DataSourceID="SqlDataSource2" Font-Size="9pt" ForeColor="Black" GridLines="Horizontal"
                        Height="1px" Width="159px">
                        <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                        <EditRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                        <Fields>
                            <asp:BoundField DataField="tb_PID" HeaderText="tb_PID" ReadOnly="True" SortExpression="tb_PID" />
                            <asp:BoundField DataField="tb_PName" HeaderText="tb_PName" SortExpression="tb_PName" />
                            <asp:BoundField DataField="tb_PSex" HeaderText="tb_PSex" SortExpression="tb_PSex" />
                            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ShowInsertButton="True" />
                        </Fields>
                        <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
                        <HeaderTemplate>
                            选取信息列表
                        </HeaderTemplate>
                    </asp:DetailsView>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -