<%@ Page Language="C#" EnableEventValidation="false" ValidateRequest="false" AutoEventWireup="true" CodeBehind="pc_login_scan_software_export.aspx.cs" Inherits="Helpdesk.Helpdesk.pc_login_scan_software_export" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title></title>
    
    
       <style>
 
 
  
   .btn{border:1px solid #919699; 
  background:#fcfcfc;  
  text-align:center; 
  text-decoration:none; 
  padding:1px 5px; 
  cursor:pointer; 
  margin-right:2px;
  font-size:12px;
  width: 78px;
 height: 25px;
}


 </style>
 
 
</head>
<body style=" font-family:Verdana; font-size:12px;">
    <form id="form1" runat="server">
    
    扫描结果
    
          <asp:Button ID="Button1" runat="server" Text="导出"    CssClass="btn"
            onclick="Button1_Click"/>
            
            
                  
             登录名或者软件名称 <asp:TextBox ID="txt_search" runat="server" ></asp:TextBox>
               <asp:Button ID="Button2" runat="server" Text="搜索"    CssClass="btn"
         />
            
             
 <div style="   ">

    <asp:GridView runat="server" ID="gv_list" AllowPaging="True" 
     PageSize=50    onrowdatabound="gv_list_RowDataBound"     AutoGenerateColumns="False" DataKeyNames="guid" DataSourceID="SqlDataSource1">
       <Columns>
                    <asp:BoundField DataField="pcname" HeaderText="机器名" 
                        SortExpression="pcname" />
                    <asp:BoundField DataField="ip" HeaderText="IP" SortExpression="ip" />
                    <asp:BoundField DataField="loginname" HeaderText="登录名" 
                        SortExpression="loginname" />
                    <asp:BoundField DataField="softwarename" HeaderText="软件名称" 
                        SortExpression="softwarename" />
                    <asp:BoundField DataField="installLocation" HeaderText="安装位置" 
                        SortExpression="installLocation" />
                    <asp:BoundField DataField="createdate" HeaderText="扫描日期" 
                        SortExpression="createdate" />
                </Columns>
                
                
  
                  <HeaderStyle BackColor="#E0E0E0" Font-Bold="True" Height="30" HorizontalAlign="Center" />
    <AlternatingRowStyle BackColor="#F2F2F2" />
      <RowStyle BackColor="#ffffff"  Height="28"/>
    <PagerSettings Mode="NumericFirstLast" />    
     
       
        </asp:GridView>
     </div>
        <br />
        
        
        <asp:SqlDataSource ID="SqlDataSource1"
         ConnectionString="<%$ ConnectionStrings:connectionstring %>"
         runat="server" 
            
             ProviderName="System.Data.SqlClient" 
            SelectCommand="SELECT  * from helpdesk_loginscan_software
where  ((@key='') or (loginname+softwarename  like '%'+@key+'%') )
ORDER BY [pcname] " 
            >
            
           <SelectParameters>
              <asp:ControlParameter DefaultValue="" Name="key" ControlID="txt_search" ConvertEmptyStringToNull="false" />
           </SelectParameters>
          
           
        </asp:SqlDataSource>
 
    </form>
</body>
</html>
