| | |
| | | using System.ComponentModel; |
| | | |
| | | namespace HStation.WinFrmUI.Assets |
| | | namespace HStation.WinFrmUI.Assets |
| | | { |
| | | public class ValveMainViewModel |
| | | public class AssetsValveMainViewModel |
| | | { |
| | | public ValveMainViewModel(Vmo.ValveMainVmo rhs) |
| | | public AssetsValveMainViewModel(Vmo.AssetsValveMainVmo rhs) |
| | | { |
| | | this.ID = rhs.ID; |
| | | this.Name = rhs.Name; |
| | | this.Description = rhs.Description; |
| | | this.Material = rhs.Material; |
| | | if (rhs.Caliber == null) |
| | | { |
| | | this.Caliber = "默认"; |
| | |
| | | { |
| | | this.Caliber = rhs.Caliber.ToString(); |
| | | } |
| | | this.Coefficient = rhs.Coefficient; |
| | | if (rhs.Material == null || rhs.Material == string.Empty) |
| | | { |
| | | this.Material = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Material = rhs.Material.ToString(); |
| | | } |
| | | this.Coefficient = rhs.MinorLoss; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.SeriesType = rhs.SeriesType; |
| | | this.SortCode = rhs.SortCode; |
| | | this.KeyWord = string.Join(",", rhs.KeyWords); |
| | | this.ValveSetting = rhs.ValveSetting; |
| | | } |
| | | |
| | | public void Reset(Vmo.ValveMainVmo rhs) |
| | | public void Reset(Vmo.AssetsValveMainVmo rhs) |
| | | { |
| | | this.ID = rhs.ID; |
| | | this.Name = rhs.Name; |
| | |
| | | { |
| | | this.Caliber = rhs.Caliber.ToString(); |
| | | } |
| | | this.Coefficient = rhs.Coefficient; |
| | | if (rhs.Material == null || rhs.Material == string.Empty) |
| | | { |
| | | this.Material = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Material = rhs.Material.ToString(); |
| | | } |
| | | this.Coefficient = rhs.MinorLoss; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.SeriesType = rhs.SeriesType; |
| | | this.SortCode = rhs.SortCode; |
| | | this.KeyWord = string.Join(",", rhs.KeyWords); |
| | | this.ValveSetting = rhs.ValveSetting; |
| | | } |
| | | |
| | | [DisplayName("ID")] |
| | |
| | | public double Coefficient { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 类型 |
| | | /// </summary> |
| | | [DisplayName("类型")] |
| | | [Browsable(true)] |
| | | public HStation.Assets.eValveSeriesType SeriesType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 说明 |
| | | /// </summary> |
| | | [DisplayName("说明")] |
| | | [Browsable(true)] |
| | | public string? Description { get; set; } |
| | | public string Description { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 排序码 |
| | |
| | | /// 创建人 |
| | | /// </summary> |
| | | [DisplayName("创建人")] |
| | | [Browsable(true)] |
| | | [Browsable(false)] |
| | | public string CreateName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建时间 |
| | | /// </summary> |
| | | [DisplayName("创建时间")] |
| | | [Browsable(true)] |
| | | [Browsable(false)] |
| | | public string CreateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 识别关键字 |
| | | /// </summary> |
| | | [DisplayName("关键字")] |
| | | [Browsable(true)] |
| | | public string KeyWord { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 阀门设置 |
| | | /// </summary> |
| | | [DisplayName("阀门设置")] |
| | | [Browsable(true)] |
| | | public string ValveSetting { get; set; } |
| | | } |
| | | } |