<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FreeList.aspx.cs"  Inherits="web.admin.FreeList" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>ProductField</title><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<LINK href="images/adminstyle.css" type="text/css" rel="stylesheet">
<style type="text/css">
body {margin:0px; height:768px}
</style>
	
	

<script language="javascript" type="text/javascript">
<!--

function Button1_onclick() {
history.go(-1);
}

// -->
</script>

</HEAD>
	<body>
	<form id="Form2" method="post" runat="server">
		
<table width="100%" height="550"  cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top">
<div class="top">
          <table width="100%" align="center" cellpadding="0" cellspacing="0" background="img/labelbg.gif" bgcolor="#EDF6FF">
            <tr>
		      <td height="33" class="tl"></td>
		      <td class="tm"><span class="tt">优惠信息管理 &gt;&gt;积分商品管理</span></td>
		      <td class="tm2"><span class="tt"></span></td>
		<td class="tr"></td>
	</tr>
</table>
</div>
        <div class="mframe"> 
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
      <td class="ml"></td>
              <td  class="mm" align="left" valign="top"> <div align="center">
                  <table width="75%" border="0" cellpadding="6" cellspacing="0">
                    <tr> 
                      <td width="76%"> <div align="left">
                         </div></td>
                      <td width="24%"><input type="submit" name="Submit" value="刷新" onClick="javascript:window.location.reload();"> <input id="Button1" type="button" value="返回" language="javascript" onclick="return Button1_onclick()" /></td>
                    </tr>
                  </table>
                  
                </div>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
                    <td bgcolor="#FFFFFF" valign="top" > 
                      <table width="97%" align="center" cellpadding="0"  cellspacing="0">
                        <tr>
		<td class="ml1" style="height: 14px"></td>
		                  <td class="mm1" style="height: 14px">
		                   <asp:Panel ID="Panel1" runat="server"  Width="100%" Visible="false">
       
        <asp:GridView ID="mypp" runat="server" AutoGenerateColumns="False" BorderStyle="Solid" BorderWidth="1px" Width="99%" HorizontalAlign="Center" BorderColor="#E0E0E0"  AllowPaging="True"  >
            <Columns>
            
                <asp:TemplateField HeaderText="ID">
                    <ItemTemplate>
                        &nbsp;&nbsp;<asp:Label ID="pname" runat="server" Text= <%# Eval("ID")%>></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle Font-Size="12px" />
                    <ItemStyle HorizontalAlign="Center" />
                
                </asp:TemplateField>
                  <asp:TemplateField HeaderText="商品名称">
                    <ItemTemplate>
                        &nbsp;&nbsp;<asp:Label ID="pid" runat="server" Text=' <%#Eval("name")%> '></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle Font-Size="12px" />
                      <ItemStyle HorizontalAlign="left" />
                
                </asp:TemplateField>
                   <asp:TemplateField HeaderText="所属类别">
                    <ItemTemplate>
                     <%#getlm(Eval("lb").ToString())%>
                    </ItemTemplate>
                    <HeaderStyle Font-Size="12px" />
                      <ItemStyle HorizontalAlign="Center" />
                
                </asp:TemplateField>
                  <asp:TemplateField HeaderText="商品积分">
                    <ItemTemplate>
                       &nbsp;&nbsp;<asp:Label ID="pid" runat="server" Text=' <%#Eval("jf")%> '></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle Font-Size="12px" />
                      <ItemStyle HorizontalAlign="Center" />
                
                </asp:TemplateField>
                <asp:TemplateField HeaderText="商品数量">
                    <ItemTemplate>
                       &nbsp;&nbsp;<asp:Label ID="pid" runat="server" Text=' <%#Eval("sl")%> '></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle Font-Size="12px" />
                      <ItemStyle HorizontalAlign="Center" />
                
                </asp:TemplateField>
                <asp:TemplateField HeaderText="商品保修">
                    <ItemTemplate>
                       &nbsp;&nbsp;<asp:Label ID="pid" runat="server" Text=' <%#Eval("bx")%> '></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle Font-Size="12px" />
                      <ItemStyle HorizontalAlign="Center" />
                
                </asp:TemplateField>
                <asp:TemplateField HeaderText="删除">
                       <ItemTemplate>
                            <a href="?action=del&ID=<%#Eval("id") %>&spic=<%#Eval("simg") %>&bpic=<%#Eval("bimg") %>"
                                        onclick="return confirm('商品图片同时被删除,确认要删除吗？');">
                                        [删除]</a>&nbsp;
                              
                      </ItemTemplate>
                    <HeaderStyle Font-Size="12px" HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" Width="50px" />
               
                   
                </asp:TemplateField>
                <asp:TemplateField HeaderText="修改">
                 <ItemTemplate>
                            <a href="?action=mod&ID=<%#Eval("id") %>">
                                        [修改]</a>&nbsp;
                              
                      </ItemTemplate>
                    <HeaderStyle Font-Size="12px" HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" Width="50px" />
                
                </asp:TemplateField>
            
            </Columns>
            <RowStyle Height="32px" />
            <HeaderStyle BackColor="AliceBlue" Height="35px" ForeColor="LightSalmon" CssClass="head" />
           
        </asp:GridView>
            <p class="pagemenu" style="text-align: right">
                    	<span>
                    		共<asp:Literal ID="lttotal" runat="server"></asp:Literal>
                    	    个商品，第<asp:Literal ID="ltcurpage" runat="server">1</asp:Literal>页/共<asp:Literal ID="lttotalpage" runat="server"></asp:Literal>页
                     	</span>
                    	<span class="padd1">
                    		<asp:LinkButton ID="lbfirst" runat="server" OnClick="lbfirst_Click" ToolTip="第一页" ><img src="images/first-icon.gif" border="0"/></asp:LinkButton>
                        	<asp:LinkButton ID="pre" runat="server"  ToolTip="上一页" OnClick="pre_Click" ><img src="images/left-icon.gif" id="IMG1" border="0"/></asp:LinkButton>
                        	<asp:LinkButton ID="lbup" runat="server" OnClick="lbup_Click" CssClass="pageA">上一页</asp:LinkButton>
                        	<asp:LinkButton ID="lbdown" runat="server" OnClick="lbdown_Click" CssClass="pageA">下一页</asp:LinkButton>
                        	<asp:LinkButton ID="next" runat="server" ToolTip="下一页" OnClick="next_Click" ><img src="images/right-icon.gif" border="0"/></asp:LinkButton>
                        	<asp:LinkButton ID="lblast" runat="server" OnClick="lblast_Click" ToolTip="最后一页"><img src="images/last-icon.gif" border="0"/></asp:LinkButton>
                        </span>
                    </p>
        </asp:Panel>
                              <asp:Panel ID="Panel2" runat="server"  Width="100%" Visible="false">
                                  <asp:HiddenField ID="HiddenField1" runat="server" />
                                  <asp:HiddenField ID="HiddenField2" runat="server" />
                                  <asp:HiddenField ID="HiddenField3" runat="server" />
                              <table width="95%" height="224" border="0" align="center" cellPadding="8" cellSpacing="0" bgcolor="#CCCCCC"
							id="Table5">
                                <tr bgcolor="#FFFFFF"> 
                                  <td width="100"   height="7"> 
                                    <div align="right">选择类别：</div></td>
                                  <td>&nbsp;
                                      <asp:DropDownList ID="plei" runat="server" AutoPostBack="True" OnSelectedIndexChanged="plei_SelectedIndexChanged">
                                      </asp:DropDownList>
                                      &nbsp;
                                      <asp:HiddenField ID="Hiddenarea" runat="server" />
                                      &nbsp;
                                      <asp:TextBox ID="atype" runat="server" Width="67px"></asp:TextBox>
                                      &nbsp;
                                      <asp:Button ID="Bt_lx" runat="server" OnClick="Bt_lx_Click" Text="添加类别" />
                                      &nbsp;
                                      <asp:Button ID="BT_del" runat="server" OnClick="BT_del_Click" Text="删除该类别" Visible="False" />
                                      <span style="color: #ff0033">注意：删除类别将一并删除该类下的所有积分商品</span></td>
                                </tr>
                                <tr bgcolor="#FFFFFF"> 
                                  <td width="100" height="7" align="right">商品名称：</td>
                                  <td width="1345" style="width: 451px">&nbsp; 
                                    <asp:textbox id="mc" CssClass="input" Width="200px" Runat="server"></asp:textbox> </td>
                                </tr>
                                <tr bgcolor="#FFFFFF"> 
                                  <td width="100" height="15" align="right">商品价格：</td>
                                  <td width="1345" style="width: 451px">&nbsp; <asp:TextBox ID="price" runat="server" Width="199px"></asp:TextBox></td>
                                </tr>
                                <tr bgcolor="#F4F4F4"> 
                                  <td width="100" align="right" style="height: 28px">所需积分：</td>
                                  <td style="width: 451px; height: 28px;">&nbsp;
                                    <asp:TextBox ID="jf" runat="server" CssClass="input" Width="200px"></asp:TextBox> 
                                    &nbsp;&nbsp; </td>
                                </tr>
                                <tr bgcolor="#FFFFFF"> 
                                  <td width="100" align="right" style="height: 28px">商品图片：</td>
                                  <td style="width: 451px; height: 28px;">&nbsp;<asp:FileUpload ID="FileUpload1" runat="server" Width="319px" /><br> 
                                    &nbsp; &nbsp;&nbsp;<font color="#FF0000">(为空则不修改商品图片）</font> 
                                    <br /> &nbsp; &nbsp; <asp:Image ID="Image1" runat="server" /> 
                                    <span style="color: #009900">(点击查看大图)</span></td>
                                </tr>
                                <tr bgcolor="#FFFFFF"> 
                                  <td width="100" align="right" style="height: 28px">现有数量：</td>
                                  <td style="width: 451px; height: 28px;">&nbsp;<asp:TextBox ID="sl" runat="server" CssClass="input" Width="200px"></asp:TextBox> 
                                    &nbsp;&nbsp; </td>
                                </tr>
                                <tr bgcolor="#FFFFFF"> 
                                  <td width="100" align="right" style="height: 28px">保修说明：</td>
                                  <td style="width: 451px; height: 28px;">&nbsp;<asp:TextBox ID="bx" runat="server" CssClass="input" Width="200px"></asp:TextBox> 
                                    &nbsp;&nbsp; </td>
                                </tr>
                                <tr bgcolor="#FFFFFF"> 
                                  <td width="100" align="right" style="height: 28px">商品说明：</td>
                                  <td style="width: 551px; height: 28px;">&nbsp;<FCKeditorV2:FCKeditor id="ftbContent" runat ="server" ToolbarSet="Default" Height="300px" Width="98%"></FCKeditorV2:FCKeditor></td>
                                </tr>
                                <tr bgcolor="#FFFFFF"> 
                                  <td width="100" height="40"></td>
                                  <td style="width: 451px"> &nbsp;&nbsp;&nbsp; 
                                    <asp:button id="btnSubmit" CssClass="btn" runat="server" Text="修改" OnClick="btnSubmit_Click" ></asp:button> 
                                    <FONT face="宋体">&nbsp;</FONT> &nbsp;&nbsp;&nbsp; 
                                    <asp:button id="btnCancel" CssClass="btn" runat="server" Text="取消" OnClick="btnCancel_Click"></asp:button> 
                                    &nbsp;&nbsp;&nbsp; &nbsp; </td>
                                </tr>
                              </table>
                              </asp:Panel>
		                   </td>
		<td class="mr1" style="height: 14px"></td>
	</tr>
</table>
                    </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>
</td>
    <td  class="mr"></td>
  </tr>
</table>
<table width="100%" align="center" cellspacing="0" cellpadding="0">
	<tr>
		<td class="bl" style="height: 15px"></td>
		<td class="bm" style="height: 15px">&nbsp;</td>
		<td class="br" style="height: 15px"></td>
	</tr>
</table>
</div>
    </td>
  </tr>
</table>

		</form>
	</body>
</HTML>
