| | |
| | | |
| | | 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(); |
| | | } |
| | | if (rhs.MaterialName == null) |
| | | { |
| | | this.Material = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Material = rhs.MaterialName.ToString(); |
| | | } |
| | | this.Coefficient = rhs.Coefficient; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.SeriesType = rhs.SeriesType; |
| | | this.ValveLift = rhs.ValveLift; |
| | | this.SortCode = rhs.SortCode; |
| | | } |
| | | |
| | | public void Reset(Vmo.ValveMainVmo rhs) |
| | | public void Reset(Vmo.AssetsValveMainVmo rhs) |
| | | { |
| | | this.ID = rhs.ID; |
| | | this.Name = rhs.Name; |
| | | this.Description = rhs.Description; |
| | | this.Material = rhs.Material; |
| | | this.Material = rhs.MaterialName; |
| | | if (rhs.Caliber == null) |
| | | { |
| | | this.Caliber = "默认"; |
| | |
| | | { |
| | | this.Caliber = rhs.Caliber.ToString(); |
| | | } |
| | | if (rhs.MaterialName == null) |
| | | { |
| | | this.Material = "默认"; |
| | | } |
| | | else |
| | | { |
| | | this.Material = rhs.MaterialName.ToString(); |
| | | } |
| | | this.Coefficient = rhs.Coefficient; |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.SeriesType = rhs.SeriesType; |
| | | this.SortCode = rhs.SortCode; |
| | | this.ValveLift = rhs.ValveLift; |
| | | } |
| | | |
| | | [DisplayName("ID")] |
| | |
| | | /// </summary> |
| | | [DisplayName("类型")] |
| | | [Browsable(true)] |
| | | public HStation.Assets.eValveSeriesType SeriesType { get; set; } |
| | | public HStation.Assets.eAssetsValveSeriesType SeriesType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 说明 |
| | |
| | | public string? Description { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 阀门状态 |
| | | /// </summary> |
| | | [DisplayName("阀门状态")] |
| | | [Browsable(true)] |
| | | public int ValveLift { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 排序码 |
| | | /// </summary> |
| | | [DisplayName("排序码")] |