温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:小范企业管理源码
当前文件路径:XiaoFanWeb/admin/product_type_admin.aspx

1<%@ Page Language="C#" MasterPageFile="~/admin/admin.master" AutoEventWireup="true" CodeFile="product_type_admin.aspx.cs" Inherits="admin_product_type_admin" Title="Untitled Page" %> 2
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> 3
</asp:Content> 4
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> 5
<table width="600"> 6
<tr> 7
<td style="height: 158px"> 8
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/dbs.mdb" 9
DeleteCommand="DELETE FROM [FZ_Product_Type] WHERE [Id] = ?" InsertCommand="INSERT INTO [FZ_Product_Type] ([Id], [Name], [Ord], [pid]) VALUES (?, ?, ?, ?)" 10
SelectCommand="SELECT * FROM [FZ_Product_Type] WHERE ([pid] = ?) ORDER BY [Ord]" 11
UpdateCommand="UPDATE [FZ_Product_Type] SET [Name] = ?, [Ord] = ?, [pid] = ? WHERE [Id] = ?"> 12
<DeleteParameters> 13
<asp:Parameter Name="Id" Type="Int32" /> 14
</DeleteParameters> 15
<UpdateParameters> 16
<asp:Parameter Name="Name" Type="String" /> 17
<asp:Parameter Name="Ord" Type="Int32" /> 18
<asp:Parameter Name="pid" Type="Int32" /> 19
<asp:Parameter Name="Id" Type="Int32" /> 20
</UpdateParameters> 21
<SelectParameters> 22
<asp:Parameter DefaultValue="0" Name="pid" Type="Int32" /> 23
</SelectParameters> 24
<InsertParameters> 25
<asp:Parameter Name="Id" Type="Int32" /> 26
<asp:Parameter Name="Name" Type="String" /> 27
<asp:Parameter Name="Ord" Type="Int32" /> 28
<asp:Parameter Name="pid" Type="Int32" /> 29
</InsertParameters> 30
</asp:AccessDataSource> 31
<asp:GridView ID="GridView1" runat="server" AllowSorting="True" AutoGenerateColumns="False" 32
DataKeyNames="Id" DataSourceID="AccessDataSource1" Width="500px"> 33
<Columns> 34
<asp:BoundField DataField="Id" HeaderText="Id" InsertVisible="False" ReadOnly="True" 35
SortExpression="Id" /> 36
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" /> 37
<asp:BoundField DataField="Ord" HeaderText="Ord" SortExpression="Ord" /> 38
<asp:BoundField DataField="pid" HeaderText="pid" SortExpression="pid" /> 39
<asp:CommandField ShowDeleteButton="True" /> 40
<asp:TemplateField HeaderText="操作" ShowHeader="False"> 41
<EditItemTemplate> 42
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update" 43
Text="更新"></asp:LinkButton> 44
<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel" 45
Text="取消"></asp:LinkButton> 46
</EditItemTemplate> 47
<ItemTemplate> 48
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Edit" 49
Text="编辑"></asp:LinkButton> 50
<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Select" 51
OnClick="LinkButton2_Click" Text="二级分类"></asp:LinkButton> 52
</ItemTemplate> 53
</asp:TemplateField> 54
</Columns> 55
</asp:GridView> 56
</td> 57
</tr> 58
<tr> 59
<td> 60
<asp:Panel ID="Panel1" runat="server" ForeColor="#C00000" Visible="False" Width="500px"> 61
二级分类<asp:GridView ID="GridView2" runat="server" AllowSorting="True" AutoGenerateColumns="False" 62
DataKeyNames="Id" DataSourceID="AccessDataSource2" Width="373px"> 63
<Columns> 64
<asp:BoundField DataField="Id" HeaderText="Id" InsertVisible="False" ReadOnly="True" 65
SortExpression="Id" /> 66
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" /> 67
<asp:BoundField DataField="Ord" HeaderText="Ord" SortExpression="Ord" /> 68
<asp:BoundField DataField="pid" HeaderText="pid" SortExpression="pid" /> 69
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" /> 70
</Columns> 71
</asp:GridView> 72
<asp:AccessDataSource ID="AccessDataSource2" runat="server" DataFile="~/App_Data/dbs.mdb" 73
DeleteCommand="DELETE FROM [FZ_Product_Type] WHERE [Id] = ?" InsertCommand="INSERT INTO [FZ_Product_Type] ([Id], [Name], [Ord], [pid]) VALUES (?, ?, ?, ?)" 74
SelectCommand="SELECT * FROM [FZ_Product_Type] WHERE ([pid] = ?) ORDER BY [Ord], [Id]" 75
UpdateCommand="UPDATE [FZ_Product_Type] SET [Name] = ?, [Ord] = ?, [pid] = ? WHERE [Id] = ?"> 76
<DeleteParameters> 77
<asp:Parameter Name="Id" Type="Int32" /> 78
</DeleteParameters> 79
<UpdateParameters> 80
<asp:Parameter Name="Name" Type="String" /> 81
<asp:Parameter Name="Ord" Type="Int32" /> 82
<asp:Parameter Name="pid" Type="Int32" /> 83
<asp:Parameter Name="Id" Type="Int32" /> 84
</UpdateParameters> 85
<SelectParameters> 86
<asp:ControlParameter ControlID="GridView1" Name="pid" PropertyName="SelectedValue" 87
Type="Int32" /> 88
</SelectParameters> 89
<InsertParameters> 90
<asp:Parameter Name="Id" Type="Int32" /> 91
<asp:Parameter Name="Name" Type="String" /> 92
<asp:Parameter Name="Ord" Type="Int32" /> 93
<asp:Parameter Name="pid" Type="Int32" /> 94
</InsertParameters> 95
</asp:AccessDataSource> 96
</asp:Panel> 97
</td> 98
</tr> 99
<tr> 100
<td> 101
</td> 102
</tr> 103
</table> 104
</asp:Content> 105
106




