public int EditForecastPowerOn(EQP_Forecast_PowerOn dto) { try { eQPForecastPowerOnRepository.Update(dto); unitOfWork.Commit(); return(0); } catch (Exception ex) { log.Error(ex); return(-1); } }
public int AddForecastPowerOn(EQP_Forecast_PowerOn dto) { try { int i = QueryForecastPowerOn(dto.EQP_Type_UID, dto.Demand_Date); if (i > 0) { return(i); } else { eQPForecastPowerOnRepository.Add(dto); unitOfWork.Commit(); return(0); } } catch (Exception ex) { log.Error(ex); return(-1); } }