📄 catemanage.aspx
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="cateManage.aspx.cs" Inherits="cateManage" %>
<%@ Register Src="UserLoginl.ascx" TagName="UserLoginl" TagPrefix="uc1" %>
<!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 type="text/css" href="css/UserLogin.css" rel="Stylesheet" />
</head>
<body>
<form id="form1" runat="server">
<div>
<table align="center" style="width: 768px">
<tr>
<td style="width: 764px; height: 21px; background-color: #d2e4fc">
<uc1:UserLoginl ID="UserLoginl1" runat="server" />
</td>
</tr>
<tr>
<td style="width: 764px; height: 21px">
<asp:GridView ID="gvCate" runat="server" AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="CateID" DataSourceID="SqlDataSource1" OnPageIndexChanging="gvCate_PageIndexChanging" OnRowCommand="gvCate_RowCommand" OnSelectedIndexChanged="gvCate_SelectedIndexChanged">
<Columns>
<asp:CommandField ShowDeleteButton="True" ShowInsertButton="True" ShowSelectButton="True" />
<asp:BoundField DataField="CateID" HeaderText="类别ID" InsertVisible="False" ReadOnly="True"
SortExpression="CateID" Visible="False" />
<asp:BoundField DataField="CateName" HeaderText="类别名称" SortExpression="CateName">
<ItemStyle Width="120px" />
<HeaderStyle Width="120px" />
</asp:BoundField>
<asp:BoundField DataField="ParentCateID" HeaderText="上级类别ID" SortExpression="ParentCateID"
Visible="False" />
<asp:BoundField DataField="ParentName" HeaderText="父类别名称" SortExpression="ParentName">
<ItemStyle Width="120px" />
<HeaderStyle Width="120px" />
</asp:BoundField>
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Provider=SQLOLEDB;Data Source=.;Persist Security Info=True;Password=123456;User ID=sa;Initial Catalog=chp09"
DeleteCommand="DeleteCategory;1" DeleteCommandType="StoredProcedure" InsertCommand="AddCategory;1"
InsertCommandType="StoredProcedure" ProviderName="System.Data.OleDb" SelectCommand="GetCategorys;1"
SelectCommandType="StoredProcedure" UpdateCommand="UpdateCategory;1" UpdateCommandType="StoredProcedure">
<DeleteParameters>
<asp:Parameter Name="CateID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="CateID" Type="Int32" />
<asp:Parameter Name="CateName" Type="String" />
<asp:Parameter Name="ParentCateID" Type="Int32" />
<asp:Parameter Name="UserID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="CateName" Type="String" />
<asp:Parameter Name="ParentCateID" Type="Int32" />
<asp:Parameter Name="UserID" Type="Int32" />
</InsertParameters>
</asp:SqlDataSource>
</td>
</tr>
<tr>
<td>
<asp:Panel ID="plEdit" runat="server" Height="50px" Width="700px" Visible="False">
<asp:Label ID="Label1" runat="server" Text="类别名称"></asp:Label>
<asp:TextBox ID="txtUName" runat="server" Width="76px"></asp:TextBox>
<asp:Label ID="Label4" runat="server" Text="上级类别"></asp:Label>
<asp:DropDownList ID="listType" runat="server">
</asp:DropDownList>
<asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" />
<asp:HiddenField ID="CateID" runat="server" />
</asp:Panel>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -