📄 systemtext.aspx
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SystemText.aspx.cs" Inherits="admin_SystemText" %>
<!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>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="2">
<tr>
<td height="50" valign="bottom">
<asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="False" OnClick="LinkButton1_Click">通知列表</asp:LinkButton>
<asp:LinkButton ID="LinkButton4" runat="server" CausesValidation="False" OnClick="LinkButton2_Click">发布通知</asp:LinkButton><br /><br />
</td>
</tr>
<tr><td>
<asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="ID"
DataSourceID="SqlDataSource1" GridLines="None" Width="550px" ForeColor="#333333">
<FooterStyle BackColor="#507CD1" ForeColor="White" Font-Bold="True" />
<Columns>
<asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
SortExpression="ID" >
<ItemStyle HorizontalAlign="Center" Width="10px" />
</asp:BoundField>
<asp:BoundField DataField="Tatile" HeaderText="标题" SortExpression="Tatile" >
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:TemplateField HeaderText="时间" SortExpression="InputTime">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("InputTime") %>'></asp:TextBox>
</EditItemTemplate>
<ItemStyle HorizontalAlign="Center" Width="100px" />
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("InputTime", "{0:d}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="TestType" HeaderText="显示" SortExpression="TestType" >
<ItemStyle HorizontalAlign="Center" Width="30px" />
</asp:BoundField>
<asp:TemplateField HeaderText="删除" ShowHeader="False">
<ItemStyle HorizontalAlign="Center" Width="40px" />
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete" OnClientClick="return confirm('您确认删除该通知')"
Text="删除"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle BackColor="#EFF3FB" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#a3c5ce" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
<EditRowStyle BackColor="#2461BF" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:al_bysjConnectionString %>"
DeleteCommand="DELETE FROM [SystemTest] WHERE [ID] = @ID" InsertCommand="INSERT INTO [SystemTest] ([InputTime], [TestType], [Tatile]) VALUES (@InputTime, @TestType, @Tatile)"
SelectCommand="SELECT [ID], [InputTime], [TestType], [Tatile] FROM [SystemTest] ORDER BY [InputTime] DESC, [TestType]"
UpdateCommand="UPDATE [SystemTest] SET [InputTime] = @InputTime, [TestType] = @TestType, [Tatile] = @Tatile WHERE [ID] = @ID">
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="InputTime" Type="DateTime" />
<asp:Parameter Name="TestType" Type="Int32" />
<asp:Parameter Name="Tatile" Type="String" />
<asp:Parameter Name="ID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="InputTime" Type="DateTime" />
<asp:Parameter Name="TestType" Type="Int32" />
<asp:Parameter Name="Tatile" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
</asp:Panel>
<asp:Panel ID="Panel2" runat="server">
<table width="550" bgcolor="#a3c5ce" border="0" align="center" cellpadding="0" cellspacing="1">
<tr><td colspan="2" height="20" align="center"><b><font color="#ffffff">发布通知</font></b></td></tr>
<tr>
<td bgcolor="#f0fbfd" align="right" width="200" height="20">通知标题:</td>
<td bgcolor="#f0fbfd"><asp:TextBox ID="NewsTatil" runat="server" Width="80px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="标题不能为空" ControlToValidate="NewsTatil"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td bgcolor="#f0fbfd" align="right" height="20">通知内容:</td>
<td bgcolor="#f0fbfd"><asp:TextBox ID="Counts" runat="server" Rows="6" Width="280px" TextMode="MultiLine"></asp:TextBox></td>
</tr>
<tr>
<td bgcolor="#f0fbfd" height="20" valign="bottom"></td>
<td bgcolor="#f0fbfd"><asp:Button ID="Button1" runat="server" Text=" 添 加 " UseSubmitBehavior="False" OnClick="Button1_Click" /></td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -