<%@ Page language="c#" Codebehind="Brand.aspx.cs" AutoEventWireup="false" Inherits="XpShop.WebUI.Admin.Brand" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
	<HEAD>
	    <!--#include file="inc/head.inc"-->
		<title>Brand</title>
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<script language="javascript" src="../inc/overlib.js"></script>
	</HEAD>
	<body MS_POSITIONING="GridLayout">
	    <div class="container">
		<div class="sub_container">
		<div class="sub_container_title"><a href="../default.aspx" target="_blank">桌面</a><img src="images/admin_title.jpg" height=9px width=8px align="absmiddle" />
		    <%if (this.Request.QueryString["action"] != "Manage"){%>品牌添加<%}else{%>品牌列表<%}%>
	    </div>
		<div class="sub_container_content">
		<form id="Form1" method="post" runat="server">
		    <div class="frame">
		        <div class="frame_title"><asp:label id="lbTitle" Runat="server">品牌添加</asp:label></div>
		        <div class="frame_content">
		            <table class="tableBorder" cellSpacing="1" cellPadding="1" width="98%" align="center" border="0">
				        <tr>
					        <td class="forumRowHighlight">
						        <%if (this.Request.QueryString["action"] != "Manage"){%>
						        <table class="tableBorder" cellSpacing="0" cellPadding="0" width="98%" align="center" border="0">
							        <tr>
								        <td align="left">品牌名称：
								        </td>
								        <td><asp:textbox id="txtName" runat="server" Width="250px" MaxLength="50"></asp:textbox></td>
								        <td vAlign="top" align="left" width="80" rowSpan="3">所属分类：<br>
									        （按住Ctrl可多选）
								        </td>
								        <td vAlign="top" width="200" rowSpan="3"><asp:listbox id="lbxCategories" runat="server" SelectionMode="Multiple" Rows="10" AutoPostBack="false"></asp:listbox><FONT face="宋体"><BR>
									        </FONT>
								        </td>
							        </tr>
							        <tr>
								        <td>品牌图标：</td>
								        <td><INPUT id="fileLogo" type="file" name="File1" runat="server"></td>
							        </tr>
							        <tr>
								        <td align="left">介绍信息：
								        </td>
								        <td><asp:textbox id="txtDescription" runat="server" Width="250px" TextMode="MultiLine" Height="48px"
										        MaxLength="255"></asp:textbox></td>
							        </tr>
							        <tr>
								        <td align="center" colSpan="3"><br>
									        <asp:button id="btnSave" runat="server" Text="保存"></asp:button><asp:button id="btnCancel" runat="server" Text="取消" CausesValidation="False"></asp:button></td>
							        </tr>
						        </table>
						        <%}else{%>
						        <asp:datagrid id="dgList" runat="server" PageSize="15" PagerStyle-Mode="NumericPages" AutoGenerateColumns="False"
							        DataKeyField="BrandID" Width="100%" HorizontalAlign="Center" HeaderStyle-CssClass="summary-title">
							        <HeaderStyle Font-Bold="True" CssClass="summary-title"></HeaderStyle>
							        <Columns>
								        <asp:TemplateColumn HeaderText="ID">
									        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Left"></ItemStyle>
									        <ItemTemplate>
										        <%# DataBinder.Eval(Container.DataItem, "BrandID") %>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="品牌名称">
									        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Left"></ItemStyle>
									        <ItemTemplate>
										        <%# DataBinder.Eval(Container.DataItem, "BrandName") %>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="排序" ItemStyle-Width="30" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
									        <HeaderStyle></HeaderStyle>
									        <ItemTemplate>
										        <a href='Actions.aspx?Action=ChangeBrandSort&Type=D&BrandID=<%# DataBinder.Eval(Container.DataItem, "BrandID") %>&Sort=<%# DataBinder.Eval(Container.DataItem, "Sort") %>'>
											        <img src="images/a_down.gif" border="0" style='VISIBILITY:<%# GetVisible(DataBinder.Eval(Container.DataItem, "Sort").ToString(),"D") %>'></a>
										        <a href='Actions.aspx?Action=ChangeBrandSort&Type=U&BrandID=<%# DataBinder.Eval(Container.DataItem, "BrandID") %>&Sort=<%# DataBinder.Eval(Container.DataItem, "Sort") %>'>
											        <img src="images/a_up.gif" border="0" style='VISIBILITY:<%# GetVisible(DataBinder.Eval(Container.DataItem, "Sort").ToString(),"U") %>'></a>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="介绍">
									        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Left" Width="120px"></ItemStyle>
									        <ItemTemplate>
										        <%# DataBinder.Eval(Container.DataItem, "Description") %>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="Logo">
									        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Left" Width="120px"></ItemStyle>
									        <ItemTemplate>
										        <a href="#" onmouseover="return overlib(&quot;<IMG SRC=../Upload/BrandLogo/<%# DataBinder.Eval(Container.DataItem, "Logo") %>>&quot;, CAPTION, &quot;<%# DataBinder.Eval(Container.DataItem, "BrandName") %>&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>
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
									        <ItemTemplate>
										        <a href='Brand.aspx?action=Modify&BrandID=<%# DataBinder.Eval(Container.DataItem, "BrandID") %>'>
											        修改</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>
						        <%}%>
					        </td>
				        </tr>
			        </table>
		        </div>
	        </div>
			<div id="overDiv" style="Z-INDEX: 1000; VISIBILITY: hidden; POSITION: absolute"></div>
		</form>
		</div>
		</div>
		</div>
	</body>
</HTML>
