<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_ProductAttributesList, WebApp_deploy" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table class="nick">
        <tr>
            <td class="tit">
                <img style="border: 0px;" src="tpl/img/ico/info.gif" />按商品类型显示：<asp:DropDownList ID="DropDownList_Attributes"
                    runat="server" DataTextField="Attributes_Type" DataValueField="Attributes_Type"
                    AutoPostBack="True" OnSelectedIndexChanged="DropDownList_Attributes_SelectedIndexChanged">
                </asp:DropDownList>
            </td>
            <td class="tit" style="text-align:right;">
                                                <img style="border: 0px;" alt="" src="tpl/img/ico/add.gif" />
                <asp:LinkButton ID="LinkButton_Add" runat="server" onclick="LinkButton_Add_Click">添加属性</asp:LinkButton>
            </td>
        </tr>
    </table>
    <div id="product_history">
        <asp:GridView ID="GridView_Attributes" runat="server" AutoGenerateColumns="False"
            CssClass="adminlist" OnRowCommand="GridView_Attributes_RowCommand">
            <Columns>
                <asp:TemplateField HeaderText="属性名称">
                    <ItemTemplate>
                        <asp:Label ID="Label_Name" runat="server" Text='<%# Eval("Attributes_Name") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="商品类型">
                    <ItemTemplate>
                        <asp:Label ID="Label_Type" runat="server" Text='<%# Eval("Attributes_Type") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="属性值的录入方式">
                    <ItemTemplate>
                        <asp:Label ID="Label_Methods" runat="server" Text='<%# Eval("Attributes_Methods") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="可选值" ControlStyle-Width="200">
                    <ItemTemplate>
                        <asp:Label ID="Label_Value" runat="server" Text='<%# Eval("Attributes_Value").ToString().Length>50?Eval("Attributes_Value").ToString().Substring(0, 50)+"...":Eval("Attributes_Value") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="排序">
                    <ItemTemplate>
                        <asp:Label ID="Label_Sort" runat="server" Text='<%# Eval("Attributes_Sort") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="操作">
                    <ItemTemplate>
                        <asp:HyperLink ID="HyperLink_Edit" runat="server" Text="编辑" NavigateUrl='<%# "Admin_ProductAttributesEdit.aspx?Id="+Eval("Id")+"&&Model=_Edit"%>' />
                        ｜
                        <asp:LinkButton ID="LinkButton_Delete" OnClientClick="return confirm('确定要删除么?')"
                            CommandName="_Delete" CommandArgument='<%# Eval("Id") %>' runat="server" Text="删除" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
                <tr>
                    <th scope="col">
                        属性名称
                    </th>
                    <th scope="col">
                        商品类型
                    </th>
                    <th scope="col">
                        属性值的录入方式
                    </th>
                    <th scope="col">
                        可选值
                    </th>
                    <th scope="col">
                        排序
                    </th>
                    <th scope="col">
                        编辑
                    </th>
                    <th scope="col">
                        删除
                    </th>
                </tr>
                <tr>
                    <td colspan="3" style="text-align: center; line-height: 20px;">
                        暂无记录！
                    </td>
                </tr>
            </EmptyDataTemplate>
        </asp:GridView>
    </div>
</asp:Content>
