<%@ Page language="c#" Codebehind="ProductCorrelation.aspx.cs" AutoEventWireup="True" Inherits="DreamerShop.Admin.ProductExtend" %>
<%@ Register TagPrefix="uc1" TagName="LanguagesDeal" Src="LanguagesDeal.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>
			<%=myLanguagesDeal.GetMyString("CorTextProductCor")%>
			-
			<%=mConfigInf.strWebTitle%>
		</title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
		<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">
		<META content="<%=mConfigInf.strDescription%>" name=description>
		<META content="<%=mConfigInf.strKeywords%>" name=keywords>
		<LINK href="../StyleSheet1.css" rel="stylesheet">
		<SCRIPT language="javascript" id="clientEventHandlersJS">
		<!--


		function selall()
		{	
			var a = document.getElementsByTagName("input");
		
			var str;
			var len;
			var state;
			for (var i=0; i<a.length; i++)
			{
				if (a[i].type == "checkbox") 
				{
					str=a[i].id;
					len=str.lastIndexOf("ckSelAll");
					if((len * 1)>=1)
					{
						state=a[i].checked;
						break;
						}
				}
			}
			for (var i=0; i<a.length; i++)
			{
				if (a[i].type == "checkbox") 
				{
					str=a[i].id;
					len=str.lastIndexOf("ckSelItem");
					if((len * 1)>=1)
						a[i].checked=state;
				}
			}
		}
		
		function imgHelp_onclick() {
			popUpWin("DSHelp/ProductManage.htm#Correlation","Help",100,100,800,600);
			}
			
		function popUpWin(URLStr,WinName, left, top, width, height)
		{
			var popUpWin=0;
			if(popUpWin)

			{

			if(!popUpWin.closed) popUpWin.close();

			}

			popUpWin = open(URLStr, WinName, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
		}
		//-->
		</SCRIPT>
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form id="Form1" method="post" runat="server">
		<asp:Label id="lbCurrentPage" runat="server" Visible="false">1</asp:Label>
		<asp:Label id="lbToatalCount" runat="server" Visible="false"></asp:Label>
			<asp:Label id="lbEditID" runat="server" Visible="false"></asp:Label>
			<uc1:LanguagesDeal id="myLanguagesDeal" runat="server" Visible="False"></uc1:LanguagesDeal>
			<TABLE cellSpacing="0" cellPadding="0" width="97%" border="0" align="center">
				<TR>
					<TD vAlign="top" height="100%">
						<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
							<TR>
								<TD vAlign="top" bgColor="#ffffff" height="100%"><FONT face="宋体">
										<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
											<TR>
												<TD class="p12black"><SPAN class="p9orange"><IMG height="11" src="IMAGES/icon_1.gif" width="12" align="absMiddle">&nbsp;<%=myLanguagesDeal.GetMyString("TextProductManage")%>
														--&gt;
														<%=myLanguagesDeal.GetMyString("TextSetting")%>
														&nbsp;<asp:Label id="lbProduct" runat="server"></asp:Label>&nbsp;<%=myLanguagesDeal.GetMyString("CorTextProductCor")%></SPAN>
													<img src="../Images/Admin/helpicon.gif" id="imgHelp1" alt='<%=myLanguagesDeal.GetMyString("TextHelp")%>' LANGUAGE="javascript"
														onclick="return imgHelp_onclick()" style="CURSOR:pointer"></TD>
												<TD></TD>
												<TD align="right" width="50"><!--BUTTON_BEGIN-->
													<TABLE>
														<TR>
															<TD vAlign="bottom" noWrap>
																<asp:ImageButton id="ibtReturn" runat="server" ImageUrl="../Images/Admin/fb-cancel.gif" CausesValidation="False" onclick="ibtReturn_Click"></asp:ImageButton><%=myLanguagesDeal.GetMyString("TextReturn")%>
															</TD>
														</TR>
													</TABLE> <!--BUTTON_END--></TD>
											</TR>
										</TABLE>
									</FONT>
								</TD>
							</TR>
						</TABLE>
						<HR noShade SIZE="1">
						<table width="100%" border="0" cellSpacing="0" cellPadding="0">
							<tr>
								<td align="right"><%=myLanguagesDeal.GetMyString("CorTextMode")%><%=myLanguagesDeal.GetMyString("TextColonCharacter")%><!--相关加入方式：--></td>
								<td align="left"><asp:RadioButtonList id="rblCorrelationType" runat="server" Width="156px" RepeatDirection="Horizontal">
										<asp:ListItem Value="0" Selected="True">单向关联</asp:ListItem>
										<asp:ListItem Value="1">双向关联</asp:ListItem>
									</asp:RadioButtonList></td>
								<td align="right"><asp:button id="btSelJoin" runat="server" CssClass="go-wenbenkuang" Text="加入所选相关商品" onclick="btSelJoin_Click"></asp:button></td>
							</tr>
						</table>
						<asp:datagrid id="dgList" runat="server" Width="100%" CssClass="table-shangxia" AllowPaging="True"
							AutoGenerateColumns="False" DataKeyField="ProductID">
							<HeaderStyle HorizontalAlign="Center" BackColor="#F1F1F1"></HeaderStyle>
							<Columns>
								<asp:BoundColumn DataField="ProductNumber" HeaderText="商品编号">
									<HeaderStyle></HeaderStyle>
									<ItemStyle HorizontalAlign="Center"></ItemStyle>
								</asp:BoundColumn>
								<asp:BoundColumn DataField="ProductName" HeaderText="商品名称">
									<HeaderStyle></HeaderStyle>
									<ItemStyle HorizontalAlign="Center"></ItemStyle>
								</asp:BoundColumn>
								<asp:BoundColumn DataField="Amount" HeaderText="库存">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center"></ItemStyle>
								</asp:BoundColumn>
								<asp:BoundColumn DataField="SaleAmount" HeaderText="销售">
									<HeaderStyle></HeaderStyle>
									<ItemStyle HorizontalAlign="Center"></ItemStyle>
								</asp:BoundColumn>
								<asp:BoundColumn DataField="ClickNum" HeaderText="浏览">
									<HeaderStyle></HeaderStyle>
									<ItemStyle HorizontalAlign="Center"></ItemStyle>
								</asp:BoundColumn>
								<asp:BoundColumn DataField="AddTime" HeaderText="上架时间">
									<HeaderStyle></HeaderStyle>
									<ItemStyle HorizontalAlign="Center"></ItemStyle>
								</asp:BoundColumn>
								<asp:TemplateColumn>
									<HeaderStyle></HeaderStyle>
									<HeaderTemplate>
										<asp:CheckBox id="ckSelAll" runat="server" onClick="selall()"></asp:CheckBox>
									</HeaderTemplate>
									<ItemStyle HorizontalAlign="Center"></ItemStyle>
									<ItemTemplate>
										<asp:CheckBox id="ckSelItem" runat="server"></asp:CheckBox>
									</ItemTemplate>
								</asp:TemplateColumn>
							</Columns>
							<PagerStyle Visible="False" NextPageText="下一页" PrevPageText="上一页" HorizontalAlign="Right"></PagerStyle>
						</asp:datagrid>
						<TABLE class="table-zuoyou" width="100%" align="center" border="0">
							<TR align="center" bgColor="#f1f1f1">
								<TD><asp:button id="btFirst" runat="server" CssClass="go-wenbenkuang" Text=" 首 页" BorderStyle="Groove" onclick="btFirst_Click"></asp:button>&nbsp;
									<asp:button id="btPre" runat="server" CssClass="go-wenbenkuang" Text="上一页" BorderStyle="Groove" onclick="btPre_Click"></asp:button>&nbsp;
									<asp:button id="btNext" runat="server" CssClass="go-wenbenkuang" Text="下一页" BorderStyle="Groove" onclick="btNext_Click"></asp:button>&nbsp;
									<asp:button id="btLast" runat="server" CssClass="go-wenbenkuang" Text=" 尾 页" BorderStyle="Groove" onclick="btLast_Click"></asp:button>&nbsp;
									<asp:label id="lbPage" runat="server"></asp:label>&nbsp;
									<%=myLanguagesDeal.GetMyString("TextGotoPage")%>
									<asp:textbox id="txtPageNum" runat="server" Width="30px" CssClass="wenbenkuang" MaxLength="3"></asp:textbox><asp:comparevalidator id="CompareValidator2" runat="server" ErrorMessage="输入数字" Display="Dynamic" ControlToValidate="txtPageNum"
										Type="Integer" Operator="DataTypeCheck" ForeColor="#FF0000"></asp:CompareValidator><%=myLanguagesDeal.GetMyString("TextPages")%>
									<asp:button id="btGo" runat="server" CssClass="go-wenbenkuang" Text="Go" onclick="btGo_Click"></asp:button></TD>
							</TR>
						</TABLE>
						<TABLE class="table-zuoyou" width="100%" align="center" border="0">
							<TR align="center">
								<TD><%=myLanguagesDeal.GetMyString("CorTextMsg1")%><%=myLanguagesDeal.GetMyString("TextColonCharacter")%><!--根据商品编号或名称加入相关，商品编号或名称：-->
									<asp:textbox id="txtProductNumber" runat="server" Width="150px" CssClass="wenbenkuang" MaxLength="30"></asp:textbox><asp:button id="btNumberJoin" runat="server" CssClass="go-wenbenkuang" Text="加入相关商品" onclick="btNumberJoin_Click"></asp:button><asp:label id="lbNumberMSG" runat="server" ForeColor="Red"></asp:label></TD>
							</TR>
						</TABLE>
						<asp:datagrid id="dgCorList" runat="server" Width="100%" CssClass="table-shangxia" AllowPaging="False"
							AutoGenerateColumns="False" DataKeyField="CorrelationID">
							<HeaderStyle HorizontalAlign="Center" BackColor="#F1F1F1"></HeaderStyle>
							<Columns>
								<asp:BoundColumn DataField="ProductNumber" HeaderText="商品编号">
									<ItemStyle HorizontalAlign="Center"></ItemStyle>
								</asp:BoundColumn>
								<asp:BoundColumn DataField="ProductName" HeaderText="商品名称">
									<ItemStyle HorizontalAlign="Center"></ItemStyle>
								</asp:BoundColumn>
								<asp:BoundColumn DataField="CorrelationType" HeaderText="相关方式">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center"></ItemStyle>
								</asp:BoundColumn>
								<asp:TemplateColumn HeaderText="操作">
									<ItemStyle HorizontalAlign="Center"></ItemStyle>
									<ItemTemplate>
										<asp:Button id="btDelete" Text="删除" CssClass="go-wenbenkuang" CommandName="Delete" Runat="server"></asp:Button>
									</ItemTemplate>
								</asp:TemplateColumn>
							</Columns>
							<PagerStyle Visible="False" NextPageText="下一页" PrevPageText="上一页" HorizontalAlign="Right"></PagerStyle>
						</asp:datagrid></TD>
				</TR>
			</TABLE>
		</form>
	</body>
</HTML>
