<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ProductAttribute.aspx.cs"
    Inherits="Admin_Product_ProductAttribute" EnableViewState="true" %>
<%@ Register Src="../Controls/EditionItem.ascx" TagName="EditionItem" TagPrefix="uc2" %>
<!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="../Stylesheet/Main.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div id="toolItem">
        <ul class="tool">
            <li class="tool_li_ac">
                <img src="../Images/icon_add.gif" width="14" height="14" align="absmiddle" />
                <a href="ProductAttribute.aspx" title="添加产品参数">添 加</a></li>
            <li>
                <div class="tool_back">
                    <a href="javaScript:history.back(-1)">返回上一步</a></div>
            </li>
        </ul>
    </div>
    <div class="main_body">
        <h1>
            <asp:Literal ID="litTitle" runat="server"></asp:Literal>产品参数设置</h1>
        <uc2:EditionItem ID="EditionItem1" runat="server" />
        <div class="ht2">
        </div>
        <div class="divbox2">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tbbox">
                <tr>
                    <th>
                        参数名称
                    </th>
                    <th width="28%">
                        参数性质
                    </th>
                    <th width="15%">
                        参数标识
                    </th>
                    <th width="10%">
                        状态
                    </th>
                    <th width="10%">
                        排序
                    </th>
                    <th width="15%">
                        操作
                    </th>
                </tr>
                <tr>
                    <td align="center">
                        <asp:TextBox ID="txtAttributeName" runat="server" Width="96%"></asp:TextBox>
                    </td>
                    <td align="center">
                        <asp:DropDownList ID="dropAttributeType" runat="server">
                            <asp:ListItem Value="0">输入文本</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td align="center">
                        <asp:TextBox ID="txtAttributeKey" runat="server" Width="96%"></asp:TextBox>
                    </td>
                    <td align="center">
                        <asp:DropDownList ID="dropState" runat="server">
                            <asp:ListItem Value="1">启用</asp:ListItem>
                            <asp:ListItem Value="0">不启用</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td align="center">
                        <asp:TextBox ID="txtSortOrder" runat="server" Width="96%"></asp:TextBox>
                    </td>
                    <td align="center">
                        <asp:LinkButton ID="lbtnAdd" runat="server" CssClass="btn_bg" OnClick="lbtnAdd_Click">确定添加</asp:LinkButton>
                    </td>
                </tr>
            </table>
        </div>
        <div class="ht">
        </div>
        <div class="item">
            <ul class="item_list">
                <li class="item_list_cell_ac margin_left_2px">
                    <div>
                        <asp:Literal ID="litTitle3" runat="server"></asp:Literal>产品参数列表
                    </div>
                </li>
            </ul>
        </div>
        <div class="ht2">
        </div>
        <div class="divbox2">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tbbox">
                <tr>
                    <th>
                        参数名称
                    </th>
                    <th width="28%">
                        参数性质
                    </th>
                    <th width="15%">
                        参数标识
                    </th>
                    <th width="10%">
                        状态
                    </th>
                    <th width="10%">
                        排序
                    </th>
                    <th width="8%">
                        操作
                    </th>
                </tr>
                <asp:Repeater ID="rptList" runat="server" OnItemCommand="rptList_ItemCommand">
                    <ItemTemplate>
                        <tr>
                            <td>
                                <%#Eval("AttributeName")%>
                            </td>
                            <td>
                                <%#Eval("AttributeType").ToString()=="0"?"输入文本":"未知"%>
                            </td>
                            <td>
                                <%#Eval("AttributeKey")%>
                            </td>
                            <td>
                                <%#Eval("State") != DBNull.Value && Eval("State").ToString()=="1" ? "启用" : "未启用"%>
                            </td>
                            <td>
                                <%#Eval("SortOrder")%>
                            </td>
                            <td align="center">
                                <a href="ProductAttribute.aspx?ID=<%#Eval("ID")%>&AC=Edit" title="编辑当前信息"><img src="../images/icon_bj.gif" border="0" align="absmiddle" /></a>
                                <asp:LinkButton ID="lbtnDel" runat="server" CommandArgument='<%#Eval("ID")%>' CommandName="Del_CommandName"
                                    OnClientClick="return confirm('确认删除当前项？')" ToolTip="删除当前项"><img src="../images/icon_sc.gif" border="0" align="absmiddle" /></asp:LinkButton>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
        </div>
        <div class="ht">
        </div>
        <div class="ht">
        </div>
        <ul class="ac_intro" runat="server" id="boxPageExplain">
            <li class="ac_intro_title">说明：</li>
            <li class="ac_intro_item">1. 删除产品参数时，其相关已录入产品的参数将会删除。</li>
        </ul>
    </div>
    </form>
</body>
</html>
