Feature: Device Importing & Exporting
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Disco.Models.UI.Device;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.UI.Device;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
@@ -9,7 +10,11 @@ namespace Disco.Web.Models.Device
|
||||
{
|
||||
public class ImportModel : DeviceImportModel
|
||||
{
|
||||
[Required, Display(Name="Import File")]
|
||||
[Required, Display(Name="CSV Import File")]
|
||||
public HttpPostedFileBase ImportFile { get; set; }
|
||||
|
||||
public List<DeviceModel> DeviceModels { get; set; }
|
||||
public List<DeviceProfile> DeviceProfiles { get; set; }
|
||||
public List<DeviceBatch> DeviceBatches { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using Disco.Models.BI.Device;
|
||||
using Disco.Models.UI.Device;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Disco.Web.Models.Device
|
||||
{
|
||||
public class ImportReviewModel : DeviceImportReviewModel
|
||||
{
|
||||
public string ImportParseTaskId { get; set; }
|
||||
public string ImportFilename { get; set; }
|
||||
public List<ImportDevice> ImportDevices { get; set; }
|
||||
|
||||
public static ImportReviewModel FromImportDeviceSession(ImportDeviceSession session)
|
||||
{
|
||||
return new ImportReviewModel()
|
||||
{
|
||||
ImportParseTaskId = session.ImportParseTaskId,
|
||||
ImportFilename = session.ImportFilename,
|
||||
ImportDevices = session.ImportDevices
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user