public int EditPowerOn(EQP_PowerOn dto) { try { eqp_PowerOnRepository.Update(dto); unitOfWork.Commit(); return(0); } catch (Exception ex) { log.Error(ex); return(-1); } }
public int AddPowerOn(EQP_PowerOn dto) { try { int i = QueryPowerOn(dto.EQP_Type_UID, dto.PowerOn_Date); if (i > 0) { return(i); } else { eqp_PowerOnRepository.Add(dto); unitOfWork.Commit(); return(0); } } catch (Exception ex) { log.Error(ex); return(-1); } }