<%@ Page language="c#" Codebehind="PdtTypeAdd.aspx.cs" AutoEventWireup="true" Inherits="XpShop.Manage.PdtType" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
	<HEAD>
		<title>商品类型添加</title> 
		<!--#include file="../inc/head2.inc"-->
		<script type="text/javascript" src="../inc/commond.js"></script>
		<script type="text/javascript" src="../inc/PdtType.js"></script>
		<script type="text/javascript">
			var tid="<%=Request.QueryString["tid"] == null ? "0" : Request.QueryString["tid"] %>";
		</script>
	</HEAD>
	<body>
		<div class="container">
			<div class="sub_container">
				<div class="sub_container_title"><a href="<%=AdminDefault%>" target="_top">桌面</a><img src="images/admin_title.jpg" height="9" width="8" align="absMiddle">
					<% if(this.Request.QueryString["Action"] == "Manage"){%>
					修改商品类型<%}if(this.Request.QueryString["Action"] == "Add" | this.Request.QueryString["Action"] == "Modify"){%>
					添加商品类型<%}%>
				</div>
				<div class="sub_container_content">
					<form id="Form1" method="post" runat="server">
						<% if(this.Request.QueryString["Action"] == "Manage"){%>
						<div class="frame">
							<div class="frame_title">商品属性管理</div>
							<div class="frame_content" style="text-align:left;">
								<table class="tableBorder" cellSpacing="0" cellPadding="0" style="BORDER-RIGHT:#eee 1px solid; BORDER-TOP:#eee 1px solid; MARGIN:10px auto; BORDER-LEFT:#eee 1px solid; WIDTH:300px; BORDER-BOTTOM:#eee 1px solid;">
									<tr>
										<td class="forumRowHighlight">
											<asp:datagrid id="dgPdtType" runat="server" Width="300" HeaderStyle-CssClass="summary-title" HorizontalAlign="Left"
												DataKeyField="TypeID" AutoGenerateColumns="False" PagerStyle-Mode="NumericPages"
												AllowPaging="False">
												<Columns>
													<asp:TemplateColumn HeaderText="类型名称" ItemStyle-HorizontalAlign="center"
														HeaderStyle-HorizontalAlign="center">
														<HeaderStyle></HeaderStyle>
														<ItemTemplate>
															<%# DataBinder.Eval(Container.DataItem, "TypeName") %>
														</ItemTemplate>
														<EditItemTemplate>
															<asp:TextBox ID="fieldName" Runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "CategoryFieldName") %>' Width="80px">
															</asp:TextBox>
														</EditItemTemplate>
													</asp:TemplateColumn>
													<asp:TemplateColumn HeaderText="编辑" HeaderStyle-Width="100px" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center"
														HeaderStyle-HorizontalAlign="Center">
														<ItemTemplate>
															<a href='PdtType.aspx?Action=Add&tid=<%# DataBinder.Eval(Container.DataItem, "TypeID") %>'>
																修改</a>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:ButtonColumn HeaderStyle-HorizontalAlign="center" ItemStyle-HorizontalAlign="center" HeaderText="删除"
														HeaderStyle-Width="30px" ItemStyle-Width="30" CommandName="Delete" Text="&lt;div id=&quot;de&quot; onclick=&quot;javascript:return confirm('真的要删除吗？')&quot;&gt;删除&lt;/div&gt;"></asp:ButtonColumn>
												</Columns>
											</asp:datagrid>
										</td>
									</tr>
								</table>
							</div>
						</div>
						<%}if(Request.QueryString["Action"] == "Add"){%>
						<div class="frame">
							<div class="frame_title">添加商品类型</div>
							<div class="frame_content" style="BACKGROUND-COLOR:#eee">
								<div class="table1" style="display:block;">
									<table class="tableBorder" cellSpacing="0" cellPadding="0">
										<tr>
											<th>商品类型名称：</th>
											<td style="TEXT-ALIGN:left"><asp:TextBox ID="txtTypeName" Runat="server"></asp:TextBox><span class="tip">*</span></td>
										</tr>
										<tr>
										    <th>规格一</th>
										    <td>
                                                <asp:DropDownList ID="ddlProp1" runat="server"></asp:DropDownList>
                                            </td>
										</tr>
										<tr>
										    <th>规格二</th>
										    <td>
                                                <asp:DropDownList ID="ddlProp2" runat="server"></asp:DropDownList>
                                            </td>
										</tr>
									</table>
								</div>
								<div class="table1">
									<div class="toptip">
										<h3>属性设置</h3>
										<button id="btnAddProp" type="button" class="inputbtn">增加属性</button>[注：最多只能能添加30个属性，预设值之间请用英文状态下逗号隔开。]
									</div>
									<div id="prop" class="XpTable">
										<div class="thead">
											<div class="col1">操作</div>
											<div class="col2">属性名称</div>
											<div class="col3">筛选</div>
											<div class="col4">预设值</div>
										</div>
										<div class="tbody"></div>
									</div>
								</div>
								<div class="table1">
									<div class="toptip">
										<h3>参数设置</h3>
										<button id="AddParaGroup" type="button" class="inputbtn">增加参数组</button>
									</div>
									<div id="para_container"></div>
								</div>
								<div class="table1">
									<div style="BORDER-RIGHT:#666 1px solid; BORDER-TOP:#666 1px solid; VERTICAL-ALIGN:middle; BORDER-LEFT:#666 1px solid; LINE-HEIGHT:50px; BORDER-BOTTOM:#666 1px solid; HEIGHT:50px; TEXT-ALIGN:center">数据提交中，请稍等。。。</div>
								</div>
								<div class="table1">
									<table class="tableBorder" cellSpacing="0" cellPadding="0">
										<tr>
											<td align="center" width="100%">
												<asp:button id="btnSubmit" OnClick="btnSubmit_Click" runat="server" Text="提交" CssClass="inputbtn"></asp:button>
											</td>
										</tr>
									</table>
								</div>
								<div id="control" style="MARGIN:10px auto;WIDTH:110px;">
									<input type="button" id="pre" value="上一步" style="display:none;" class="inputbtn"><input type="button" id="next" value="下一步" class="inputbtn">
								</div>
							</div>
						</div>
						<%}%>
					</form>
				</div>
			</div>
		</div>
	</body>
</HTML>
