Beispiel #1
0
        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);
        }
Beispiel #2
0
        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;
            }
        }
Beispiel #3
0
        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;
            }
        }