duheng
2024-08-01 df724e202d16eda69bf8a67c683e2b70ccaca4f7
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
using Yw.Dto;
 
namespace HStation.WinFrmUI.Basic
{
    public class SysPropViewModel : Yw.Dto.SysPropDto
    {
        public SysPropViewModel(SysPropDto rhs)
        {
            ID = rhs.ID;
            GroupID = rhs.GroupID;
            TypeID = rhs.TypeID;
            Name = rhs.Name;
            Code = rhs.Code;
            if (rhs.Format == Yw.Basic.ePropFormat.Bigint)
            {
                this.FormatDisPlayName = "长整数";
            }
            else if (rhs.Format == Yw.Basic.ePropFormat.Integer)
            {
                this.FormatDisPlayName = "整数";
            }
            else if (rhs.Format == Yw.Basic.ePropFormat.MultiText)
            {
                this.FormatDisPlayName = "多文本";
            }
            else if (rhs.Format == Yw.Basic.ePropFormat.Time)
            {
                this.FormatDisPlayName = "时间";
            }
            else if (rhs.Format == Yw.Basic.ePropFormat.Numeric)
            {
                this.FormatDisPlayName = "数值";
            }
            else if (rhs.Format == Yw.Basic.ePropFormat.Text)
            {
                this.FormatDisPlayName = "文本";
            }
            else
            {
                this.FormatDisPlayName = "布尔";
            }
            UnitName = rhs.UnitName;
            IsNull = rhs.IsNull;
            DefaultValue = rhs.DefaultValue;
            SortCode = rhs.SortCode;
            Description = rhs.Description;
        }
 
        public void Reset(UpdateSysPropInput rhs)
        {
            ID = rhs.ID;
            Name = rhs.Name;
            Code = rhs.Code;
            if (rhs.Format == Yw.Basic.ePropFormat.Bigint)
            {
                this.FormatDisPlayName = "长整数";
            }
            else if (rhs.Format == Yw.Basic.ePropFormat.Integer)
            {
                this.FormatDisPlayName = "整数";
            }
            else if (rhs.Format == Yw.Basic.ePropFormat.MultiText)
            {
                this.FormatDisPlayName = "多文本";
            }
            else if (rhs.Format == Yw.Basic.ePropFormat.Time)
            {
                this.FormatDisPlayName = "时间";
            }
            else if (rhs.Format == Yw.Basic.ePropFormat.Numeric)
            {
                this.FormatDisPlayName = "数值";
            }
            else if (rhs.Format == Yw.Basic.ePropFormat.Text)
            {
                this.FormatDisPlayName = "文本";
            }
            else
            {
                this.FormatDisPlayName = "布尔";
            }
            UnitName = rhs.UnitName;
            IsNull = rhs.IsNull;
            DefaultValue = rhs.DefaultValue;
            Description = rhs.Description;
        }
 
        public string ExtendTypeDisPlayName { get; set; }
 
        public string FormatDisPlayName { get; set; }
    }
}