<%@ page language="C#" autoeventwireup="true" inherits="Score_Product_List, GroupTGWeb_deploy" %>

<%@ Register Assembly="ShopNum1.Control" Namespace="ShopNum1.Control" TagPrefix="cc1" %>
<%@ Register Src="UserControl/MessageShow.ascx" TagName="MessageShow" TagPrefix="ShopNum1" %>
<!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">
    <title>Untitled Page</title>
    <link type="text/css" rel="Stylesheet" href="css/index.css" />

    <script type="text/javascript" language="javascript" src="../js/CommonJS.js"></script>

</head>
<body style="padding: 0; background-image: url(images/Bg_right.gif); background-repeat: repeat;">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <%--<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>--%>
    <div class="navigator">
        【积分商品列表 】</div>
    <div class="query">
        <table style="width: 100%" cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td align="right" style="width:10%">
                    <asp:Label ID="LabelName" runat="server" Text="商品名称："></asp:Label>
                </td>
                <td style="width:30%">
                    <asp:TextBox ID="TextBoxName" runat="server" CssClass="input1"></asp:TextBox>
                </td>                
                <td align="right" style="width:10%">
                    <asp:Label ID="LabelProductCategoryID" runat="server" Text="商品分类："></asp:Label>
                </td>
                <td style="width:10%">
                    <asp:DropDownList ID="DropDownListProductCategoryID" runat="server" CssClass="select1">
                    </asp:DropDownList>
                </td>
                
                <td align="right" style="width:10%">
                    <asp:Label ID="LabelIsRecommend" runat="server" Text="是否推荐："></asp:Label>
                </td>
                <td style="width:10%">
                    <asp:DropDownList ID="DropDownListIsRecommend" runat="server" CssClass="select1">
                        <asp:ListItem Value="-1">-全部-</asp:ListItem>
                        <asp:ListItem Value="1">是</asp:ListItem>
                        <asp:ListItem Value="0">否</asp:ListItem>
                    </asp:DropDownList>
                </td>
                
                <td rowspan="3" align="center" style="width:20%" >
                <asp:Button ID="ButtonSearch" runat="server" OnClick="ButtonSearch_Click" Text="查询"
                        CssClass="bt2" />
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelRepertoryNumber" runat="server" Text="货号："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBoxRepertoryNumber" runat="server" CssClass="input1"></asp:TextBox>
                </td>              
                <td align="right">
                    <asp:Label ID="LabelIsHot" runat="server" Text="是否热销："></asp:Label>
                    <div style="display: none">
                        <asp:Label ID="LabelIsReal" runat="server" Text="商品性质："></asp:Label>
                        <asp:DropDownList ID="DropDownListIsReal" runat="server" CssClass="select1">
                        </asp:DropDownList>
                    </div>
                </td>
                <td>
                    <asp:DropDownList ID="DropDownListIsHot" runat="server" CssClass="select1">
                        <asp:ListItem Value="-1">-全部-</asp:ListItem>
                        <asp:ListItem Value="1">是</asp:ListItem>
                        <asp:ListItem Value="0">否</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td align="right">
                    <asp:Label ID="LabelIsBest" runat="server" Text="是否精品："></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="DropDownListIsBest" runat="server" CssClass="select1">
                        <asp:ListItem Value="-1">-全部-</asp:ListItem>
                        <asp:ListItem Value="1">是</asp:ListItem>
                        <asp:ListItem Value="0">否</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelRepertoryCount" runat="server" Text="库存量："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBoxRepertoryCount1" MaxLength="9" runat="server" CssClass="input1"
                        onchange="checkFirstToSecond(this.id)"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorRepertoryCount1" runat="server"
                        ControlToValidate="TextBoxRepertoryCount1" ErrorMessage="只能输入数字" ValidationExpression="^[0-9]*$"
                        Display="Dynamic"></asp:RegularExpressionValidator>-
                    <asp:TextBox ID="TextBoxRepertoryCount2" MaxLength="9" runat="server" CssClass="input1"
                        onchange="checkSecondToFirst(this.id)"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorRepertoryCount2" runat="server"
                        ControlToValidate="TextBoxRepertoryCount2" ErrorMessage="只能输入数字" ValidationExpression="^[0-9]*$"
                        Display="Dynamic"></asp:RegularExpressionValidator>
                    <%--<asp:CompareValidator ID="RegularExpressionValidatorTextBoxRepertoryCount2" runat="server" ControlToValidate="TextBoxRepertoryCount2"
                            Display="Dynamic" ErrorMessage="开始库存量应当多余末尾库存量" Operator="GreaterThan" Type="Date"
                            ControlToCompare="TextBoxRepertoryCount1"></asp:CompareValidator>--%>
                </td>
                <td align="right">
                    <asp:Label ID="LabelIsNew" runat="server" Text="是否新品："></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="DropDownListIsNew" runat="server" CssClass="select1">
                        <asp:ListItem Value="-1">-全部-</asp:ListItem>
                        <asp:ListItem Value="1">是</asp:ListItem>
                        <asp:ListItem Value="0">否</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td align="right">
                    <asp:Label ID="LabelIsSaled" runat="server" Text="是否上架："></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="DropDownListIsSaled" runat="server" CssClass="select1">
                        <asp:ListItem Value="-1">-全部-</asp:ListItem>
                        <asp:ListItem Value="1">已上架</asp:ListItem>
                        <asp:ListItem Value="0">未上架</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>                    
        </table>
    </div>
    <table style="width: 100%">
        <tr>
            <td align="left">
                <cc1:Num1GridView ID="Num1GridViewShow" runat="server" AutoGenerateColumns="False"
                    AllowPaging="True" AllowSorting="True" AscendingImageUrl="~/images/SortAsc.gif"
                    DescendingImageUrl="~/images/SortDesc.gif" Width="100%" AddSequenceColumn="False"
                    AllowMultiColumnSorting="False" BorderColor="#CCDDEF" BorderStyle="Solid" BorderWidth="1px"
                    CellPadding="4" Del="False" DeletePromptText="确实要删除指定的记录吗？" Edit="False" FixHeader="False"
                    GridViewSortDirection="Ascending" PagingStyle="None" Style="margin-left: 2px;"
                    TableName="" DataSourceID="ObjectDataSourceData">
                    <HeaderStyle HorizontalAlign="Center" BackColor="#6699CC" Font-Bold="True" ForeColor="#FFFFFF">
                    </HeaderStyle>
                    <PagerStyle HorizontalAlign="Left" BackColor="#EEEEEE" ForeColor="#6699CC"></PagerStyle>
                    <Columns>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <input id="checkboxAll" onclick="javascript:SelectAllCheckboxes(this);" type="checkbox" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%--                   <input ID="checkboxItem"   onclick="GetItmeValue(this)" type="checkbox" />--%>
                                <input id="checkboxItem" value='<%# Eval("Guid") %>' type="checkbox" />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" Width="30px" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="Guid" HeaderText="Guid" Visible="False" />
                        <%-- <asp:BoundField DataField="Name" HeaderText="商品名称" SortExpression="Name" />--%>
                        <asp:TemplateField HeaderText="商品名称" SortExpression="Name">
                            <ItemTemplate>
                                <a href='<%# "ScoreProduct_Operate.aspx?Guid="+Eval("Guid")%>'>
                                    <asp:Label ID="Label6" runat="server" Text='<%# Eval("Name") %>'></asp:Label></a>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="RepertoryNumber" HeaderText="货号" SortExpression="RepertoryNumber" />
                        <asp:BoundField HeaderText="库存" DataField="RepertoryCount" SortExpression="RepertoryCount">
                        </asp:BoundField>
                        <asp:BoundField DataField="ExchangeScore" HeaderText="兑换积分" SortExpression="ExchangeScore">
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="上架" SortExpression="IsSaled">
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# ChangeIsSaled(DataBinder.Eval(Container, "DataItem(IsSaled)","{0}")) %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Font-Bold="True" Font-Size="Large" ForeColor="Red" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="新品" SortExpression="IsNew">
                            <ItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# ChangeIsNew(DataBinder.Eval(Container, "DataItem(IsNew)","{0}")) %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Font-Bold="True" Font-Size="Large" ForeColor="Red" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="精品" SortExpression="IsBest">
                            <ItemTemplate>
                                <asp:Label ID="Label3" runat="server" Text='<%# ChangeIsBest(DataBinder.Eval(Container, "DataItem(IsBest)","{0}")) %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Font-Bold="True" Font-Size="Large" ForeColor="Red" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="热兑" SortExpression="IsHot">
                            <ItemTemplate>
                                <asp:Label ID="Label4" runat="server" Text='<%# ChangeIsHot(DataBinder.Eval(Container, "DataItem(IsHot)","{0}")) %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Font-Bold="True" Font-Size="Large" ForeColor="Red" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="推荐" SortExpression="IsRecommend">
                            <ItemTemplate>
                                <asp:Label ID="Label5" runat="server" Text='<%# ChangeIsRecommend(DataBinder.Eval(Container, "DataItem(IsRecommend)","{0}")) %>'>
                                </asp:Label>
                            </ItemTemplate>
                            <ItemStyle Font-Bold="True" Font-Size="Large" ForeColor="Red" />
                        </asp:TemplateField>
                    </Columns>
                </cc1:Num1GridView>
            </td>
        </tr>
        <tr>
            <td align="left">
                <div class="vote">
                    <asp:Button ID="ButtonAdd" runat="server" OnClick="ButtonAdd_Click" OnClientClick="GetCheckedBoxValues()"
                        Text="添加" CausesValidation="False" CssClass="bt2" />
                    <asp:Button ID="ButtonEdit" runat="server" OnClick="ButtonEdit_Click" OnClientClick="return EditButton()"
                        Text="编辑" CausesValidation="False" CssClass="bt2" />
                    <asp:Button ID="ButtonDelete" runat="server" OnClick="ButtonDelete_Click" OnClientClick="if(Page_ClientValidate()) return DeleteButton();return false;"
                        Text="删除" CausesValidation="False" CssClass="bt2" />
                    <asp:DropDownList ID="DropDownListOperate" runat="server" Width="80">
                        <asp:ListItem Value="-1">-请选择操作-</asp:ListItem>                        
                        <asp:ListItem Value="IsSaled;1">上架</asp:ListItem>                        
                        <asp:ListItem Value="IsNew;1">新品</asp:ListItem>
                        <asp:ListItem Value="IsBest;1">精品</asp:ListItem>
                        <asp:ListItem Value="IsHot;1">热兑</asp:ListItem>
                        <asp:ListItem Value="IsRecommend;1">推荐</asp:ListItem>
                        <asp:ListItem Value="-2">-----------</asp:ListItem>
                        <asp:ListItem Value="IsSaled;0">下架</asp:ListItem>                        
                        <asp:ListItem Value="IsNew;0">取消新品</asp:ListItem>
                        <asp:ListItem Value="IsBest;0">取消精品</asp:ListItem>
                        <asp:ListItem Value="IsHot;0">取消热兑</asp:ListItem>
                        <asp:ListItem Value="IsRecommend;0">取消推荐</asp:ListItem>                        
                        <%--<asp:ListItem Value="-3">----</asp:ListItem> --%>
                    </asp:DropDownList>
                    <asp:Button ID="ButtonOperate" runat="server" Text="执行操作" OnClick="ButtonOperate_Click"
                        OnClientClick="if(Page_ClientValidate()) return EditsButton();return false;"
                        CssClass="bt3" />
                    <asp:Button ID="Button2" runat="server" Text="查看商品评论" CssClass="bt3" Visible="false" />
                    <ShopNum1:MessageShow ID="MessageShow" runat="server" Visible="False" />
                </div>
            </td>
        </tr>
    </table>
    <%--                   <input ID="checkboxItem"   onclick="GetItmeValue(this)" type="checkbox" />--%><br />
    <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
    <asp:HiddenField ID="HiddenFieldMember" runat="server" Value="0" />
    <asp:ObjectDataSource ID="ObjectDataSourceData" runat="server" SelectMethod="Search"
        TypeName="ShopNum1.BusinessLogic.ShopNum1_ScoreProduct_Action">
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBoxName" Name="productName" PropertyName="Text"
                Type="String" />
            <asp:ControlParameter ControlID="TextBoxRepertoryNumber" Name="repertoryNumber" PropertyName="Text"
                Type="String" />
            <asp:ControlParameter ControlID="DropDownListProductCategoryID" Name="productCategoryID"
                PropertyName="SelectedValue" Type="Int32" />
            <asp:ControlParameter ControlID="DropDownListIsReal" Name="isReal" PropertyName="SelectedValue"
                Type="Int32" />
            <asp:ControlParameter ControlID="DropDownListIsSaled" Name="isSaled" PropertyName="SelectedValue"
                Type="Int32" />
            <asp:ControlParameter ControlID="DropDownListIsBest" Name="isBest" PropertyName="SelectedValue"
                Type="Int32" />
            <asp:ControlParameter ControlID="DropDownListIsNew" Name="isNew" PropertyName="SelectedValue"
                Type="Int32" />
            <asp:ControlParameter ControlID="DropDownListIsHot" Name="isHot" PropertyName="SelectedValue"
                Type="Int32" />
            <asp:ControlParameter ControlID="DropDownListIsRecommend" Name="isRecommend" PropertyName="SelectedValue"
                Type="Int32" />
            <asp:ControlParameter ControlID="TextBoxRepertoryCount1" Name="repertoryCount1" PropertyName="Text"
                Type="Int32" />
            <asp:ControlParameter ControlID="TextBoxRepertoryCount2" Name="repertoryCount2" PropertyName="Text"
                Type="Int32" />
            <asp:Parameter DefaultValue="0" Name="isDeleted" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    </form>
</body>
</html>
