| | |
| | | /// </summary> |
| | | public HydroReservoirViewModel(Yw.Model.HydroReservoirInfo rhs) : base(rhs) |
| | | { |
| | | this.PoolElev = rhs.PoolElev; |
| | | this.Head = rhs.Head; |
| | | this.PoolElev = rhs.PoolElev.HasValue ? Math.Round(rhs.PoolElev.Value, 4) : null; |
| | | this.Head = Math.Round(rhs.Head, 2); |
| | | this.HeadPattern = rhs.HeadPattern; |
| | | |
| | | this.Vmo = rhs; |
| | |
| | | /// </summary> |
| | | public HydroReservoirViewModel(Yw.Model.HydroReservoirInfo rhs, HydroCalcuNodeResult calcuResult) : base(rhs, calcuResult) |
| | | { |
| | | this.PoolElev = rhs.PoolElev; |
| | | this.Head = rhs.Head; |
| | | this.PoolElev = rhs.PoolElev.HasValue ? Math.Round(rhs.PoolElev.Value, 4) : null; |
| | | this.Head = Math.Round(rhs.Head, 2); |
| | | this.HeadPattern = rhs.HeadPattern; |
| | | |
| | | this.Vmo = rhs; |
| | |
| | | /// 总水头 |
| | | /// </summary> |
| | | [DisplayName("总水头(m)")] |
| | | public double? Head { get; set; } |
| | | public double Head { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 水头模式 |
| | |
| | | /// </summary> |
| | | public new Yw.Model.HydroReservoirInfo Vmo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public override void Update() |
| | | { |
| | | base.Update(); |
| | | if (this.Vmo == null) |
| | | { |
| | | return; |
| | | } |
| | | this.PoolElev = this.Vmo.PoolElev.HasValue ? Math.Round(this.Vmo.PoolElev.Value, 4) : null; |
| | | this.Head = Math.Round(this.Vmo.Head, 2); |
| | | this.HeadPattern = this.Vmo.HeadPattern; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |