Exemplo n.º 1
0
 public ActionResult EnergyForecast(EnergyYearMonthForecast forecast)
 {
     if (string.IsNullOrEmpty(forecast.dataKey) == false)
         forecast.dataKey = forecast.dataKey.Replace("-", "");
     EnergyYearMonthForecastService.GetInstance().Save(forecast);
     return Content("ok");
 }
 public int Save(EnergyYearMonthForecast forecast)
 {
     if (forecast.id > 0)
         return _energyYearMonthForecastDao.Update(forecast);
     return _energyYearMonthForecastDao.Insert(forecast);
 }