<%@ Page Title="" Language="C#"   MasterPageFile="~/bps/bps.Master" AutoEventWireup="true" CodeBehind="Supply_Lists.aspx.cs" Inherits="purchase.purchase.Supply_Lists" %>
<%@ Register src="../UserControl/SupplyTab.ascx" tagname="SupplyTab" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
   
    
    
       <h1  class="border-active subnav" ><%=isen?"Supply List":"供应商列表" %>  </h1>

    <div class=right-action>
      
         
    </div>
    
    
    
    
    
    
    
      <uc1:SupplyTab ID="SupplyTab1" runat="server"   />

    

    
 
     
             <div class="content">

 
 

 






               

                
                <asp:UpdatePanel  ID="UpdatePanel2"  runat="server">
                   
                    
                     <ContentTemplate>



<div style="  padding:4px;" class="form-inline">
      
 
      
     供应商名称 <asp:TextBox runat="server" ID="txt_key" CssClass="form-control inline" Width="200px" placeholder="供应商名/V.Nr"></asp:TextBox>
  
   供应商组 <asp:DropDownList runat="server" ID="ddl_group" AutoPostBack="true"  AppendDataBoundItems="true"  CssClass="form-control inline" Width="200px">
       <asp:ListItem Text="所有分组" Value=""></asp:ListItem>

        </asp:DropDownList>
    
      <asp:Button ID="btn_search"   OnClick="btn_search_Click" runat="server" Text="搜索" class="btn btn-sm   btn-primary btn-flat" />
       



      &nbsp;&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;&nbsp; 

     <a href="javascript:void(0)" onclick="Pop('supply_Addedit.aspx',1250,650,'')" class="btn btn-sm btn-success">添加供应商</a>

   
    <asp:LinkButton OnClientClick="if(!isselect()) return false; return confirm('确认删除吗?');" id="btn_del" class="btn btn-danger btn-sm"  text="删除" runat="server" OnClick="btn_del_Click" />

     


    <a href="javascript:void(0);" onclick="ept('Export_Data.aspx?types=supplylist'); return false;" class="btn btn-sm bg-fuchsia">导出供应商</a>
     <a href="javascript:void(0);" onclick="ept('Import_Data.aspx?types=supplylist'); return false;" class="btn btn-sm bg-maroon ">导入供应商</a>

    &nbsp;|&nbsp;

      <a href="###" onclick="Pop('supply_addedit.aspx',1250,650,'添加供应商');" class="btn btn-primary btn-sm" ><%=isen?"Add Supply":"添加供应商" %>  </a>  


</div>



<asp:ListView ID="ListView1" runat="server" DataKeyNames="id" DataSourceID="SqlDataSource1"   >
                   <LayoutTemplate>
                  
              <table id="itemPlaceholderContainer" runat="server" class="table table-hover  ptable">
                                        <tr runat="server" style="">
                                         <th runat="server" width="50px"> 
                                           <input type="checkbox"  class="ck_all" id="cb_selectall" onclick="selectall(this);"  />
                                            </th>
                                               <th runat="server"  width="80px">V.Nr</th> 
                                              <th runat="server"  width="250px">供应商名称</th> 
                                          
                                            <th runat="server"  width="80px">联系人</th>
                                  
                                            <th runat="server"  width="100px">手机</th>
                                           <th runat="server" width="130px">邮件</th>

                                            <th runat="server"  width="100px">账期</th>  
                                             <th runat="server"  width="100px">付款方式</th> 
                                             <th runat="server" width="70px">Incoterm </th>   
                                             <th runat="server" width="90px">采购负责人</th>  
                                              <th runat="server" width="120px">所属组</th>         
                                        
                                        </tr>
                                        <tr id="itemPlaceholder" runat="server">
                                        </tr>
                                    </table>
                                
                    </LayoutTemplate>
    
      
                    <ItemTemplate>
                        <tr  >
                          <td>
                              <input type="checkbox" class="ck_item" value='<%# Eval("id") %>'/>  
                            </td>

                            
                              <td>
                                <asp:Label ID="lbl_supplycode" runat="server" Text='<%# Eval("supplycode") %>' />
                            </td>

                            <td>
                               
                                 <a href="javascript:void(0);" onclick=Pop('supply_Addedit.aspx?id=<%# Eval("id") %>',1250,650,"")  ><%# Eval("supplyname") %></a>
                             
                            </td>
                          
                       



                          <td> 
                                <asp:Label ID="lbl_contactname" runat="server" Text='<%# Eval("contactname") %>' />
                            </td>
                             

                            <td>
                                <asp:Label ID="lbl_mobile" runat="server" Text='<%# Eval("mobile") %>' />
                            </td>

                                 
                            <td>
                              <a href="mailto:<%# Eval("email") %>">  <asp:Label ID="lbl_note" runat="server" Text='<%# Eval("email") %>' /></a>
                            </td>



                                 <td>
                                <asp:Label ID="lbl_paycircle" runat="server" Text='<%# Eval("paycircle") %>' />
                            </td>

                                 <td>
                                <asp:Label ID="lbl_payment" runat="server" Text='<%# Eval("payment") %>' />
                            </td>

                              <td>
                                <asp:Label ID="lbl_incoterm" runat="server" Text='<%# Eval("incoterm") %>' />
                            </td>


                              <td>
                                <asp:Label ID="lbl_purchaseuser" runat="server" Text='<%# Eval("purchaseuser") %>' />
                            </td>

                            
                           
                             <td>
                                <asp:Label ID="lbl_groupname" runat="server" Text='<%# Eval("groupname") %>' />
                            </td>

                        

                        </tr>
                    </ItemTemplate>
                   
   
     
             </asp:ListView>
                 
 



                         
<div>
 <asp:DataPager ID="DataPager1"   class="btn-group btn-group-sm"  
      PagedControlID="ListView1" runat="server" PageSize=10>
 <Fields>
           
     
            <asp:NextPreviousPagerField 
                PreviousPageText="<" 
                FirstPageText="|<" 
                ShowPreviousPageButton="true"
                ShowFirstPageButton="true" 
                ShowNextPageButton="false" 
                ShowLastPageButton="false"
                ButtonCssClass="btn btn-default" 
                RenderNonBreakingSpacesBetweenControls="false" 
                RenderDisabledButtonsAsLabels="false" />

            <asp:NumericPagerField 
                ButtonType="Link" 
                CurrentPageLabelCssClass="btn btn-primary disabled"  
                RenderNonBreakingSpacesBetweenControls="false"
                NumericButtonCssClass="btn btn-default" 
                ButtonCount="10" 
                NextPageText="..." 
                NextPreviousButtonCssClass="btn btn-default" />
            
           <asp:NextPreviousPagerField 
               NextPageText=">" 
               LastPageText=">|" 
               ShowNextPageButton="true"
               ShowLastPageButton="true" 
               ShowPreviousPageButton="false" 
               ShowFirstPageButton="false"
               ButtonCssClass="btn btn-default" 
               RenderNonBreakingSpacesBetweenControls="false" 
               RenderDisabledButtonsAsLabels="false"/>
      

  </Fields> 
</asp:DataPager>
</div>



  <asp:SqlDataSource ID="SqlDataSource1" 
    
     ConnectionString='<%$ ConnectionStrings:ConnectionString %>'
    runat="server"  
        SelectCommand=" select id, supplyname,email,  supplycode, contactname, purchaseuser, mobile,address,note,groupname,paycircle,payment,bankusername,incoterm from purchase_supply WHERE (@groupname='' or groupname=@groupname) and (@key='' or supplyname+supplycode like '%'+@key+'%') ORDER BY [id] DESC" 
     
           OnSelecting="SqlDataSource1_Selecting"  
 
  >
      
        
        <SelectParameters> 
            <asp:ControlParameter    ControlID="ddl_group"  Name="groupname" Type="String" ConvertEmptyStringToNull="false"/>
            <asp:ControlParameter ControlID="txt_key" Name="key" Type="String" ConvertEmptyStringToNull="false" />
        </SelectParameters>
         
 
 

  
 
 
 </asp:SqlDataSource>

 
                
                        
                    
                    </ContentTemplate>

                </asp:UpdatePanel>
            
                       
                




 

 





 
                 </div>







     





     <input  ID="selsid" name="selsid" type="hidden"  />

      <input type="hidden" name="hf_ids" id="hf_ids" />
     




</asp:Content>
