public HttpResponseMessage SaveSolutionAcLoadDetail(ACLoadDto acLoadDto) { return(CreateHttpResponse(() => { return Request.CreateResponse(_solutionLoadProcessor.SaveSolutionACLoad(acLoadDto, UserID, UserName)); })); }
public ACLoadDto SaveSolutionACLoad(ACLoadDto acLoadDto, string userID, string userName) { if (acLoadDto.ID == 0) { return(AddSolutionACLoad(acLoadDto, userID, userName)); } else { return(UpdateSolutionACLoad(acLoadDto, userID, userName)); } }
private ACLoadDto UpdateSolutionACLoad(ACLoadDto acLoadDto, string userID, string userName) { var solutionLoad = _acLoadRepository.Find(acLoadDto.ID); _addAcLoadDtoToEntityMapper.UpdateMap(acLoadDto, solutionLoad, userID, userName); solutionLoad.ModifiedDateTime = DateTime.UtcNow; solutionLoad.ModifiedBy = userName; var solutionLoadDetail = _acLoadRepository.Update(solutionLoad); _acLoadRepository.Commit(); return(new ACLoadDto { ID = solutionLoadDetail.ID, Description = solutionLoadDetail.Description }); }