ÎļþÃû´Ó WinFrmUI/HStation.WinFrmUI.Assets.Core/08-Nozzle/02-main/NozzleViewModel.cs ÐÞ¸Ä |
| | |
| | | |
| | | namespace HStation.WinFrmUI.Assets |
| | | { |
| | | public class NozzleViewModel |
| | | public class SprinklerViewModel |
| | | { |
| | | public NozzleViewModel() |
| | | public SprinklerViewModel() |
| | | { |
| | | } |
| | | |
| | | public NozzleViewModel(Vmo.AssetsNozzleMainVmo rhs) |
| | | public SprinklerViewModel(Vmo.AssetsSprinklerMainVmo rhs) |
| | | { |
| | | this.ID = rhs.ID; |
| | | this.Description = rhs.Description; |
| | |
| | | { |
| | | this.Caliber = rhs.Caliber.ToString(); |
| | | } |
| | | if (rhs.MaterialName == null) |
| | | if (rhs.Material == null) |
| | | { |
| | | this.MaterialName = "é»è®¤"; |
| | | this.Material = "é»è®¤"; |
| | | } |
| | | else |
| | | { |
| | | this.MaterialName = rhs.MaterialName.ToString(); |
| | | this.Material = rhs.Material.ToString(); |
| | | } |
| | | this.Name = rhs.Name; |
| | | this.SortCode = rhs.SortCode; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.IsDefault = rhs.IsDefault; |
| | | this.Coefficient = rhs.Coefficient; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.Angle = rhs.Angle; |
| | | this.Flowcoefficient = rhs.Flowcoefficient; |
| | | this.FlowMinorLoss = rhs.FlowMinorLoss; |
| | | } |
| | | |
| | | public void Reset(Vmo.AssetsNozzleMainVmo rhs) |
| | | public void Reset(Vmo.AssetsSprinklerMainVmo rhs) |
| | | { |
| | | this.ID = rhs.ID; |
| | | if (rhs.Caliber == null) |
| | |
| | | { |
| | | this.Caliber = rhs.Caliber.ToString(); |
| | | } |
| | | if (rhs.MaterialName == null) |
| | | if (rhs.Material == null) |
| | | { |
| | | this.MaterialName = "é»è®¤"; |
| | | this.Material = "é»è®¤"; |
| | | } |
| | | else |
| | | { |
| | | this.MaterialName = rhs.MaterialName.ToString(); |
| | | this.Material = rhs.Material.ToString(); |
| | | } |
| | | this.Description = rhs.Description; |
| | | this.Name = rhs.Name; |
| | | this.KeyWord = rhs.KeyWord; |
| | | this.IsDefault = rhs.IsDefault; |
| | | this.SortCode = rhs.SortCode; |
| | | this.Coefficient = rhs.Coefficient; |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.Angle = rhs.Angle; |
| | | this.Flowcoefficient = rhs.Flowcoefficient; |
| | | this.FlowMinorLoss = rhs.FlowMinorLoss; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [DisplayName("ææ")] |
| | | [Browsable(true)] |
| | | public string MaterialName { get; set; } |
| | | public string Material { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å·è§ |
| | | /// </summary> |
| | | [DisplayName("å·è§")] |
| | | [Browsable(true)] |
| | | public string Angle { get; set; } |
| | | public int? Angle { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç³»æ° |
| | | /// </summary> |
| | | [DisplayName("å·å°ç³»æ°")] |
| | | [Browsable(true)] |
| | | public double? Coefficient { get; set; } |
| | | public double MinorLoss { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æµéç³»æ° |
| | | /// </summary> |
| | | [DisplayName("æµéç³»æ°")] |
| | | [Browsable(true)] |
| | | private double? Flowcoefficient { get; set; } |
| | | private double? FlowMinorLoss { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¯å«å
³é®å |
| | | /// </summary> |
| | | [DisplayName("å
³é®å")] |
| | | [Browsable(true)] |
| | | public List<string> KeyWord { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æåºç |
| | |
| | | [DisplayName("æåºç ")] |
| | | [Browsable(true)] |
| | | public int SortCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¯å«å
³é®å |
| | | /// </summary> |
| | | [DisplayName("å
³é®å")] |
| | | [Browsable(true)] |
| | | public string KeyWord { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦é»è®¤ |
| | | /// </summary> |
| | | [DisplayName("æ¯å¦é»è®¤")] |
| | | [Browsable(true)] |
| | | public bool IsDefault { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 说æ |