<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Product_MultiUpLoad_Operate, V5Shop.Shop.Payment" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="control/ManageHeader.ascx" TagName="ManageHeader" TagPrefix="uc3" %>
<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc2" %>
<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<%@ Register TagPrefix="V5Shop" Namespace="V5Shop.Control" Assembly="V5Shop.Control" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/css_list.css" rel="stylesheet" type="text/css" />
    <link href="css/control.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" language="javascript" src="js/Common.js"></script>

    <script type="text/javascript" language="javascript" src="js/Control_Calendar.js"></script>

</head>
<body>
    <form id="form1" runat="server">
        <div class="OperateTitle">
            <div>
                <asp:Label ID="lblAdd" runat="server" Text="【 商品批量上传 】"></asp:Label>&nbsp;
                <a href="Product_Product_Manage.aspx" title="返回商品列表">返回列表</a>
            </div>
        </div>
        <div>
            <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" id="OperateTable"
                runat="server">
                <tr>
                    <td align="right" bgcolor="#ffffff" style="width: 20%; height: 29px">
                        <asp:Label ID="lblCategory" runat="server" Text="选择分类："></asp:Label></td>
                    <td align="left" bgcolor="#ffffff" style="height: 29px">
                        <asp:DropDownList ID="ddlCategory" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlCategory_SelectedIndexChanged" Width="150px">
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddlCategory"
                            ErrorMessage="请选择分类"></asp:RequiredFieldValidator></td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#ffffff" style="width: 20%; height: 29px">
                        <asp:Label ID="lblBrand" runat="server" Text="选择品牌："></asp:Label></td>
                    <td align="left" bgcolor="#ffffff" style="height: 29px">
                        <asp:DropDownList ID="ddlBrand" runat="server" Width="150px">
                        </asp:DropDownList>
                        </td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 29px; width: 20%;">
                        <asp:Label ID="lblUpDataFile" runat="server" Text="上传数据文件："></asp:Label>
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 29px">
                        <asp:FileUpload ID="fuProduct" runat="server" Width="300px" /></td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#ffffff" style="width: 20%; height: 29px">
                        <V5Shop:HelpCtrl ID="HelpCtrl1" runat="server" FontColor="red" Header="文件格式" ImageURL="images/help.gif"
                            Text="请先根据下载模本文件。然后根据文件内容示例填写商品信息即可。注意：请勿删除文件内容前两行。" />
                        <asp:Label ID="lblCsvDown" runat="server" Text="下载CSV文件："></asp:Label></td>
                    <td align="left" bgcolor="#ffffff" style="height: 29px">
                        <a href="../Template/productGBK.rar" target="_blank">下载CSV模板文件-简体中文GB21312</a><br/>
                        <a href="../Template/productUTF8.rar" target="_blank">下载CSV模板文件-通用编码UTF-8</a><br/>
                        <a href="../Template/productBig5.rar" target="_blank">下载CSV模板文件-繁体中文Big5</a>
                        </td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="width: 20%; height: 30px;">
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 30px">
                        <asp:Button ID="btnAdd" runat="server" Text="确定" OnClick="btnAdd_Click" CssClass="button" /></td>
                </tr>
            </table>
            <div id="tabShowRecord" visible="false" runat="server">
                <div style="padding-left: 10%; padding-top: 20px;">
                    <asp:Label ID="lblCategoryName" runat="server" Text="当前分类："></asp:Label>
                    <asp:Label ID="lblCategoryInfo" runat="server" ForeColor="Red"></asp:Label>
                    <asp:Label ID="lblBrandName" runat="server" Text="当前品牌："></asp:Label>
                    <asp:Label ID="lblBrandInfo" runat="server" ForeColor="Red"></asp:Label>
                </div>
                <div class="div1mad" style="width: 800px;">
                    <div class="div1madl" style="float: left; margin-top: 100px;">
                        <img id="leftbutton" src="images/index/key_pre0.gif" style="cursor: pointer;"
                            alt="点击左移" onclick="MoveRight()" />
                    </div>
                    <div style="width: 770px; float: left; overflow: hidden;">
                        <div id="movepart" class="listborder">
                            <table width="3600" border="0" align="center" cellpadding="0" cellspacing="0" id="table1">
                                <tr>
                                    <td align="left" bgcolor="#ffffff" style="height: 30px" colspan="2">
                                        <asp:GridView ID="GridViewProduct" runat="server" Width="3600px" ShowHeader="False">
                                            <Columns>
                                                <asp:TemplateField HeaderText="ID">
                                                    <itemtemplate>
                                                        <asp:Label ID="ID" runat="server" Text='<%# Bind("ID") %>'></asp:Label>
</itemtemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                            <RowStyle Height="25px" />
                                        </asp:GridView>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                    <div class="div1madr" style="float: left; margin-top: 100px;">
                        <img id="rightbutton" src="images/index/key_next.gif" style="cursor: pointer;"
                            alt="点击右移" onclick="MoveLeft()" /></div>
                </div>

                <script language="javascript" type="text/javascript">
		var left = 0;
		var start = 0;
		var end = 0;
		var obj = document.getElementById("movepart");
		var speed = 20;
		var maxindex = 10;
		var index = 10;
		function MoveLeft(){
			if(CheckStatus("left")){
				speed = 40;
				start = left;
				end = left - 295;
				Movel();
				left = left - 295;
			}
		}
		
		function MoveRight(){
			if(CheckStatus("right")){
				speed = 40;
				start = left;
				end = left + 295;
				Mover();
				left = left + 295;
			}
		}
		
		function CheckStatus(dir){
			if(dir == "left"){
				if(index > 0){
					index--;
					if(index == 0){
						document.getElementById("rightbutton").src = "images/index/key_next0.gif";
					}else{
						document.getElementById("leftbutton").src = "images/index/key_pre.gif";
					}
					return true;
				}else
					return false;
			}else if(dir == "right"){
				if(index < maxindex){
					index++;
					if(index == maxindex){
						document.getElementById("leftbutton").src = "images/index/key_pre0.gif";
					}else{
						document.getElementById("rightbutton").src = "images/index/key_next.gif";
					}
					return true;
				}else
					return false;
			}
		}
		
		function Movel(){
			start = start - speed
			speed--;
			obj.style.marginLeft = start + "px";
			if(start > end)
				setTimeout("Movel()",6);
		}
		function Mover(){
			start = start + speed
			speed--;
			obj.style.marginLeft = start + "px";
			if(start < end)
				setTimeout("Mover()",6);
		}
                </script>

                <div style="padding-left: 10%; padding-top: 20px;">
                    <asp:Button ID="btnInputRecord" runat="server" Text="确定" CssClass="button" OnClick="btnInputRecord_Click" />
                </div>
            </div>
            <div id="divJs" runat="server">
                <script type="text/javascript">
                    //加TABLE样式
                     InitTrClass();
                </script>
            </div>
        </div>
    </form>
</body>
</html>
