/// <summary> /// 参数设置 /// </summary> private void ArgumentSet() { if (firstyear == "0" || endyear == "0") { MsgBox.Show("请设置历史数据起始年结束年后再点计算单位设置"); return; } ForecastUnitConsumptionValueSet fmhs = new ForecastUnitConsumptionValueSet(); fmhs.isdhkw = isyqwh; if (fmhs.ShowDialog()==DialogResult.OK) { if (fmhs.isdhkw != isyqwh) { isyqwh = fmhs.isdhkw; DataRow dhrow = dhrows[0]; if (isyqwh) { dhrow["Title"] = "单耗(kWh/万元)"; } else { dhrow["Title"] = "单耗(Wh/元)"; } Ps_Forecast_Math dhpfm = DataConverter.RowToObject<Ps_Forecast_Math>(dhrow); Common.Services.BaseService.Update<Ps_Forecast_Math>(dhpfm); } CheckUnit(dhrows[0]["Title"].ToString()); ReChangeValue(); } }
/// <summary> /// 参数设置 /// </summary> private void ArgumentSet() { if (firstyear == "0" || endyear == "0") { MsgBox.Show("请设置历史数据起始年结束年后再点计算单位设置"); return; } ForecastUnitConsumptionValueSet fmhs = new ForecastUnitConsumptionValueSet(); fmhs.isdhkw = isyqwh; if (fmhs.ShowDialog()==DialogResult.OK) { if (fmhs.isdhkw != isyqwh) { isyqwh = fmhs.isdhkw; Ps_Forecast_Math psp_Type = new Ps_Forecast_Math(); psp_Type.ForecastID = forecastReport.ID; psp_Type.Forecast = type; IList listTypes = Common.Services.BaseService.GetList("SelectPs_Forecast_MathByForecastIDAndForecast", psp_Type); for (int j = 0; j < listTypes.Count; j++) { Ps_Forecast_Math currtenpfm = (Ps_Forecast_Math)listTypes[j]; //更新电量单位 if (currtenpfm.Sort == 3) { if (isyqwh) { currtenpfm.Title = "单耗(kWh/元)"; } else { currtenpfm.Title = "单耗(Wh/元)"; } Common.Services.BaseService.Update<Ps_Forecast_Math>(currtenpfm); break; } } } LoadData(); } Calc2(); }