<%@ page language="C#" masterpagefile="~/HL_Admin/AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_ShopRequest, HoWaveVGO" title="求购后台管理" enableviewstate="false" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"/>
  <table class="adminheading">
       <tr>
          <th valign="middle" class="menus" align="left">求购管理</th>
          <td align="right">
              
         </td>       
    </tr>
 </table>

         <table class="nick">
            <tr>
              <td colspan="4" class="tit">快速查找：</td></tr>
              <td class="ltd">卖家用户名称：</td>
              <td class="rtd" style="width:35%"><asp:TextBox ID="TextBox1" runat="server" AutoPostBack="True" />
                        <asp:DropDownList ID="DropUserID" runat="server" AppendDataBoundItems="True" AutoPostBack="True"
                            DataSourceID="ObjectDataSource2" DataTextField="username" DataValueField="userid" EnableViewState="true">
                            <asp:ListItem Value="-1">所有</asp:ListItem>
                        </asp:DropDownList></td>
              <td class="ltd">类别：</td>
              <td class="rtd" style="width:35%"><asp:DropDownList ID="DropClassid" runat="server" AppendDataBoundItems="True"
                            DataSourceID="ObjectDataSource1" DataTextField="ClassName" DataValueField="ClassID" AutoPostBack="True" EnableViewState="true">
                            <asp:ListItem Value="-1">所有</asp:ListItem>
                        </asp:DropDownList></td>
                        </tr><tr>
              <td class="ltd"> 求购物名称：</td>
              <td class="rtd" style="width:35%"><asp:TextBox ID="Txtproductname" runat="server" AutoPostBack="True"/>
              <td class="ltd">类型：</td>
              <td class="rtd" style="width:35%">
              <asp:DropDownList ID="RadioRequestType" runat="server" AutoPostBack="True" EnableViewState="true" >
                            <asp:ListItem Selected="True">所有</asp:ListItem>
                            <asp:ListItem Value="0">求购中</asp:ListItem>
                            <asp:ListItem Value="1">已过期</asp:ListItem>
                        </asp:DropDownList>  
               </td>
            </tr>
         </table> <br />     
<%--            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
              <ContentTemplate>--%>
                <asp:GridView id="GridView1" runat="server" CssClass="adminlist" DataSourceID="ObjectDataSource3" AutoGenerateColumns="False" AllowPaging="True" PageSize="20" EnableViewState="false" >
                   <Columns>
                        <asp:TemplateField HeaderText="选择">
                           <ItemTemplate>
                              <input type="checkbox" name="chk_id" value='<%# Eval("RequestID") %>' />                         
                           </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="RequestID" HeaderText="编号"/>
                        <asp:TemplateField HeaderText="名称">
                            <ItemTemplate>
                                <A href='../shop/auction/request_item_detail.aspx?RequestID=<%#Eval("Requestid") %>' target="_blank"><asp:Label id="RequestTitle" runat="server" Text='<%# Bind("RequestTitle") %>' __designer:wfdid="w1"></asp:Label></A> 
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="EndDate" HeaderText="结束日期"/>
                        <asp:TemplateField HeaderText="求购者">
                            <ItemTemplate>
                               <asp:Literal ID="UserName" Text='<%#Eval("UserName") %>' runat="server"/>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="Remark" HeaderText="备注"/>
                        <asp:BoundField DataField="Price" HeaderText="价格"/>
                        <asp:BoundField DataField="RequestPlace" HeaderText="地区"/>
                   </Columns>
                   <EmptyDataTemplate>
                       <table width="100%">
                          <tr>
                             <th>选择</th>
                             <th>编号</th>
                             <th>名称</th>
                             <th>结束日期</th>
                             <th>求购者</th>
                             <th>备注</th>
                             <th>价格</th>
                             <th>价格</th>
                          </tr>
                       </table>
                   </EmptyDataTemplate>
                </asp:GridView> 
                
<%--</ContentTemplate>
                 <Triggers>
<asp:AsyncPostBackTrigger ControlID="DropClassid" EventName="SelectedIndexChanged"></asp:AsyncPostBackTrigger>
<asp:AsyncPostBackTrigger ControlID="Txtproductname" EventName="TextChanged"></asp:AsyncPostBackTrigger>
<asp:AsyncPostBackTrigger ControlID="RadioRequestType" EventName="SelectedIndexChanged"></asp:AsyncPostBackTrigger>
<asp:AsyncPostBackTrigger ControlID="DropUserID" EventName="SelectedIndexChanged"></asp:AsyncPostBackTrigger>
<asp:AsyncPostBackTrigger ControlID="butDel" EventName="Click"></asp:AsyncPostBackTrigger>
</Triggers>
                </asp:UpdatePanel>--%>
        <div class="div_btm">
           <asp:Button ID="butDel" runat="server" OnClick="butDel_Click" Text="删除" />
        </div>
        
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetAllClass"
                    TypeName="Shop_Class"/>
        <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" OldValuesParameterFormatString="original_{0}"
            SelectMethod="GetUserLikeUserName" TypeName="UserBLL">
            <SelectParameters>
                <asp:ControlParameter ControlID="TextBox1" Name="UserName" PropertyName="Text" Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>        
        <asp:ObjectDataSource ID="ObjectDataSource3" runat="server" SelectMethod="GetGetRequestListBySQL"
            TypeName="Shop_Request" UpdateMethod="UpdateRequest">
            <UpdateParameters>
                <asp:Parameter Name="ProductName" Type="String" />
                <asp:Parameter Name="ProductClassID" Type="Int32" />
                <asp:Parameter Name="ProductIntro" Type="String" />
                <asp:Parameter Name="ImageUrl" Type="String" />
                <asp:Parameter Name="Place" Type="String" />
                <asp:Parameter Name="Price" Type="Decimal" />
                <asp:Parameter Name="ValidDay" Type="Int32" />
                <asp:Parameter Name="Remark" Type="String" />
                <asp:Parameter Name="ProductNumber" Type="Int32" />
                <asp:Parameter Name="RequestType" Type="Int32" />
                <asp:Parameter Name="EnableRequest" Type="Int32" />
                <asp:Parameter Name="pUnit" Type="String" />
                <asp:Parameter Name="RequestID" Type="Int32" />
            </UpdateParameters>
            <SelectParameters>
                <asp:Parameter Name="OrderBy" Type="String" />
                <asp:ControlParameter ControlID="DropClassid" DefaultValue="-1" Name="ClassID" PropertyName="SelectedValue"
                    Type="String" />
                <asp:Parameter DefaultValue="" Name="Place" Type="String" />
                <asp:ControlParameter ControlID="DropUserID" DefaultValue="-1" Name="UserID" PropertyName="SelectedValue"
                    Type="String" />
                <asp:ControlParameter ControlID="RadioRequestType" DefaultValue="所有" Name="RequestType"
                    PropertyName="SelectedValue" Type="String" />
                <asp:ControlParameter ControlID="Txtproductname" DefaultValue="" Name="ProductName"
                    PropertyName="Text" Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>           
</asp:Content>

