<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="ImportFromCSV.aspx.cs" Inherits="Hidistro.UI.Web.Admin.product.ImportFromCSV" Title="无标题页" %>
<%@ Register TagPrefix="Hi" Namespace="Hidistro.UI.ControlPanel.Utility" Assembly="Hidistro.UI.ControlPanel.Utility" %>
<%@ Register TagPrefix="Hi" Namespace="Hidistro.UI.Common.Controls" Assembly="Hidistro.UI.Common.Controls" %>
<%@ Register TagPrefix="UI" Namespace="ASPNET.WebControls" Assembly="ASPNET.WebControls" %>
<asp:Content ID="Content1" ContentPlaceHolderID="headHolder" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="contentHolder" runat="server">
<div class="optiongroup mainwidth">
		<ul>
			<li class="optionstar"><a href="ImportFromTB.aspx"><span>从淘宝数据包导入</span></a></li>
			<li class="menucurrent"><a href="ImportFromCSV.aspx"><span>自制商品数据包导入</span></a></li>
		</ul>
</div>
<div class="dataarea mainwidth databody">

<div class="datafrom">
<div class="formitem">
            <ul>
              <li><h2 class="colorE">制作步骤</h2></li>
              <li> <span style="color:Red;">1.下载一个CSV模板文件</span>　<asp:LinkButton ID="linkdowload" runat="server" Text="点击下载"></asp:LinkButton></li>
              <li> <span style="color:Red;">2.解压ZIP文件，把系统需要的商品图片文件放在文件夹Image中</span></li>
              <li> <span style="color:Red;">3.把填写好的模板（products.csv文件）与Image这两个文件夹放在同一目录下以zip的格式打成压缩包,命名为products，并上传</span></li>
              
              <li> <span class="formitemtitle Pw_198"></span>
                <asp:FileUpload runat="server" ID="fileUploader" /><asp:Button runat="server" ID="btnUpload" Text="上传" />               
                <span>
                    上传数据包商品数量不得超过50件，否则上传失败
                </span>
              </li>
       
              </ul>
            <ul class="btntf Pa_198">
                <asp:Button ID="btnImport" runat="server" OnClientClick="return doImport();" CssClass="submit_DAqueding inbnt" Text="导 入" />
            </ul>
            <div class="blank12 clearfix"></div>
        </div>
    </div>


 <div class="datalist">
 <span style="float:right;margin-right:5px;"><asp:LinkButton ID="linkErro" runat="server" Text="导出错误数据"></asp:LinkButton></span>
 <table>
 <tr  class="table_title">
 <td class="td_right td_left">店铺分类</td><td class="td_right td_left">商品类型</td><td class="td_right td_left">品牌</td>
 <td class="td_right td_left">商品名称</td><td class="td_right td_left">商家编码</td><td class="td_right td_left">错误提示</td>
 </tr>
 <asp:Repeater ID="rp_erroproduct" runat="server">
 <ItemTemplate>
 <tr>
 <td><%# Eval("CategoryName")%></td><td><%# Eval("TypeName")%></td><td><%# Eval("BrandName")%></td>
 <td><%# Eval("ProductName")%></td><td><%# Eval("ProductCode")%></td><td><%# Eval("ErroMsg")%></td>
 </tr>
 </ItemTemplate>
 </asp:Repeater>
 </table>
	    <UI:Grid runat="server" ID="grdProducts" Width="100%" AllowSorting="true" ShowOrderIcons="true" GridLines="None" DataKeyNames="ProductId"
                    SortOrder="Desc"  AutoGenerateColumns="false" HeaderStyle-CssClass="table_title">
                    <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                    <Columns>
                        <asp:TemplateField HeaderText="商品" HeaderStyle-CssClass="td_right td_left">
                            <itemtemplate>
                            <div style="float:left; margin-right:10px;">
                                <a href='<%#"../../ProductDetails.aspx?productId="+Eval("ProductId")%>' target="_blank">
                                        <Hi:ListImage ID="ListImage1"  runat="server" DataField="ThumbnailUrl40"/>      
                                 </a> 
                                 </div>
                                 <div style="float:left;">
                                 <span class="Name"> <a href='<%#"../../ProductDetails.aspx?productId="+Eval("ProductId")%>' target="_blank"><%# Eval("ProductName") %></a></span>
                                  <span class="colorC">商家编码：<%# Eval("ProductCode") %></span>
                                 </div>
                         </itemtemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="库存"  ItemStyle-Width="100" HeaderStyle-CssClass="td_right td_left">
                            <itemtemplate>
                             <asp:Label ID="lblStock" runat="server" Text='<%# Eval("Stock") %>' Width="25"></asp:Label>
                          </itemtemplate>
                        </asp:TemplateField>
                        <Hi:MoneyColumnForAdmin HeaderText=" 市场价" ItemStyle-Width="80"  DataField="MarketPrice" HeaderStyle-CssClass="td_right td_left"  />
                        <Hi:MoneyColumnForAdmin HeaderText="成本价" ItemStyle-Width="80"  DataField="CostPrice" HeaderStyle-CssClass="td_right td_left"  />        
                        <Hi:MoneyColumnForAdmin HeaderText="一口价" ItemStyle-Width="80"  DataField="SalePrice" HeaderStyle-CssClass="td_right td_left"  />                     
                        <asp:TemplateField HeaderText="操作" ItemStyle-Width="80" HeaderStyle-CssClass=" td_left td_right_fff">
                            <ItemTemplate>
			                  <span class="submit_shanchu"><asp:LinkButton ID="btnRemove" runat="server" CommandName="Remove" Text="除外" /></span>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </UI:Grid>
		  <div class="blank12 clearfix"></div>
      </div>
</div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="validateHolder" runat="server">
</asp:Content>
