📄 admin_class.aspx
字号:
<%@ page language="C#" autoeventwireup="true" inherits="Admin_Admin_Class, App_Web_2de4qqid" %>
<!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>
<link href="../Images/Style.css" rel="stylesheet" type="text/css" />
</head>
<body style="margin: 1px">
<form id="form1" runat="server">
<table border="0" cellpadding="0" cellspacing="1" style="width: 100%; background-color: gainsboro">
<tr>
<td align="center" style="width: 100%; height: 30px; background-color: aliceblue">
故障分类管理</td>
</tr>
<tr>
<td align="center" style="width: 100%; height: 100px; background-color: #ffffff; font-size: 14px;">
添加故障分类名称:<asp:TextBox ID="txtClassName" runat="server" BorderStyle="Groove" Height="20px"
Width="200px"></asp:TextBox>
<asp:ImageButton ID="btnOK" runat="server" ImageAlign="AbsMiddle" ImageUrl="~/Images/form_submit.gif" OnClick="btnOK_Click" />
<asp:Label ID="txtMsg" runat="server"></asp:Label></td>
</tr>
<tr>
<td align="center" style="width: 100%; background-color: #ffffff;" valign="top">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:GridView ID="GridViewClass" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" CellPadding="4" DataKeyNames="ClassID" DataSourceID="SqlDS"
ForeColor="#333333" GridLines="None" Width="100%" PageSize="18" OnRowCommand="GridViewClass_RowCommand">
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<Columns>
<asp:BoundField DataField="ClassID" HeaderText="分类编号" InsertVisible="False" ReadOnly="True"
SortExpression="ClassID" >
<ItemStyle HorizontalAlign="Center" Width="15%" />
</asp:BoundField>
<asp:BoundField DataField="ClassName" HeaderText="分类名称" SortExpression="ClassName" >
<ItemStyle HorizontalAlign="Center" Width="50%" />
</asp:BoundField>
<asp:TemplateField HeaderText="编辑" ShowHeader="False">
<EditItemTemplate>
<asp:LinkButton ID="btnUpdate" runat="server" CausesValidation="True" CommandName="Update"
OnClientClick="return confirm('你确定要更新该数据吗?')" Text="更新" ToolTip="更新"></asp:LinkButton>
<asp:LinkButton ID="btnCancle" runat="server" CausesValidation="False" CommandName="Cancel"
Text="取消" ToolTip="取消"></asp:LinkButton>
</EditItemTemplate>
<ItemStyle HorizontalAlign="Center" Width="20%" />
<ItemTemplate>
<asp:LinkButton ID="btnEdit" runat="server" CausesValidation="False" CommandName="Edit"
Text="编辑"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="删除" ShowHeader="False">
<ItemStyle HorizontalAlign="Center" Width="15%" />
<ItemTemplate>
<asp:LinkButton ID="btnDelete" runat="server" CausesValidation="False" CommandName="Delete"
OnClientClick="return confirm('你确定要删除该数据吗?')" Text="删除" ToolTip="删除"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle BackColor="#EFF3FB" />
<EditRowStyle BackColor="#2461BF" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Right" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDS" runat="server" ConnectionString="<%$ ConnectionStrings:SQLConnection %>" UpdateCommand="Admin_Class_Update" DeleteCommandType="StoredProcedure" DeleteCommand="Admin_Class_Delete" SelectCommand="Admin_Class_List" SelectCommandType="StoredProcedure" UpdateCommandType="StoredProcedure">
<DeleteParameters>
<asp:Parameter Name="ClassID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="ClassID" Type="Int32" />
<asp:Parameter Name="ClassName" Type="String" />
</UpdateParameters>
</asp:SqlDataSource>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -