<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ProductManage.aspx.cs" Inherits="Admin_Trade_ProductManage" %>

<%@ Register Src="../../Control/PageNo.ascx" TagName="PageNo" TagPrefix="uc1" %>
<!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 id="Head1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>产品库管理</title>
<link rel="stylesheet" href="../skin/style.css" type="text/css" />
<script type="text/javascript" src="../../js/jquery.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div class="itemtitle">
            <h3>
                搜索产品</h3>
        </div>
		<div class="itemtitle_tect">
            <p>
                产品名称：
                <asp:TextBox ID="txtName" runat="server" CssClass="i_text1" Width="130"></asp:TextBox>
                <asp:Button ID="btnSearch" runat="server" Text="立即查询" OnClick="btnSearch_Click" CssClass="i_button" /></p>
        </div>
        <div class="partition">
            <div class="Option">
                <asp:Label ID="Label5" runat="server"><strong>快捷操作</strong></asp:Label>
                <span class="pl"><a href="productAdd.aspx">添加产品</a></span>
            </div>
        </div>
        <div class="clr">
        </div>
        <div class="talbe_border">
            <asp:GridView ID="gvProducts" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
                GridLines="None" CellPadding="0" CssClass="talbe_list" OnRowDataBound="gvProducts_RowDataBound">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server" />
                        </ItemTemplate>
                        <HeaderStyle CssClass="th20 tou" />
                        <ItemStyle CssClass="nolet" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="产品名称">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Name") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemStyle CssClass="left2" />
                        <ItemTemplate>
                            <%# GetNewTitle(DataBinder.Eval(Container.DataItem, "Name").ToString(),Eval("ID").ToString())%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="KeyWord" HeaderText="关键字">
                        <HeaderStyle CssClass="th80" />
                    </asp:BoundField>
                    <asp:BoundField DataField="AddDate" HeaderText="日期">
                        <HeaderStyle CssClass="th80" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Price" HeaderText="靠前价格">
                        <HeaderStyle CssClass="th80" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="操作选项">
                        <ItemTemplate>
                            <a href='ProductEdit.aspx?ID=<%# Eval("ID") %>'>编辑</a> |
                            <asp:LinkButton CommandName="delete" ID="lnkdelete" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID") %>'
                                OnCommand="lnkdelete_Command" runat="server" Text="删除" OnClientClick="return confirm('你确定要删除吗?')"></asp:LinkButton>
                        </ItemTemplate>
                        <HeaderStyle CssClass="th80" />
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle CssClass="header" />
            </asp:GridView>
            <asp:Label ID="lblMessage" runat="server" Text="Label" Visible="False"></asp:Label>
            <div class="Paging">
                <p>
                    <uc1:PageNo ID="PageNo1" runat="server" />
                </p>
                <input id="CheckBox2" name="CheckBox2" onclick="SelectAll();" type="checkbox" />全选
                <asp:Button ID="btnDelete" runat="server" Font-Size="9pt" OnClick="btnDelete_Click"
                    Text="批量删除" CssClass="i_button" />
            </div>
        </div>
    </form>
</body>
</html>
