Update: New Device UI

This commit is contained in:
Gary Sharp
2013-06-18 17:18:19 +10:00
parent d6be58b5c7
commit b7dc05dd65
63 changed files with 5068 additions and 2626 deletions
@@ -5,6 +5,7 @@ using System.Text;
using Disco.Models.Repository;
using Disco.Data.Repository;
using Disco.Data.Configuration.Modules;
using Disco.Models.BI.Config;
namespace Disco.BI.Extensions
{
@@ -17,6 +18,18 @@ namespace Disco.BI.Extensions
Expressions.ExpressionCache.InvalidateKey(ComputerNameExpressionCacheModule, deviceProfile.Id.ToString());
}
public static OrganisationAddress DefaultOrganisationAddressDetails(this DeviceProfile deviceProfile, DiscoDataContext dbContext)
{
if (deviceProfile.DefaultOrganisationAddress.HasValue)
{
return dbContext.DiscoConfiguration.OrganisationAddresses.GetAddress(deviceProfile.DefaultOrganisationAddress.Value);
}
else
{
return null;
}
}
public static bool CanDelete(this DeviceProfile dp, DiscoDataContext dbContext)
{
// Can't Delete Default Profile (Id: 1)