<%@ Page Title="" Language="C#" MasterPageFile="~/bps/basic.Master" AutoEventWireup="true" CodeBehind="import_bom.aspx.cs" Inherits="bps.bps.import_bom" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="margin:10px;">

        <script src="../javascript/layer/layer.js"></script>

        <script src="../javascript/common.js"></script>

    <b>导入物料清单</b>


    请选择Excel导入  <a href="../template/template_bom.xlsx">下载导入模板</a> <br /> <br />

    <asp:FileUpload runat="server" ID="f"  style="display:inline-block" />

    <asp:Button runat="server" Text="上传Excel" ID="btn_upload" CssClass="btn btn-primary btn-sm" OnClick="btn_upload_click" />

    
    <asp:HiddenField runat="server" ID="hf_guid" />




    <asp:GridView AutoGenerateColumns="false"   ID="gv_overtimelist" runat="server" 
          DataKeyNames="id"    CssClass="table table-hover"
        
        GridLines="None"
        width="95%"     
       >
     <Columns>
         <asp:BoundField HeaderText="id" DataField="id" />
          <asp:BoundField HeaderText="ItemCode" DataField="ItemCode" />

         <asp:TemplateField>
             <HeaderTemplate>Item Name</HeaderTemplate>
             <ItemTemplate>
                 <a href=### onclick="Pop('r.aspx?code=<%#Eval("itemcode") %>&t=query_material_by_code',980,560,'查询原料');" >

                     <%#Eval("itemname") %>
                 </a>
             </ItemTemplate>
         </asp:TemplateField>

    
          <asp:BoundField HeaderText="Spec" DataField="Spec" />
          <asp:BoundField HeaderText="Levels" DataField="Levels" />


            <asp:BoundField HeaderText="FindNumber" DataField="FindNumber" />
          <asp:BoundField HeaderText="Quantity" DataField="Quantity" />
          <asp:BoundField HeaderText="ReferenceDesignator" DataField="ReferenceDesignator" />
          <asp:BoundField HeaderText="Revision" DataField="Revision" />


                <asp:BoundField HeaderText="UOM" DataField="UOM" />
          <asp:BoundField HeaderText="MPN" DataField="MPN" />
          <asp:BoundField HeaderText="Manufacturer" DataField="Manufacturer" />
          

         <asp:TemplateField>
             <ItemTemplate>
                 <%#Eval("db_itemid").ToString()==""?" <img src=images/cancel.gif title='原料不存在，导入BOM时将同时增加此物料到原料库' > ":"<img src=images/1.gif title='原料已经存在'> " %>

             </ItemTemplate>

         </asp:TemplateField>


     </Columns>
    
      
     
     </asp:GridView>
     <br /><br />
     <div style="text-align:center" >


     <asp:Button runat="server" ID="btn_import" Text="确定导入"  CssClass="btn btn-success" OnClick="btn_import_Click" />
             </div>
        </div>
</asp:Content>
