<%@ control language="C#" autoeventwireup="true" inherits="ECMe_WebUserControl_Product_Related, ECMe_Deploy" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:UpdatePanel ID="UUpdatePanel" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <div class="title">
            选择相关商品</div>
        <div class="all_1">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td class="all">
                        <div class="title_1">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td style="width: 50px; font-size: 12px">
                                        按分类：
                                    </td>
                                    <td style="width: 140px">
                                        <asp:DropDownList ID="DCategoryID" Height="20px" Width="200px" CssClass="input_3"
                                            runat="server">
                                        </asp:DropDownList>
                                    </td>
                                    <td style="width: 50px; font-size: 12px">
                                        按价格：
                                    </td>
                                    <td style="width: 60px">
                                        <asp:TextBox ID="TProductPriceStart" CssClass="input_3" Text="0" Width="50px" runat="server"></asp:TextBox>
                                    </td>
                                    <td style="width: 20px; font-size: 12px">
                                        至
                                    </td>
                                    <td style="width: 70px">
                                        <asp:TextBox ID="TProductPriceEnd" CssClass="input_3" Text="0" Width="50px" runat="server"></asp:TextBox>
                                    </td>
                                    <td align="right">
                                        <asp:Button ID="BSearch" CausesValidation="false" runat="server" CssClass="button_1"
                                            Text="搜索商品" OnClick="BSearch_Click" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div class="Activity">
                            <div class="Fast">
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td>
                                            <asp:Repeater ID="RepeaterTable" runat="server" OnItemCommand="RepeaterTable_ItemCommand">
                                                <ItemTemplate>
                                                    <div class="Relatedproducts">
                                                        <div class="img">
                                                            <asp:Image ID="IProductImg" ImageUrl='<%# Common.GetProductSmallImg(int.Parse(Eval("ID").ToString())) %>'
                                                                Width="54" Height="54" runat="server" />
                                                        </div>
                                                        <p>
                                                            <%#Eval("ProductName") %>
                                                        </p>
                                                        <p>
                                                            <asp:LinkButton ID="LAdd" CommandArgument='<%#Eval("ID") %>' runat="server" CausesValidation="false"
                                                                CssClass="blue">添加</asp:LinkButton>
                                                        </p>
                                                    </div>
                                                </ItemTemplate>
                                            </asp:Repeater>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="all" style="font-size: 12px">
                        <div class="txte_1">
                        </div>
                        <webdiyer:AspNetPager ID="AspNetPagerItem" runat="server" CssClass="yahoo2" AlwaysShow="false"
                            OnPageChanged="AspNetPagerItem_PageChanged">
                        </webdiyer:AspNetPager>
                    </td>
                </tr>
            </table>
        </div>
        <div class="title">
            已添加的商品</div>
        <div class="all_1">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td class="all">
                        <div class="filter">
                            <table border="0" cellspacing="0" cellpadding="0" class="Fast_group_table">
                                <tr>
                                    <th>
                                        商品名称
                                    </th>
                                    <th style="width: 120px">
                                        商品货号
                                    </th>
                                    <th style="width: 80px">
                                        商品价格
                                    </th>
                                    <th style="width: 80px">
                                        商品库存
                                    </th>
                                    <th style="width: 80px">
                                        相关操作
                                    </th>
                                </tr>
                                <asp:Repeater ID="RepeaterItem" runat="server" OnItemCommand="RepeaterItem_ItemCommand">
                                    <ItemTemplate>
                                        <tr>
                                            <td>
                                                <%#Eval("ProductName") %>
                                            </td>
                                            <td>
                                                <%#Eval("ProductNumber")%>
                                            </td>
                                            <td>
                                                <%#Eval("ProductPrice")%>
                                            </td>
                                            <td>
                                                <%#Eval("ProductStock")%>
                                            </td>
                                            <td>
                                                <asp:ImageButton ID="IDeleteItem" ImageUrl="../CSS/Admin/images/class.png" runat="server"
                                                    ToolTip='<%#Eval("ID") %>' CommandArgument='<%#Eval("ID") %>' CausesValidation="false" />
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </table>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
    </ContentTemplate>
</asp:UpdatePanel>
