• 向数据库中添加内容 manageStdInfo.aspx


    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="manageStdInfo.aspx.cs" Inherits="admin_manageStdInfo" %>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:stuInfoConnectionString %>" DeleteCommand="DELETE FROM [stdInfo] WHERE [stdXh] = @stdXh" InsertCommand="INSERT INTO [stdInfo] ([stdXh], [stdSfzhm], [stdXm], [stdRxsj], [stdSzbj], [stdSfby], [stdJtdz], [stdLxdh], [stdBgqq]) VALUES (@stdXh, @stdSfzhm, @stdXm, @stdRxsj, @stdSzbj, @stdSfby, @stdJtdz, @stdLxdh, @stdBgqq)" SelectCommand="SELECT [stdXh], [stdSfzhm], [stdXm], [stdRxsj], [stdSzbj], [stdSfby], [stdJtdz], [stdLxdh], [stdBgqq] FROM [stdInfo]" UpdateCommand="UPDATE [stdInfo] SET [stdSfzhm] = @stdSfzhm, [stdXm] = @stdXm, [stdRxsj] = @stdRxsj, [stdSzbj] = @stdSzbj, [stdSfby] = @stdSfby, [stdJtdz] = @stdJtdz, [stdLxdh] = @stdLxdh, [stdBgqq] = @stdBgqq WHERE [stdXh] = @stdXh">
                <DeleteParameters>
                    <asp:Parameter Name="stdXh" Type="String" />
                </DeleteParameters>
                <InsertParameters>
                    <asp:Parameter Name="stdXh" Type="String" />
                    <asp:Parameter Name="stdSfzhm" Type="String" />
                    <asp:Parameter Name="stdXm" Type="String" />
                    <asp:Parameter Name="stdRxsj" Type="DateTime" />
                    <asp:Parameter Name="stdSzbj" Type="String" />
                    <asp:Parameter Name="stdSfby" Type="Boolean" />
                    <asp:Parameter Name="stdJtdz" Type="String" />
                    <asp:Parameter Name="stdLxdh" Type="String" />
                    <asp:Parameter Name="stdBgqq" Type="String" />
                </InsertParameters>
                <UpdateParameters>
                    <asp:Parameter Name="stdSfzhm" Type="String" />
                    <asp:Parameter Name="stdXm" Type="String" />
                    <asp:Parameter Name="stdRxsj" Type="DateTime" />
                    <asp:Parameter Name="stdSzbj" Type="String" />
                    <asp:Parameter Name="stdSfby" Type="Boolean" />
                    <asp:Parameter Name="stdJtdz" Type="String" />
                    <asp:Parameter Name="stdLxdh" Type="String" />
                    <asp:Parameter Name="stdBgqq" Type="String" />
                    <asp:Parameter Name="stdXh" Type="String" />
                </UpdateParameters>
            </asp:SqlDataSource>
        
        </div>
            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="stdXh" DataSourceID="SqlDataSource1" Width="757px">
                <Columns>
                    
                    <asp:BoundField DataField="stdXh" HeaderText="学号" ReadOnly="True" SortExpression="stdXh" />
                    <asp:BoundField DataField="stdSfzhm" HeaderText="身份证号" SortExpression="stdSfzhm" />
                    <asp:BoundField DataField="stdXm" HeaderText="姓名" SortExpression="stdXm" />
                    <asp:BoundField DataField="stdRxsj" HeaderText="入学时间" SortExpression="stdRxsj" DataFormatString="{0:yyyy-MM-dd}" />
                    <asp:BoundField DataField="stdSzbj" HeaderText="班级" SortExpression="stdSzbj" />
                    <asp:CheckBoxField DataField="stdSfby" HeaderText="是否毕业" SortExpression="stdSfby" />
                    <asp:BoundField DataField="stdJtdz" HeaderText="家庭地址" SortExpression="stdJtdz" />
                    <asp:BoundField DataField="stdLxdh" HeaderText="联系电话" SortExpression="stdLxdh" />
                    <asp:BoundField DataField="stdBgqq" HeaderText="变更请求" SortExpression="stdBgqq" />
                    <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
                    <asp:HyperLinkField DataNavigateUrlFields="stdXh" DataNavigateUrlFormatString="ModifyStdInfo.aspx?stdXh={0}" HeaderText="修改" Text="修改" />
                </Columns>
            </asp:GridView>
        </form>
    </body>
    </html>
  • 相关阅读:
    WPF
    WPF RadioButton 转换
    JS框架之收集专帖
    WPF用ShowDialog()弹出窗体时控制该窗体的显示位置,并传值回父窗体
    WPF学习笔记:MVVM模式下,ViewModel如何关闭View?
    Microsoft Visual Studio 下载转帖
    RelayCommand命令
    动态调用webservice,不需要添加Web References
    你会在C#的类库中添加web service引用吗?
    Quartz Cron 触发器 Cron Expression 的格式
  • 原文地址:https://www.cnblogs.com/superxuezhazha/p/5195974.html
Copyright © 2020-2023  润新知