⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 categoryadmin.ascx

📁 网上书店
💻 ASCX
字号:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CategoryAdmin.ascx.cs" Inherits="AdminControl_CategoryAdmin" %>
&nbsp;<table border="1" cellpadding="0" cellspacing="0" style="width: 350px">
    <tr>
        <td align="center" colspan="2">
            新增一个分类</td>
    </tr>
    <tr>
        <td align="right" style="width: 100px">
            分类名:</td>
        <td style="width: 250px">
            <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="rfvName" runat="server" 
                ControlToValidate="txtName" ErrorMessage="分类名不能为空!" ValidationGroup="add">*</asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr style="color: #000000">
        <td align="right" style="width: 100px; height: 21px">
            所属门类:</td>
        <td style="width: 250px; height: 21px">
            &nbsp;<asp:DropDownList ID="ddlDepartment" runat="server" Width="149px">
            </asp:DropDownList>
        </td>
    </tr>
    <tr>
        <td align="right" style="width: 100px">
            描 &nbsp;述:</td>
        <td style="width: 250px">
            <asp:TextBox ID="txtDescription" runat="server" Height="80px" 
                TextMode="MultiLine" Width="153px"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td style="width: 100px; height: 21px">
        </td>
        <td style="width: 250px; height: 21px">
            <asp:Button ID="btnAdd" runat="server" OnClick="btnAdd_Click" Text="提交" 
                ValidationGroup="add" />
        </td>
    </tr>
</table>
<br />
<table border="1" cellpadding="0" cellspacing="0" style="width: 500px">
    <tr>
        <td align="center" style="width: 350px">
            修改删除分类</td>
        <td align="center" style="width: 150px">
            门类说明</td>
    </tr>
    <tr>
        <td align="left" style="width: 350px" valign="top">
            &nbsp;<asp:GridView ID="gridCategory" runat="server" AutoGenerateColumns="False" 
                CellPadding="4" DataKeyNames="CategoryID" ForeColor="#333333" GridLines="None" 
                OnRowCancelingEdit="gridCategory_RowCancelingEdit" 
                OnRowDeleting="gridCategory_RowDeleting" OnRowEditing="gridCategory_RowEditing" 
                OnRowUpdating="gridCategory_RowUpdating">
                <Columns>
                    <asp:BoundField DataField="CategoryID" HeaderText="分类ID" ReadOnly="True" 
                        Visible="False" />
                    <asp:BoundField DataField="Name" HeaderText="分类名" ReadOnly="True" />
                    <asp:BoundField DataField="DepartmentID" HeaderText="所属门类" />
                    <asp:BoundField DataField="Content" HeaderText="描述" />
                    <asp:CommandField ButtonType="Button" ShowEditButton="True" />
                    <asp:CommandField ButtonType="Button" ShowDeleteButton="True" />
                </Columns>
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <EditRowStyle BackColor="#999999" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            </asp:GridView>
        </td>
        <td align="left" style="width: 150px" valign="top">
            <asp:Repeater ID="repeaterDepartment" runat="server">
                <HeaderTemplate>
                    <table>
                    </table>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td>
                <%# Eval("DepartmentID")%>
                        </td>
                        <td>
                <%# Eval("Name")%>
                        </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:Repeater>
        </td>
    </tr>
</table>
<br />
&nbsp;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -