GIT: perform LF normalization
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceModel
|
||||
{
|
||||
public class DeviceComponentsModel
|
||||
{
|
||||
public int? DeviceModelId { get; set; }
|
||||
public List<Disco.Models.Repository.DeviceComponent> DeviceComponents { get; set; }
|
||||
|
||||
public List<Disco.Models.Repository.JobSubType> JobSubTypes { get; set; }
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceModel
|
||||
{
|
||||
public class DeviceComponentsModel
|
||||
{
|
||||
public int? DeviceModelId { get; set; }
|
||||
public List<Disco.Models.Repository.DeviceComponent> DeviceComponents { get; set; }
|
||||
|
||||
public List<Disco.Models.Repository.JobSubType> JobSubTypes { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,30 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Disco.Data.Repository;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceModel
|
||||
{
|
||||
public class IndexModel
|
||||
{
|
||||
public List<_IndexModelDeviceModel> DeviceModels { get; set; }
|
||||
|
||||
public static IndexModel Build(DiscoDataContext dbContext)
|
||||
{
|
||||
var m = new IndexModel();
|
||||
m.DeviceModels = dbContext.DeviceModels.OrderBy(dm => dm.Description).Select(dm => new _IndexModelDeviceModel()
|
||||
{
|
||||
Id = dm.Id,
|
||||
Name = dm.Description,
|
||||
Manufacturer = dm.Manufacturer,
|
||||
Model = dm.Model,
|
||||
ModelType = dm.ModelType,
|
||||
DeviceCount = dm.Devices.Count
|
||||
}).ToList();
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Disco.Data.Repository;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceModel
|
||||
{
|
||||
public class IndexModel
|
||||
{
|
||||
public List<_IndexModelDeviceModel> DeviceModels { get; set; }
|
||||
|
||||
public static IndexModel Build(DiscoDataContext dbContext)
|
||||
{
|
||||
var m = new IndexModel();
|
||||
m.DeviceModels = dbContext.DeviceModels.OrderBy(dm => dm.Description).Select(dm => new _IndexModelDeviceModel()
|
||||
{
|
||||
Id = dm.Id,
|
||||
Name = dm.Description,
|
||||
Manufacturer = dm.Manufacturer,
|
||||
Model = dm.Model,
|
||||
ModelType = dm.ModelType,
|
||||
DeviceCount = dm.Devices.Count
|
||||
}).ToList();
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Disco.Services.Plugins;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceModel
|
||||
{
|
||||
public class ShowModel
|
||||
{
|
||||
public Disco.Models.Repository.DeviceModel DeviceModel { get; set; }
|
||||
|
||||
public Models.DeviceModel.DeviceComponentsModel DeviceComponentsModel { get; set; }
|
||||
|
||||
public List<PluginFeatureManifest> WarrantyProviders { get; set; }
|
||||
|
||||
public bool CanDelete { get; set; }
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Disco.Services.Plugins;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceModel
|
||||
{
|
||||
public class ShowModel
|
||||
{
|
||||
public Disco.Models.Repository.DeviceModel DeviceModel { get; set; }
|
||||
|
||||
public Models.DeviceModel.DeviceComponentsModel DeviceComponentsModel { get; set; }
|
||||
|
||||
public List<PluginFeatureManifest> WarrantyProviders { get; set; }
|
||||
|
||||
public bool CanDelete { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceModel
|
||||
{
|
||||
public class _IndexModelDeviceModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Manufacturer { get; set; }
|
||||
public string Model { get; set; }
|
||||
public string ModelType { get; set; }
|
||||
public int DeviceCount { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
if (string.IsNullOrEmpty(Name))
|
||||
return string.Format("{0} {1}", Manufacturer, Model);
|
||||
else
|
||||
return Name;
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceModel
|
||||
{
|
||||
public class _IndexModelDeviceModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Manufacturer { get; set; }
|
||||
public string Model { get; set; }
|
||||
public string ModelType { get; set; }
|
||||
public int DeviceCount { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
if (string.IsNullOrEmpty(Name))
|
||||
return string.Format("{0} {1}", Manufacturer, Model);
|
||||
else
|
||||
return Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user