<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="Param.aspx.cs" Inherits="purchase.Admin.Param" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">


    
    
    
 
<div class="formsMenu" runat="server" id="div_1" style="margin-top:20px;">
		 <ul class="nav nav-tabs">
		 
           
		      <li    class='<%=IsHover("shipmethod")%>'><a href='param.aspx?types=shipmethod'>运输方式</a></li>
          
            <li   class='<%=IsHover("paycircle")%>' ><a href='param.aspx?types=paycircle'>帐期</a></li>



		    <li   class='<%=IsHover("payment")%>'><a href='param.aspx?types=payment'>付款方式</a></li>
              
            <li class='<%=IsHover("invoicetype")%>'><a href='param.aspx?types=invoicetype'>发票类型</a></li>
          

               <li   class='<%=IsHover("Incoterm")%>'><a href='param.aspx?types=Incoterm'>商务术语</a></li>

              <li   class='<%=IsHover("unit")%>'><a href='param.aspx?types=unit'>物料单位</a></li>

                 <li   class='<%=IsHover("unit")%>'><a href='param.aspx?types=in_store_company'>入账公司</a></li>

              
                <li   class='<%=IsHover("unit")%>'><a href='param.aspx?types=store'>仓库</a></li>

	   </ul>
 </div>









 

 


 





    <br /><br />

    <asp:Panel runat="server" ID="pnl_add" Visible="false">

   
    名称： <asp:TextBox runat="server" ID="txt_cat" CssClass="form-control"  style="width:200px; display:inline-block"> </asp:TextBox>
    <asp:Button runat="server" ID="txt_add" Text="添加" CssClass="btn btn-sm btn-flat btn-success" OnClick="txt_add_Click" />

     </asp:Panel>



  <br /><br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="id" DataSourceID="SqlDataSource1"  
             Width="600px"
             GridLines="None"
             CssClass="table table-hover"
            > 
            <Columns>
            
                <asp:BoundField  HeaderStyle-Width="100px"  DataField="id" HeaderText="ID" InsertVisible="False" 
                    ReadOnly="True" SortExpression="ID" />
                <asp:BoundField DataField="paramname" HeaderText="名称" 
                    SortExpression="paramname" />


                    <asp:CommandField  HeaderStyle-Width="120px" ButtonType="Button"   
                        ControlStyle-CssClass="btn btn-flat btn-primary btn-sm"   
                        ShowDeleteButton="True" ShowEditButton="True"  HeaderText="操作"
                        DeleteText="删除" EditText="编辑" UpdateText="更新" 
                         
                        CancelText="取消" />

            </Columns>
                 
   
     
        </asp:GridView>
  


        <asp:SqlDataSource ID="SqlDataSource1" 
         ConnectionString="<%$ ConnectionStrings:connectionstring %>"
         runat="server" 
            DeleteCommand="DELETE FROM [purchase_param] WHERE [id] = @id" 
            InsertCommand="INSERT INTO [purchase_param] ([paramname],types) VALUES (@paramname,@types)" 
            
            SelectCommand="SELECT * FROM [purchase_param] where types=@types order by id asc " 
            UpdateCommand="UPDATE [purchase_param] SET [paramname] = @paramname WHERE [id] = @id">
          
          <SelectParameters>
          <asp:QueryStringParameter   Name="types" QueryStringField="types" Type="String" />
          </SelectParameters>
           
             <DeleteParameters>
                <asp:Parameter Name="id" Type="Int32" />
            </DeleteParameters>
           
            
             <UpdateParameters>
                <asp:Parameter Name="paramname" Type="String" />
                <asp:Parameter Name="id" Type="Int32" />
            </UpdateParameters>
           
            
             <InsertParameters>
              <asp:QueryStringParameter   Name="types" QueryStringField="types" Type="String" />
              <asp:Parameter Name="paramname" Type="String" />
            </InsertParameters>
        </asp:SqlDataSource>

      
















</asp:Content>
