public int AddContributionMonetaryReviewer(ContributionMonetaryReviewerDTO dto) { int id = 0; try { log.Debug(ContributionMonetaryReviewerDTO.FormatContributionMonetaryReviewerDTO(dto)); R_ContributionMonetaryReviewer t = ContributionMonetaryReviewerDTO.ConvertDTOtoEntity(dto); // add id = Repository.AddContributionMonetaryReviewer(t); dto.ContributionMonetaryReviewerId = id; log.Debug("result: 'success', id: " + id); } catch (System.Exception e) { // error log.Error(e.ToString()); throw; } return(id); }
public void DeleteContributionMonetaryReviewer(ContributionMonetaryReviewerDTO dto) { try { log.Debug(ContributionMonetaryReviewerDTO.FormatContributionMonetaryReviewerDTO(dto)); R_ContributionMonetaryReviewer t = ContributionMonetaryReviewerDTO.ConvertDTOtoEntity(dto); // delete Repository.DeleteContributionMonetaryReviewer(t); dto.IsDeleted = t.IsDeleted; log.Debug("result: 'success'"); } catch (System.Exception e) { // error log.Error(e.ToString()); throw; } }
public void UpdateContributionMonetaryReviewer(ContributionMonetaryReviewerDTO dto) { try { //Requires.NotNull(t); //Requires.PropertyNotNegative(t, "ContributionMonetaryReviewerId"); log.Debug(ContributionMonetaryReviewerDTO.FormatContributionMonetaryReviewerDTO(dto)); R_ContributionMonetaryReviewer t = ContributionMonetaryReviewerDTO.ConvertDTOtoEntity(dto); // update Repository.UpdateContributionMonetaryReviewer(t); log.Debug("result: 'success'"); } catch (System.Exception e) { // error log.Error(e.ToString()); throw; } }