using PBS.Model; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace PBS.WinFrmUI { public class ElecPriceViewModel { public ElecPriceViewModel() { } public ElecPriceViewModel(string belongName,Vmo.ElecPriceHourSetting hour) { this.BelongName = belongName; this.StartHour = hour.StartHour; this.EndHour = hour.EndHour; this.Price = hour.Price; this.Description = hour.Description; this.TimeFrame = hour.TimeFrame; } public void Reset(Vmo.ElecPriceHourSetting hour) { this.StartHour = hour.StartHour; this.EndHour = hour.EndHour; this.Price = hour.Price; this.Description = hour.Description; this.TimeFrame = hour.TimeFrame; } [DisplayName("月份")] [Browsable(true)] public string BelongName { get; set; } [DisplayName("开始月份")] [Browsable(true)] public int StartMonth { get; set; } [DisplayName("结束月份")] [Browsable(true)] public int EndMonth { get; set; } /// /// 时段 /// [DisplayName("时段")] [Browsable(true)] public eTimeFrame TimeFrame { get; set; } /// /// 开始小时(0-23) /// [DisplayName("开始时间")] [Browsable(true)] public int StartHour { get; set; } /// /// 结束小时(0-23) /// [DisplayName("结束时间")] [Browsable(true)] public int EndHour { get; set; } /// /// 价格 /// [DisplayName("价格")] [Browsable(true)] public double Price { get; set; } /// /// 备注 /// [DisplayName("备注")] [Browsable(true)] public string Description { get; set; } } }