‎06-15-2015 03:25 PM
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="LastAssets.aspx.cs" Inherits="LastAssets" ResponseEncoding="utf-8" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="LS" %>
<% Response.CacheControl = "no-cache";%>
<% Response.AddHeader("Pragma", "no-cache"); %>
<% Response.Expires = -1; %>
<% LS.User.Current().CheckWebsiteAccess(); %>
<div style="margin: 2px;">
<table border="0" cellspacing="1" cellpadding="0">
<% foreach (DataRow myrow in dt.Rows)
{%> <tr>
<td align="left" valign="top" class="stippel"><img src="images/<% if ((int) myrow["assettype"] == -1)
{%><%: myrow["compimage"] %><% }
else
{%><%: myrow["AssetTypeIcon10"] %><% }%>" width="10" height="10" hspace="3" vspace="2" /></td>
<td align="left" valign="top" class="stippel"><a class="popup" rel="<%: myrow["AssetID"] %>" href="<%=ResolveUrl("~/")%>Asset.aspx?AssetID=<%: myrow["AssetID"] %>"><%: myrow["AssetName"] %></a><br />
</td>
<td align="left" valign="top" class="stippel"><%try{%> <span class="sml"><%= ((DateTime)myrow["lasttime"]).ToString(LS.User.Current().DateFormatTime)%></span><%}catch{}%></td>
</tr>
<% } %>
</table>
</div>
<%= AutoRefresh(30) %>
Solved! Go to Solution.
‎06-16-2015 03:22 PM
Select Top 1000000 tblState.Statename,
Count(tblAssets.AssetID) As Number
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblState On tblState.State = tblAssetCustom.State
Where tsysAssetTypes.AssetTypename like 'apple mac'
Group By tblState.Statename
Order By tblState.Statename
‎06-16-2015 05:03 PM
‎06-16-2015 03:22 PM
Select Top 1000000 tblState.Statename,
Count(tblAssets.AssetID) As Number
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblState On tblState.State = tblAssetCustom.State
Where tsysAssetTypes.AssetTypename like 'apple mac'
Group By tblState.Statename
Order By tblState.Statename
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now