liaoxujun@qq.com
2024-02-26 a71cfd93b85389e6473afdca1b7d6411bb676d0d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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 cy_scdz.Model.Set;
 
 
namespace cy_scdz.ViewModel.dictionary.DictionaryVMs
{
    public partial class DictionaryTemplateVM : BaseTemplateVM
    {
        [Display(Name = "名称")]
        public ExcelPropety Name_Excel = ExcelPropety.CreateProperty<Dictionary>(x => x.Name);
        [Display(Name = "Key")]
        public ExcelPropety Key_Excel = ExcelPropety.CreateProperty<Dictionary>(x => x.Key);
        [Display(Name = "值")]
        public ExcelPropety Value_Excel = ExcelPropety.CreateProperty<Dictionary>(x => x.Value);
        [Display(Name = "是否有效")]
        public ExcelPropety IsEn_Excel = ExcelPropety.CreateProperty<Dictionary>(x => x.IsEn);
        [Display(Name = "_Admin.Parent")]
        public ExcelPropety Parent_Excel = ExcelPropety.CreateProperty<Dictionary>(x => x.ParentId);
 
        protected override void InitVM()
        {
            Parent_Excel.DataType = ColumnDataType.ComboBox;
            Parent_Excel.ListItems = DC.Set<Dictionary>().GetSelectListItems(Wtm, y => y.Name);
        }
 
    }
 
    public class DictionaryImportVM : BaseImportVM<DictionaryTemplateVM, Dictionary>
    {
 
    }
 
}