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; }
|
|
/// <summary>
|
/// 时段
|
/// </summary>
|
[DisplayName("时段")]
|
[Browsable(true)]
|
public eTimeFrame TimeFrame { get; set; }
|
|
/// <summary>
|
/// 开始小时(0-23)
|
/// </summary>
|
[DisplayName("开始时间")]
|
[Browsable(true)]
|
public int StartHour { get; set; }
|
|
/// <summary>
|
/// 结束小时(0-23)
|
/// </summary>
|
[DisplayName("结束时间")]
|
[Browsable(true)]
|
public int EndHour { get; set; }
|
|
/// <summary>
|
/// 价格
|
/// </summary>
|
[DisplayName("价格")]
|
[Browsable(true)]
|
public double Price { get; set; }
|
|
/// <summary>
|
/// 备注
|
/// </summary>
|
[DisplayName("备注")]
|
[Browsable(true)]
|
public string Description { get; set; }
|
}
|
}
|