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

<%@ Register Assembly="GroupFly.Control" Namespace="GroupFly.Control" TagPrefix="cc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="China315" %>
<%@ Register Src="UserControl/MessageShow.ascx" TagName="MessageShow" TagPrefix="China315" %>
<!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>
    <link rel="stylesheet" type="text/css" href="style/index.css" />
    <link type="text/css" rel="Stylesheet" href="../css/index.css" />

    <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>

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

</head>
<body>
    <form id="form1" runat="server">
    <div class="main">
        <div class="table1">
            <div class="title">
                <asp:Label ID="LabelTitle" runat="server" Text="产品管理"></asp:Label>
            </div>
            <div class="query">
                <table cellpadding="0" cellspacing="1" style="width: 100%">
                    <tr>
                        <td style="text-align: right">
                            <asp:Localize ID="Localize1" runat="server" Text="商品名称："></asp:Localize>
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxName" runat="server" CssClass="allinput1"></asp:TextBox>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidatorTextBoxName" runat="server"
                                ControlToValidate="TextBoxName" Display="Dynamic" ErrorMessage="最多50个字符" ValidationExpression="^[\s\S]{0,50}$"></asp:RegularExpressionValidator>
                        </td>
                        <td style="text-align: right">
                            <asp:Localize ID="Localize2" runat="server" Text="库存编号："></asp:Localize>
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxRepertoryNumber" runat="server" CssClass="allinput1"></asp:TextBox>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidatorTextBoxRepertoryNumber"
                                runat="server" ControlToValidate="TextBoxRepertoryNumber" Display="Dynamic" ErrorMessage="最多50个字符"
                                ValidationExpression="^[\s\S]{0,50}$"></asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right">
                            <asp:Localize ID="Localize3" runat="server" Text="商品分类："></asp:Localize>
                        </td>
                        <td>
                            <asp:DropDownList ID="DropDownListProductCategoryID" runat="server" CssClass="select1">
                            </asp:DropDownList>
                        </td>
                        <td style="text-align: right">
                            <asp:Localize ID="Localize4" runat="server" Text="价格范围："></asp:Localize>
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxShopPrice1" runat="server" CssClass="allinput1"></asp:TextBox>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidatorCostPrice1" runat="server"
                                ControlToValidate="TextBoxShopPrice1" Display="Dynamic" ErrorMessage="价格格式不正确"
                                ValidationExpression="^[0-9]+(.[0-9]{1,3})?$"></asp:RegularExpressionValidator>-<asp:TextBox
                                    ID="TextBoxShopPrice2" runat="server" CssClass="allinput1"></asp:TextBox>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidatorCostPrice2" runat="server"
                                ControlToValidate="TextBoxShopPrice2" Display="Dynamic" ErrorMessage="价格格式不正确"
                                ValidationExpression="^[0-9]+(.[0-9]{1,3})?$"></asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right">
                            <asp:Localize ID="Localize5" runat="server" Text="状态："></asp:Localize>
                        </td>
                        <td>
                            <asp:DropDownList ID="DropDownListIsSaled" runat="server">
                            </asp:DropDownList>
                        </td>
                        <td colspan="2" style="text-align: center;">
                            <asp:Button ID="ButtonQuery" runat="server" Text="查询" CssClass="bnt1" OnClick="ButtonQuery_Click" />
                        </td>
                    </tr>
                </table>
            </div>
            <cc1:GroupFlyGridView ID="GroupFlyGridViewShow" runat="server" Width="100%" AddSequenceColumn="False"
                AllowMultiColumnSorting="False" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
                BorderColor="#CCDDEF" BorderStyle="Solid" BorderWidth="0px" CellPadding="4" Del="False"
                DeletePromptText="确实要删除指定的记录吗？" Edit="False" FixHeader="False" GridViewSortDirection="Ascending"
                PagingStyle="None" TableName="" DataSourceID="ObjectDataSourceDate" GridLines="None"
                CellSpacing="1" Style="margin-left: 0px;">
                <HeaderStyle HorizontalAlign="Center" BackColor="#6699CC" Font-Bold="True" ForeColor="White">
                </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" value='<%# Eval("Guid") %>' type="checkbox" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="商品名称" DataField="Name" />
                    <asp:BoundField HeaderText="商品分类" DataField="CategroyName" />
                    <asp:BoundField HeaderText="价格" DataField="ShopPrice" />
                    <asp:TemplateField HeaderText="产品状态">
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# ShowIsSaled(Eval("IsSaled").ToString()) %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="商品排序" DataField="OrderID" />
                </Columns>
            </cc1:GroupFlyGridView>
        </div>
    </div>
    <div class="vote">
        <asp:Button ID="ButtonAdd" runat="server" CausesValidation="False" CssClass="bnt1 cancel "
            Text="添加" OnClientClick="return GetCheckedBoxValues()" OnClick="ButtonAdd_Click" />
        <asp:Button ID="ButtonEdite" runat="server" CausesValidation="False" CssClass="bnt1 cancel "
            Text="编辑" OnClientClick="return EditButton()" OnClick="ButtonEdite_Click" />
        <asp:Button ID="ButtonDelete" runat="server" CausesValidation="False" CssClass="bnt1 cancel "
            Text="删除" OnClientClick="return DeleteButton()" OnClick="ButtonDelete_Click" />
        <China315:MessageShow ID="MessageShow" Visible="false" runat="server" />
    </div>
    <asp:ObjectDataSource ID="ObjectDataSourceDate" runat="server" SelectMethod="SearchProduct"
        TypeName="GroupFly.ProduceBusinessLogic.GroupFlyProduce_Product_Action" 
        OldValuesParameterFormatString="original_{0}">
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBoxName" Name="name" PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxRepertoryNumber" Name="RepertoryNumber" PropertyName="Text"
                Type="String" />
            <asp:ControlParameter ControlID="DropDownListProductCategoryID" Name="ProductCategoryID"
                PropertyName="SelectedValue" Type="String" />
            <asp:ControlParameter ControlID="TextBoxShopPrice1" Name="ShopPrice1" PropertyName="Text"
                Type="String" />
            <asp:ControlParameter ControlID="TextBoxShopPrice2" Name="ShopPrice2" PropertyName="Text"
                Type="String" />
            <asp:ControlParameter ControlID="DropDownListIsSaled" Name="IsSaled" PropertyName="SelectedValue"
                Type="String" />
            <asp:Parameter Name="isDeleted" Type="Int32" DefaultValue="0" />
            <asp:ControlParameter ControlID="ProduceMemLoginID" Name="ProduceMemLoginID" 
                PropertyName="Value" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
    <asp:HiddenField ID="ProduceMemLoginID" runat ="server" Value ="0" />
    </form>
</body>
</html>
