<%@ Page Language="C#" EnableEventValidation="false" AutoEventWireup="true" CodeFile="Get_Products.aspx.cs" Inherits="admin_Get_Products" %>

<!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>
    <script language="javascript" type="text/javascript" src="images/js/Common.js"></script>
    <script language="javascript" type="text/javascript" src="images/js/BLL.js"></script>
    <link href="images/StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <table class="tableBorder" cellspacing="1" cellpadding="1" align="center" border="0">
    <tr><td>
    <div style=" padding-top:5px; font-size:14px; color:#d6dff7; font-weight:bold; width:100%; height:25px; background-color:#003399;">
    &nbsp;&nbsp;&nbsp;&nbsp;产品列表</div>
    </td></tr>
    <tr><td>
    <div style="text-align:left; width:100%; background-color:#f1f3f5;">
            &nbsp;&nbsp;&nbsp;&nbsp;商品名称:
            <asp:TextBox runat="server" ID="productnameTb" Width="100px"></asp:TextBox>
            一级分类:<asp:dropdownlist ID="ddl1" runat="server"></asp:dropdownlist>
            二级分类:<asp:dropdownlist ID="ddl2" runat="server"></asp:dropdownlist>
            <br />
            &nbsp;&nbsp;&nbsp;&nbsp;特&nbsp;&nbsp;&nbsp;&nbsp;价:
            <asp:DropDownList runat="server" ID="specialsddl" Width="107px">
                <asp:ListItem Value="2" Text="是否特价"></asp:ListItem>
                <asp:ListItem Value="1" Text="特价"></asp:ListItem>
                <asp:ListItem Value="0" Text="非特价"></asp:ListItem>
            </asp:DropDownList>
        推&nbsp;&nbsp;&nbsp;&nbsp;荐:<asp:DropDownList runat="server" ID="recommendedddl">
                <asp:ListItem Value="2" Text="是否推荐"></asp:ListItem>
                 <asp:ListItem Value="1" Text="推荐"></asp:ListItem>
                <asp:ListItem Value="0" Text="非推荐"></asp:ListItem>
            </asp:DropDownList>
        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
            <asp:Button runat="server" ID="searchBt" Text="查找" OnClick="searchBt_Click" />
            <input value="添加" type="button" onclick="window.location.href='Add_Product.aspx'" />
            <asp:hiddenfield ID="HF1" runat="server" />
        &nbsp; &nbsp;
        </div>
    </td></tr>
    <tr><td>
    <asp:GridView runat="server" SkinID="admin_gv_skin" ID="productlistGv" AllowPaging="True" AutoGenerateColumns="False" Width="100%" EmptyDataText="暂无相关数据" DataKeyNames="productid" OnPageIndexChanging="productlistGv_PageIndexChanging" OnRowCancelingEdit="productlistGv_RowCancelingEdit" OnRowDeleting="productlistGv_RowDeleting" OnRowEditing="productlistGv_RowEditing" OnSelectedIndexChanged="productlistGv_SelectedIndexChanged" PageSize="20" BackColor="#F1F3F5" OnRowDataBound="productlistGv_RowDataBound">
           <Columns>
               <asp:TemplateField HeaderText="编号">
                   <ItemTemplate>
                       <asp:Label ID="Label1" runat="server" Text='<%# Bind("productid") %>'></asp:Label>
                   </ItemTemplate>
                   <itemstyle HorizontalAlign="Center" />
               </asp:TemplateField>
               <asp:BoundField DataField="productname" HeaderText="商品名称" >
                   <itemstyle HorizontalAlign="Center" />
               </asp:BoundField>
               <asp:TemplateField HeaderText="一级分类">
                   <ItemTemplate>
                      <%#Eval("typename_1") %>
                   </ItemTemplate>
                   <itemstyle HorizontalAlign="Center" />
               </asp:TemplateField>
               <asp:TemplateField HeaderText="二级分类">
                   <ItemTemplate>
                       <%#Eval("typename_2") %>
                   </ItemTemplate>
                   <itemstyle HorizontalAlign="Center" />
               </asp:TemplateField>
               <asp:CheckBoxField HeaderText="推荐" DataField="recommended" >
                   <itemstyle HorizontalAlign="Center" />
               </asp:CheckBoxField>
               <asp:CheckBoxField HeaderText="特价" DataField="specials" >
                   <itemstyle HorizontalAlign="Center" />
               </asp:CheckBoxField>
               <asp:TemplateField HeaderText="编辑">
                   <ItemTemplate>
                       <a href='Edit_Product.aspx?pid=<%#Eval("ProductID") %>' title="编辑">
                           编辑
                       </a>
                   </ItemTemplate>
                   <itemstyle HorizontalAlign="Center" />
               </asp:TemplateField>
               <asp:TemplateField HeaderText="删除" ShowHeader="False">
                   <ItemTemplate>
                       <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete"
                           Text="删除" OnClientClick="return confirm('是否真的删除?')"></asp:LinkButton>
                   </ItemTemplate>
                   <itemstyle HorizontalAlign="Center" />
               </asp:TemplateField>
           </Columns>
        <pagersettings FirstPageText="首页" LastPageText="尾页" Mode="NextPreviousFirstLast"
            NextPageText="下一页" PreviousPageText="上一页" />
        <pagerstyle HorizontalAlign="Center" />
       </asp:GridView>
    </td></tr>
    <tr><td>
    <div style="color:#d6dff7; font-weight:bold; width:100%; height:25px; background-color:#003399;"></div>
    </td></tr>
    </table>
    </form>
</body>
</html>
