<%@ page language="C#" autoeventwireup="true" inherits="Admin_Order_Operate_2, ShopNum1Deploy" %>

<%@ Register assembly="ShopNum1.Control" namespace="ShopNum1.Control" tagprefix="cc1" %>

<!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>
    <table style="width:100%">
            <tr>
                <td align="right">
                    <asp:Label ID="LabelName" runat="server" Text="商品名称："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBoxName" runat="server"></asp:TextBox>
                </td>
                <td align="right">
                    <asp:Label ID="LabelProductCategoryID" runat="server" Text="商品分类："></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="DropDownListProductCategoryID" runat="server" CssClass="select1">
                    </asp:DropDownList>
                </td>
                <td align="right">
                    <asp:Label ID="LabelSupplierGuid" runat="server" Text="供应商："></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="DropDownListSupplierGuid" runat="server"  CssClass="select1">
                    </asp:DropDownList>
                </td>
                <td style="width: 42px; height: 25px">
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelRepertoryNumber" runat="server" Text="货&nbsp;&nbsp;号："></asp:Label>
                </td>
                <td >
                    <asp:TextBox ID="TextBoxRepertoryNumber" runat="server"></asp:TextBox>
                </td>
                <td align="right">
                    <asp:Label ID="LabelBrandGuid" runat="server" Text="商品品牌："></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="DropDownListBrandGuid" runat="server"  CssClass="select1">
                    </asp:DropDownList>
                    </td>
                <td align="right">
                    <asp:Label ID="LabelIsReal" runat="server" Text="商品性质："></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="DropDownListIsReal" runat="server"  CssClass="select1">
                    </asp:DropDownList>
                </td>
                <td style="width: 42px; height: 25px">
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelShopPrice" runat="server" Text="本店售价："></asp:Label>
                </td>
                <td colspan="5">
                    <asp:TextBox ID="TextBoxShopPrice1" runat="server"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidatorShopPrice1" 
                            runat="server" ControlToValidate="TextBoxShopPrice1" Display="Dynamic" 
                            ErrorMessage="价格格式不正确" 
                            
                            ValidationExpression="^[0-9]+(.[0-9]{1,3})?$"></asp:RegularExpressionValidator>   
                    -<asp:TextBox ID="TextBoxShopPrice2" runat="server"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidatorShopPrice2" 
                            runat="server" ControlToValidate="TextBoxShopPrice2" Display="Dynamic" 
                            ErrorMessage="价格格式不正确" 
                            
                            ValidationExpression="^[0-9]+(.[0-9]{1,3})?$"></asp:RegularExpressionValidator>
                </td>
                <td style="width: 42px; height: 25px">
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelCostPrice" runat="server" Text="成本价："></asp:Label>
                </td>
                <td colspan="5">
                    <asp:TextBox ID="TextBoxCostPrice1" runat="server"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidatorCostPrice1" 
                            runat="server" ControlToValidate="TextBoxCostPrice1" Display="Dynamic" 
                            ErrorMessage="价格格式不正确" 
                            
                            ValidationExpression="^[0-9]+(.[0-9]{1,3})?$"></asp:RegularExpressionValidator>
                    -<asp:TextBox ID="TextBoxCostPrice2" runat="server"></asp:TextBox>
                         <asp:RegularExpressionValidator ID="RegularExpressionValidatorCostPrice2" 
                            runat="server" ControlToValidate="TextBoxCostPrice2" Display="Dynamic" 
                            ErrorMessage="价格格式不正确" 
                            
                            ValidationExpression="^[0-9]+(.[0-9]{1,3})?$"></asp:RegularExpressionValidator>
                </td>
                <td style="width: 42px; height: 25px">
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelMarketPrice" runat="server" Text="市场价："></asp:Label>
                </td>
                <td colspan="5">
                    <asp:TextBox ID="TextBoxMarketPrice1" runat="server"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidatorMarketPrice1" 
                            runat="server" ControlToValidate="TextBoxMarketPrice1" Display="Dynamic" 
                            ErrorMessage="价格格式不正确" 
                            
                            ValidationExpression="^[0-9]+(.[0-9]{1,3})?$"></asp:RegularExpressionValidator>
                    -<asp:TextBox ID="TextBoxMarketPrice2" runat="server"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidatorMarketPrice2" 
                            runat="server" ControlToValidate="TextBoxMarketPrice2" Display="Dynamic" 
                            ErrorMessage="价格格式不正确" 
                            
                            ValidationExpression="^[0-9]+(.[0-9]{1,3})?$"></asp:RegularExpressionValidator>
                </td>
                <td style="width: 42px; height: 25px">
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelRepertoryCount" runat="server" Text="库存量："></asp:Label>
                </td>
                <td colspan="5">
                    <asp:TextBox ID="TextBoxRepertoryCount1" runat="server"></asp:TextBox>
                     <asp:RegularExpressionValidator ID="RegularExpressionValidatorRepertoryCount1" 
                            runat="server" ControlToValidate="TextBoxRepertoryCount1" Display="Dynamic" 
                            ErrorMessage="只能输入数字" 
                            
                            ValidationExpression="^[0-9]*$"></asp:RegularExpressionValidator>
                    -<asp:TextBox ID="TextBoxRepertoryCount2" runat="server"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorRepertoryCount2" 
                        runat="server" ControlToValidate="TextBoxRepertoryCount2" ErrorMessage="只能输入数字" 
                        ValidationExpression="^[0-9]*$"></asp:RegularExpressionValidator>
                </td>
                <td style="width: 42px; height: 25px">
                    <asp:Button ID="ButtonSearch" runat="server" 
                        onclick="ButtonSearch_Click" Text="查询" CssClass="bt2" />
                </td>
            </tr>
            </table>
&nbsp;<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="" 
                                Font-Size="Small" 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:BoundField DataField="RepertoryNumber" HeaderText="货号" 
                        SortExpression="RepertoryNumber" />
                    <asp:BoundField HeaderText="库存" DataField="RepertoryCount" 
                        SortExpression="RepertoryCount"></asp:BoundField>
                    <asp:BoundField DataField="CostPrice" HeaderText="成本价" 
                        SortExpression="CostPrice"></asp:BoundField>
                    <asp:BoundField DataField="MarketPrice" HeaderText="市场价" 
                        SortExpression="MarketPrice"></asp:BoundField>
                    <asp:BoundField DataField="ShopPrice" HeaderText="本店售价" 
                        SortExpression="ShopPrice"></asp:BoundField>     
                            </Columns>
            </cc1:Num1GridView>
                        </td>
                    </tr>
                       <tr>
                        <td align="left">
                        <div class="vote">
                        <asp:Button ID="ButtonAdd" runat="server" onclick="ButtonAdd_Click" 
                                onclientclick="return CheckAddProduct()" Text="加入订单" 
                                CausesValidation="False" CssClass="bt3" />
                            &nbsp;<asp:Button ID="ButtonNext" runat="server" onclick="ButtonNext_Click" 
                                Text="下一步" CausesValidation="False" CssClass="bt2" />
                            &nbsp;
                            <asp:Button ID="ButtonCancel" runat="server" Text="取消" 
                                onclick="ButtonCancel_Click" CssClass="bt2" CausesValidation="False" />
                           &nbsp;<asp:Button ID="ButtonEditAddCart" runat="server" 
                             onclick="ButtonEditAddCart_Click" Text="加入订单" Visible="False" 
                                onclientclick="return CheckAddProduct()" CssClass="bt3" 
                                CausesValidation="False" />
&nbsp;<asp:Button ID="ButtonEditNext" runat="server" onclick="ButtonEditNext_Click" 
                                Text="下一步" CausesValidation="False" Visible="False" CssClass="bt3" />
                            &nbsp; <asp:Button ID="ButtonCancelEdit" runat="server" 
                                onclick="ButtonCancelEdit_Click" Text="取消编辑" 
                             Visible="False" CssClass="bt3" CausesValidation="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="hiddenFieldProductGuids" runat="server" />
    <asp:HiddenField ID="hiddenFieldMemloginID" runat="server" Value="0" />
        <asp:ObjectDataSource ID="ObjectDataSourceData" runat="server" 
            SelectMethod="Search" TypeName="ShopNum1.BusinessLogic.ShopNum1_Product_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="DropDownListBrandGuid" Name="brandGuid" 
                    PropertyName="SelectedValue" Type="String" />
                <asp:ControlParameter ControlID="DropDownListSupplierGuid" Name="supplierGuid" 
                    PropertyName="SelectedValue" Type="String" />
                <asp:ControlParameter ControlID="DropDownListIsReal" Name="isReal" 
                    PropertyName="SelectedValue" Type="Int32" />
                <asp:Parameter DefaultValue="1" Name="isSaled" Type="Int32" />
                <asp:ControlParameter ControlID="TextBoxShopPrice1" Name="shopPrice1" 
                    PropertyName="Text" Type="Decimal" />
                <asp:ControlParameter ControlID="TextBoxShopPrice2" Name="shopPrice2" 
                    PropertyName="Text" Type="Decimal" />
                <asp:ControlParameter ControlID="TextBoxCostPrice1" Name="costPrice1" 
                    PropertyName="Text" Type="Decimal" />
                <asp:ControlParameter ControlID="TextBoxCostPrice2" Name="costPrice2" 
                    PropertyName="Text" Type="Decimal" />
                <asp:ControlParameter ControlID="TextBoxMarketPrice1" Name="marketPrice1" 
                    PropertyName="Text" Type="Decimal" />
                <asp:ControlParameter ControlID="TextBoxMarketPrice2" Name="marketPrice2" 
                    PropertyName="Text" Type="Decimal" />
                <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>