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

<!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">
    <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">
            <ul>
                <li>通过求购信息管理，您可以进行编辑信息审核、推荐、修改和删除等操作；</li>
            </ul>
        </div>
        <div class="partition">
            <div class="Option">
                <asp:Label ID="Label5" runat="server"><strong>快捷操作</strong></asp:Label>
                <asp:Label ID="Label1" runat="server"><a href="?v=0">所有信息</a></asp:Label>
                <asp:Label ID="Label2" runat="server"><a href="?v=1">已审核信息</a></asp:Label>
                <asp:Label ID="Label3" runat="server"><a href="?v=2">未审核信息</a></asp:Label>
                <asp:Label ID="Label4" runat="server"><a href="?v=3">推荐信息</a></asp:Label>
            </div>
            <div class="search">
                商机标题：
                <asp:TextBox ID="txtTitleName" runat="server" CssClass="i_text1" Width="130"></asp:TextBox>
                <%--   &nbsp;会员名称：<asp:TextBox ID="txtLoginName" runat="server" CssClass="i_text1"></asp:TextBox>--%>
                <asp:Button ID="btnSearch" runat="server" Text="立即查询" OnClick="btnSearch_Click" CssClass="i_button" /></div>
        </div>
        <div class="clr">
        </div>
        <div class="talbe_border">
            <asp:GridView ID="grdPurchase" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
                GridLines="None" CellPadding="0" CssClass="talbe_list" OnRowDataBound="grdPurchase_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" />
                        <HeaderStyle CssClass="th_left" />
                        <ItemTemplate>
                            <%# GetNewTitle(DataBinder.Eval(Container.DataItem, "Name").ToString(),Eval("ID").ToString())%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="会员名称">
                        <HeaderStyle CssClass="th80" />
                        <ItemTemplate>
                            <asp:LinkButton ID="lnbCheckUser" Font-Underline="false" runat="server" CommandName='<%# DataBinder.Eval(Container.DataItem, "UserID") %>'
                                CommandArgument='<%# DataBinder.Eval(Container.DataItem,"IsUser") %>' Text='<%# GetNewName( DataBinder.Eval(Container.DataItem, "LoginName").ToString(),DataBinder.Eval(Container.DataItem, "IsUser").ToString()) %>'
                                OnCommand="lnbCheckUser_Command"></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="状态">
                        <ItemTemplate>
                            <span>
                                <%#  ShowVerify(Eval("Verify").ToString())  %>
                            </span>
                        </ItemTemplate>
                        <HeaderStyle CssClass="th80" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="推荐">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtnUpdateRecommend" Font-Underline="false" runat="server" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID")+"|"+DataBinder.Eval(Container.DataItem, "Recommend") %>'
                                Text='<%# DataBinder.Eval(Container.DataItem, "Recommend").ToString()== "True" ? "推荐" : "不推荐"%>'
                                OnCommand="lbtnUpdateRecommend_Command"></asp:LinkButton>
                        </ItemTemplate>
                        <HeaderStyle CssClass="th80" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="操作选项">
                        <ItemTemplate>
                            <a href='PurchaseEdit.aspx?ID=<%# Eval("ID") %>&UserID=<%# Eval("UserID") %>'>编辑</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>
                    <asp:BoundField DataField="UI_Name" HeaderText="公司名称" Visible="False"></asp:BoundField>
                    <asp:BoundField DataField="IndType" HeaderText="供求类别" Visible="False"></asp:BoundField>
                </Columns>
                <RowStyle CssClass="checkbox" />
                <PagerStyle CssClass="page" />
                <HeaderStyle CssClass="header" Wrap="True" />
            </asp:GridView>
            <asp:Label ID="lblMessage" runat="server" Text="Label" Visible="False"></asp:Label>
            <div class="Paging">
                <p>
                    总记录数：<asp:Label ID="txt_pageCount" runat="server"></asp:Label>
                    页码：<asp:Label ID="txt_begin" runat="server"></asp:Label>/<asp:Label ID="txt_pageAll"
                        runat="server"></asp:Label>
                    <asp:LinkButton ID="txt_pageFirst" runat="server" OnClick="txt_pageFirst_Click">首页</asp:LinkButton>
                    <asp:LinkButton ID="txt_pageLast" runat="server" OnClick="txt_pageLast_Click">上一页</asp:LinkButton>
                    <asp:LinkButton ID="txt_pageNext" runat="server" OnClick="txt_pageNext_Click">下一页</asp:LinkButton>
                    <asp:LinkButton ID="txt_pageFoot" runat="server" OnClick="txt_pageFoot_Click">末页</asp:LinkButton>
                    <asp:TextBox ID="txt_PageNum" runat="server" Width="30px"></asp:TextBox>
                    <asp:LinkButton ID="Lk_go" runat="server" OnClick="Lk_go_Click">GO</asp:LinkButton>
                </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" />
                <asp:Button ID="ButEigible" runat="server" Text="审核通过" CssClass="i_button1" OnClick="ButEigible_Click"
                    OnClientClick="javascript:return confirm('您确定要让该信息通过审核吗？') " />
                <asp:Button ID="ButDisqualification" runat="server" Text="未通过审核" CssClass="i_button1"
                    OnClick="ButDisqualification_Click" OnClientClick="javascript:return confirm('您确定不让该信息通过审核吗？')" />
            </div>
        </div>
    </form>
</body>
</html>
