using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; using WalkingTec.Mvvm.Core; using WalkingTec.Mvvm.Core.Extensions; using IoTGateway.Model; namespace IoTGateway.ViewModel.BasicData.DeviceVMs { public partial class DeviceTemplateVM : BaseTemplateVM { [Display(Name = "名称")] public ExcelPropety DeviceName_Excel = ExcelPropety.CreateProperty(x => x.DeviceName); [Display(Name = "排序")] public ExcelPropety Index_Excel = ExcelPropety.CreateProperty(x => x.Index); [Display(Name = "描述")] public ExcelPropety Description_Excel = ExcelPropety.CreateProperty(x => x.Description); public ExcelPropety Driver_Excel = ExcelPropety.CreateProperty(x => x.DriverId); [Display(Name = "自启动")] public ExcelPropety AutoStart_Excel = ExcelPropety.CreateProperty(x => x.AutoStart); [Display(Name = "类型")] public ExcelPropety DeviceTypeEnum_Excel = ExcelPropety.CreateProperty(x => x.DeviceTypeEnum); [Display(Name = "_Admin.Parent")] public ExcelPropety Parent_Excel = ExcelPropety.CreateProperty(x => x.ParentId); protected override void InitVM() { Driver_Excel.DataType = ColumnDataType.ComboBox; Driver_Excel.ListItems = DC.Set().GetSelectListItems(Wtm, y => y.DriverName); Parent_Excel.DataType = ColumnDataType.ComboBox; Parent_Excel.ListItems = DC.Set().GetSelectListItems(Wtm, y => y.DeviceName); } } public class DeviceImportVM : BaseImportVM { } }