<%@ Page Title="" Language="C#" MasterPageFile="~/helpdesk/Pc.master" AutoEventWireup="true" CodeBehind="Pcparam.aspx.cs" Inherits="helpdesk.helpdesk.Pcparam" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">








    
     
  <ul class="nav nav-tabs">
		 
              <li   class='<%=IsHover("spec")%>'><a href='pcparam.aspx?types=spec'>机器型号</a></li>
		      <li    class='<%=IsHover("os")%>'><a href='pcparam.aspx?types=os'>操作系统</a></li>
          
            <li   class='<%=IsHover("office")%>' ><a href='pcparam.aspx?types=office'>Office</a></li>
		    <li   class='<%=IsHover("usetype")%>'><a href='pcparam.aspx?types=usetype'>机器用途</a></li>
           

               <li   class='<%=IsHover("belongto")%>'><a href='pcparam.aspx?types=belongto'>所属组织</a></li>

             
               <li   class='<%=IsHover("storeplace")%>'><a href='pcparam.aspx?types=storeplace'>存放位置</a></li>

        <li   class='<%=IsHover("discardreason")%>'><a href='pcparam.aspx?types=discardreason'>报废原因</a></li> 

              <li    class='<%=IsHover("hardware")%>'><a href='pcparam.aspx?types=hardware'>硬件模板</a></li>


            <li   class='<%=IsHover("software")%>'><a href='pcparam.aspx?types=software'>软件模板</a></li>
         
           <li   class='<%=IsHover("assettype")%>'><a href='pcparam.aspx?types=assettype'>外设类别</a></li>
            <li   class='<%=IsHover("softtype")%>'><a href='pcparam.aspx?types=softtype'>软件类别</a></li> 
            
      <li   class='<%=IsHover("lng")%>'><a href='pcparam.aspx?types=lng'>编程语言</a></li> 
          
        <li   class='<%=IsHover("db")%>'><a href='pcparam.aspx?types=db'>数据库</a></li> 
          

              
	   </ul>
 










  




 



 
 




    <br /><br />

    

    名称： <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 bg-green" OnClick="txt_add_Click" />


  <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 [helpdesk_pc_param] WHERE [id] = @id" 
            InsertCommand="INSERT INTO [helpdesk_pc_param] ([paramname],types) VALUES (@paramname,@types)" 
            
            SelectCommand="SELECT * FROM [helpdesk_pc_param] where types=@types order by id desc " 
            UpdateCommand="UPDATE [helpdesk_pc_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>
