| | |
| | | using Yw.Dto; |
| | | using Yw.Vmo.Core; |
| | | |
| | | namespace HStation.WinFrmUI.Basic |
| | | { |
| | | public class SysPropViewModel : Yw.Dto.SysPropDto |
| | | public class SysPropViewModel |
| | | { |
| | | public SysPropViewModel(SysPropDto rhs) |
| | | public SysPropViewModel(Yw.Vmo.SysProp rhs) |
| | | { |
| | | ID = rhs.ID; |
| | | GroupID = rhs.GroupID; |
| | | TypeID = rhs.TypeID; |
| | | Name = rhs.Name; |
| | | Code = rhs.Code; |
| | | if (rhs.Format == Yw.Basic.ePropFormat.Bigint) |
| | | if (rhs.Format == Yw.Vmo.Core.ePropFormat.Bigint) |
| | | { |
| | | this.FormatDisPlayName = "长整数"; |
| | | } |
| | | else if (rhs.Format == Yw.Basic.ePropFormat.Integer) |
| | | else if (rhs.Format == Yw.Vmo.Core.ePropFormat.Integer) |
| | | { |
| | | this.FormatDisPlayName = "整数"; |
| | | } |
| | | else if (rhs.Format == Yw.Basic.ePropFormat.MultiText) |
| | | else if (rhs.Format == Yw.Vmo.Core.ePropFormat.MultiText) |
| | | { |
| | | this.FormatDisPlayName = "多文本"; |
| | | } |
| | | else if (rhs.Format == Yw.Basic.ePropFormat.Time) |
| | | else if (rhs.Format == Yw.Vmo.Core.ePropFormat.Time) |
| | | { |
| | | this.FormatDisPlayName = "时间"; |
| | | } |
| | | else if (rhs.Format == Yw.Basic.ePropFormat.Numeric) |
| | | else if (rhs.Format == Yw.Vmo.Core.ePropFormat.Numeric) |
| | | { |
| | | this.FormatDisPlayName = "数值"; |
| | | } |
| | | else if (rhs.Format == Yw.Basic.ePropFormat.Text) |
| | | else if (rhs.Format == Yw.Vmo.Core.ePropFormat.Text) |
| | | { |
| | | this.FormatDisPlayName = "文本"; |
| | | } |
| | |
| | | Description = rhs.Description; |
| | | } |
| | | |
| | | public void Reset(UpdateSysPropInput rhs) |
| | | public void Reset(Yw.Vmo.SysProp rhs) |
| | | { |
| | | ID = rhs.ID; |
| | | Name = rhs.Name; |
| | | Code = rhs.Code; |
| | | if (rhs.Format == Yw.Basic.ePropFormat.Bigint) |
| | | if (rhs.Format == Yw.Vmo.Core.ePropFormat.Bigint) |
| | | { |
| | | this.FormatDisPlayName = "长整数"; |
| | | } |
| | | else if (rhs.Format == Yw.Basic.ePropFormat.Integer) |
| | | else if (rhs.Format == Yw.Vmo.Core.ePropFormat.Integer) |
| | | { |
| | | this.FormatDisPlayName = "整数"; |
| | | } |
| | | else if (rhs.Format == Yw.Basic.ePropFormat.MultiText) |
| | | else if (rhs.Format == Yw.Vmo.Core.ePropFormat.MultiText) |
| | | { |
| | | this.FormatDisPlayName = "多文本"; |
| | | } |
| | | else if (rhs.Format == Yw.Basic.ePropFormat.Time) |
| | | else if (rhs.Format == Yw.Vmo.Core.ePropFormat.Time) |
| | | { |
| | | this.FormatDisPlayName = "时间"; |
| | | } |
| | | else if (rhs.Format == Yw.Basic.ePropFormat.Numeric) |
| | | else if (rhs.Format == Yw.Vmo.Core.ePropFormat.Numeric) |
| | | { |
| | | this.FormatDisPlayName = "数值"; |
| | | } |
| | | else if (rhs.Format == Yw.Basic.ePropFormat.Text) |
| | | else if (rhs.Format == Yw.Vmo.Core.ePropFormat.Text) |
| | | { |
| | | this.FormatDisPlayName = "文本"; |
| | | } |
| | |
| | | public string ExtendTypeDisPlayName { get; set; } |
| | | |
| | | public string FormatDisPlayName { get; set; } |
| | | |
| | | public long ID { get; set; } |
| | | |
| | | public long GroupID { get; set; } |
| | | |
| | | public long TypeID { get; set; } |
| | | |
| | | public string Name { get; set; } |
| | | |
| | | public string Code { get; set; } |
| | | |
| | | public ePropFormat Format { get; set; } |
| | | |
| | | public string UnitName { get; set; } |
| | | |
| | | public bool IsNull { get; set; } |
| | | |
| | | public string DefaultValue { get; set; } |
| | | |
| | | public int SortCode { get; set; } |
| | | |
| | | public string Description { get; set; } |
| | | } |
| | | } |