<%@ Page language="c#" Codebehind="Product.aspx.cs" AutoEventWireup="false" Inherits="wqeshop.Admin.Product" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Product</title>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="inc/style.css" type="text/css" rel="stylesheet">
<script language="javascript" src="../inc/overlib.js"></script>
<script language="javascript">
			function CheckSort(obj)
			{
				document.getElementById(obj).value = document.getElementById(obj).value.replace(/\D/g,"");
				if(Number(document.getElementById(obj).value)<1 || document.getElementById(obj).value=="")
				{
					document.getElementById(obj).value = "";
				}
			}
			function CheckMoney(obj)
			{
				document.getElementById(obj).value = document.getElementById(obj).value.replace(/[^\d\.]/g,'');
				if(Number(document.getElementById(obj).value)<1 || document.getElementById(obj).value=="")
				{
					document.getElementById(obj).value = "";
				}
			}
			
		</script>
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
  <table width="100%" height="550" style="border:1px #619ADF solid; border-left:0;margin-top:6px; margin-right:7px;background:#F2F7FD;" cellspacing="0" cellpadding="0">
    <tr>
      <td valign="top"><div class="top">
          <table width="100%" align="center" cellspacing="0" cellpadding="0">
            <tr>
              <td class="tl"></td>
              <td class="tm"><span class="tt">商品管理</span></td>
              <td class="tm2"><span class="tt"><a href="http://www.wangqi.com" target="_blank"><img src="Images/admin_help.gif" border="0" alt="帮助"></a></span></td>
              <td class="tr"></td>
            </tr>
          </table>
        </div>
        <div class="mframe">
          <table width="100%" align="center" cellspacing="0" cellpadding="0">
            <tr>
              <td class="tl"></td>
              <td class="tm"><div class="tt">&nbsp; 商品管理</div></td>
              <td class="tr"></td>
            </tr>
          </table>
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td class="ml"></td>
              <td  class="mm" bgcolor="#EBF3FE" valign="top" style=" border-right:1px #77ABE5 solid;"><table class="tableBorder" cellSpacing="0" cellPadding="0" width="98%" align="center" border="0">
                  <tr>
                    <td><asp:Button ID="btnDelete" Runat=server Text="删除商品"></asp:Button>
                      <asp:Button ID="btnSavePrice" Runat=server Text="修改价格"></asp:Button>
                      <asp:Button ID="btnSaveSort" Runat=server Text="修改排序"></asp:Button>
                    </td>
                    <td align="center">搜索：
                      <asp:TextBox id="txtKeyword" runat="server"></asp:TextBox>
                      <asp:DropDownList id="ddlCategory" runat="server"></asp:DropDownList>
                      <asp:Button id="btnSearch" runat="server" Text="GO"></asp:Button></td>
                  </tr>
                  <tr>
                    <td height="23" class="forumRowHighlight" colspan=2><asp:datagrid id="dgProductList" runat="server" AllowPaging="false" PageSize="15" PagerStyle-Mode="NumericPages"
							AutoGenerateColumns="False" DataKeyField="ProductID" Width="100%" HorizontalAlign="Center"
							HeaderStyle-CssClass="summary-title">
                        <HeaderStyle Font-Bold="True"></HeaderStyle>
                        <Columns>
                        <asp:TemplateColumn>
                          <HeaderTemplate>
                            <asp:CheckBox id="chkAll" runat="server"></asp:CheckBox>
                          </HeaderTemplate>
                          <ItemTemplate>
                            <asp:CheckBox id="chkItem" runat="server"></asp:CheckBox>
                          </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:TemplateColumn HeaderText="商品名称">
                          <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
                          <ItemStyle HorizontalAlign="Left"></ItemStyle>
                          <ItemTemplate> <%# DataBinder.Eval(Container.DataItem, "Name") %> </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:TemplateColumn HeaderText="市场价格">
                          <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
                          <ItemStyle HorizontalAlign="Left" Width="60px"></ItemStyle>
                          <ItemTemplate>
                            <input name="marketPrice<%# Container.ItemIndex+1%>" type="text" class="inputstyle" id="marketPrice<%# Container.ItemIndex+1%>" value='<%# DataBinder.Eval(Container.DataItem, "MarketPrice") %>' size="9" maxlength="10" onKeyUp="CheckMoney('marketPrice<%# Container.ItemIndex+1%>')"/>
                          </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:TemplateColumn HeaderText="会员价格">
                          <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
                          <ItemStyle HorizontalAlign="Left" Width="60px"></ItemStyle>
                          <ItemTemplate>
                            <input name="memberPrice<%# Container.ItemIndex+1%>" type="text" class="inputstyle" id="memberPrice<%# Container.ItemIndex+1%>" value='<%# DataBinder.Eval(Container.DataItem, "MemberPrice") %>' size="9" maxlength="10" onKeyUp="CheckMoney('memberPrice<%# Container.ItemIndex+1%>')"/>
                          </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:TemplateColumn HeaderText="商品代码">
                          <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
                          <ItemStyle HorizontalAlign="Left" Width="60px"></ItemStyle>
                          <ItemTemplate> <%# DataBinder.Eval(Container.DataItem, "ProductNo") %> </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:TemplateColumn HeaderText="库存量">
                          <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                          <ItemStyle HorizontalAlign="Center" Width="40px"></ItemStyle>
                          <ItemTemplate> <%# DataBinder.Eval(Container.DataItem, "Storage") %> </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:TemplateColumn HeaderText="缩图">
                          <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                          <ItemStyle HorizontalAlign="Center" Width="40px"></ItemStyle>
                          <ItemTemplate> <a href="#" onMouseOver="return overlib(&quot;<IMG SRC=../Upload/<%# DataBinder.Eval(Container.DataItem, "ThumbnailImg") %> width=200>&quot;, CAPTION, &quot;<%# DataBinder.Eval(Container.DataItem, "Name") %>&quot;,FGCOLOR, '#fcfcfc', BGCOLOR, '#0080C0', CAPCOLOR, '#ffffff', BORDER, 2, CLOSETEXT, 'Close');" onMouseOut="nd();"><IMG SRC="images/icon-viewpic.gif" border="0"></a> </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:TemplateColumn HeaderText="排序">
                          <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                          <ItemStyle HorizontalAlign="Center" Width="50px"></ItemStyle>
                          <ItemTemplate>
                            <input name="sort<%# Container.ItemIndex+1%>" type="text" class="inputstyle" id="sort<%# Container.ItemIndex+1%>" value='<%# DataBinder.Eval(Container.DataItem, "Sort") %>' size="9" maxlength="10" onKeyUp="CheckSort('sort<%# Container.ItemIndex+1%>')"/>
                          </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:TemplateColumn HeaderText="发布">
                          <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                          <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
                          <ItemTemplate> <a href='Actions.aspx?Action=ChangeProductIsForSale&pid=<%# DataBinder.Eval(Container.DataItem, "ProductID") %>&IsForSale=<%# DataBinder.Eval(Container.DataItem, "IsForSale") %>&<%=Request.QueryString.ToString()%>'> <img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "IsForSale") %>.png' border="0"></a> </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:TemplateColumn HeaderText="推荐">
                          <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                          <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
                          <ItemTemplate> <a href='Actions.aspx?Action=ChangePCommend&PID=<%# DataBinder.Eval(Container.DataItem, "ProductID") %>&IsCommend=<%# DataBinder.Eval(Container.DataItem, "IsCommend").ToString() == "1" ? "false" : "true" %>&<%=Request.QueryString.ToString()%>'> <img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "IsCommend") %>.png' border="0"></a> </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:TemplateColumn HeaderText="特价">
                          <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                          <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
                          <ItemTemplate> <a href='Actions.aspx?Action=ChangePSpecial&PID=<%# DataBinder.Eval(Container.DataItem, "ProductID") %>&IsSpecial=<%# DataBinder.Eval(Container.DataItem, "IsSpecialOffer").ToString() == "1" ? "false" : "true" %>&<%=Request.QueryString.ToString()%>'> <img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "IsSpecialOffer") %>.png' border="0"></a> </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:TemplateColumn HeaderText="热卖">
                          <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                          <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
                          <ItemTemplate> <a href='Actions.aspx?Action=ChangePHot&PID=<%# DataBinder.Eval(Container.DataItem, "ProductID") %>&IsHot=<%# DataBinder.Eval(Container.DataItem, "IsHot").ToString() == "1" ? "false" : "true" %>&<%=Request.QueryString.ToString()%>'> <img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "IsHot") %>.png' border="0"></a> </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:TemplateColumn>
                          <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                          <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
                          <ItemTemplate> <a href='ProductAdd.aspx?ProductID=<%# DataBinder.Eval(Container.DataItem, "ProductID") %>'> 修改</a> </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:ButtonColumn Text="&lt;div id=&quot;de&quot; onclick=&quot;javascript:return confirm('确认删除吗？')&quot;&gt;删除&lt;/div&gt;"
									CommandName="Delete">
                          <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
                        </asp:ButtonColumn>
                        </Columns>
                        <PagerStyle Mode="NumericPages"></PagerStyle>
                      </asp:datagrid>
                      <!-- 翻页开始-->
                      <table width="100%">
                        <tr>
                          <td><asp:hyperlink id="hplPrev" runat="server">上一页</asp:hyperlink>
                            [&nbsp;
                            <asp:label id="lbPage" Runat="server"></asp:label>
                            &nbsp;]
                            <asp:hyperlink id="hplNext" runat="server">下一页</asp:hyperlink></td>
                          <td align="right">共
                            <asp:label id="lblTotalPage" runat="server"></asp:label>
                            当前商品为<B>
                            <asp:label id="lblCurrentPage" runat="server"></asp:label>
                            </B> &nbsp;跳转第
                            <asp:textbox class="inputbg" id="txtGOPage" Runat="server" size="1"></asp:textbox>
                            页
                            <asp:button id="btnGo" Runat="server" Text="Go"></asp:button></td>
                        </tr>
                      </table>
                      <!-- 翻页结束-->
                      <!--
						<TABLE cellSpacing="0" cellPadding="0" width="100%" align="center" id="tablePage">
							<TR>
								<TD vAlign="middle">
									<asp:label id="lblPager" Runat="server"></asp:label></TD>
								<TD vAlign="middle" align="right"><INPUT id="controlID" type="hidden" name="controlID" runat="server">
									<asp:textbox id="txtPage" Runat="server" Width="30px" BorderWidth="1px" BackColor="White" BorderColor="Black"></asp:textbox>&nbsp;&nbsp;
									<asp:button id="btnJump" Runat="server" Text=" Go "></asp:button></TD>
							</TR>
						</TABLE>-->
                    </td>
                  </tr>
                </table>
                <div id="overDiv" style="Z-INDEX: 1000; VISIBILITY: hidden; POSITION: absolute"></div></td>
            </tr>
          </table>
          <table width="100%" align="center" cellspacing="0" cellpadding="0">
            <tr>
              <td class="bl"></td>
              <td class="bm">&nbsp;</td>
              <td class="br"></td>
            </tr>
          </table>
        </div></td>
      <td  class="mr"></td>
    </tr>
  </table>
  <table width="100%" align="center" cellspacing="0" cellpadding="0">
    <tr>
      <td class="bl"></td>
      <td class="bm">&nbsp;</td>
      <td class="br"></td>
    </tr>
  </table>
  </div>
  </td>
  </tr>
  </table>
</form>
</body>
</HTML>
</HTML>
