| | |
| | | { |
| | | public partial class IBoxFormEnergyAnalysis : DocumentPage |
| | | { |
| | | private string startCode = "[&start&]"; |
| | | private string endCode = "[&end&]"; |
| | | private string paramCode = "[¶m&]"; |
| | | private string getenergyanalyCode = "getenergyanaly";//获取能耗分析数据 |
| | | private string analydayCode = "analyday";//校验能耗分析 |
| | | |
| | | |
| | | public IBoxFormEnergyAnalysis() |
| | | { |
| | |
| | | _series_qds.CrosshairLabelPattern = "千吨水能耗:{V:N2} kW·h/km³"; |
| | | } |
| | | |
| | | private void InitDate() |
| | | public void InitDate() |
| | | { |
| | | this.dateEditStartDate.Text = DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"); |
| | | this.dateEditEndDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); |
| | | } |
| | | |
| | | public void HideButton() |
| | | { |
| | | simpleButton1.Visible = simpleButton2.Visible = simpleButton5.Visible = false; |
| | | } |
| | | |
| | | List<PumpEnergyViewModel> _models; |
| | | /// <summary> |
| | | /// 绑定数据 |
| | | /// </summary> |
| | | /// <param name="models"></param> |
| | | public void BindData(List<PumpEnergyViewModel> models) |
| | | { |
| | | _models = models; |
| | |
| | | private Series _series_ydl { get { return this.chartControl1.Series[0]; } } |
| | | private Series _series_qds { get { return this.chartControl1.Series[2]; } } |
| | | |
| | | private void SetChart(List<PumpEnergyViewModel> models) |
| | | public void SetChart(List<PumpEnergyViewModel> models) |
| | | { |
| | | this.chartControl1.BeginInit(); |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | this.chartControl1.EndInit(); |
| | | this.chartControl1.EndInit(); |
| | | } |
| | | |
| | | private void EboxFormEnergyAnalysis_Load(object sender, EventArgs e) |
| | |
| | | Search(); |
| | | } |
| | | |
| | | private void Search() |
| | | public void Search() |
| | | { |
| | | var m = new GetCalcValueModel() |
| | | { |
| | |
| | | EndDate = DateTime.Parse(this.dateEditEndDate.EditValue.ToString()), |
| | | }; |
| | | |
| | | SendText(startCode + getenergyanalyCode + paramCode + JsonHelper.Object2Json(m) + endCode); |
| | | SendText(IBoxHelper.startCode + IBoxHelper.getenergyanalyCode + IBoxHelper.paramCode + JsonHelper.Object2Json(m) + IBoxHelper.endCode); |
| | | } |
| | | |
| | | public event EventHandler<string> SendData; |
| | |
| | | if (dlg.ShowDialog() == DialogResult.OK) |
| | | { |
| | | var dt = dlg.CurrDateTime; |
| | | SendText(startCode + analydayCode + paramCode + dt + endCode); |
| | | SendText(IBoxHelper.startCode + IBoxHelper.analydayCode + IBoxHelper.paramCode + dt + IBoxHelper.endCode); |
| | | MessageBoxHelper.ShowInfo("操作成功"); |
| | | } |
| | | } |