示例#1
0
        public int AddBenificiaryMember(BenificiaryMemberDTO dto)
        {
            int id = 0;

            try
            {
                log.Debug(BenificiaryMemberDTO.FormatBenificiaryMemberDTO(dto));

                R_BenificiaryMember t = BenificiaryMemberDTO.ConvertDTOtoEntity(dto);

                // add
                id = Repository.AddBenificiaryMember(t);

                log.Debug("result: 'success', id: " + id);
            }
            catch (System.Exception e)
            {
                // error
                log.Error(e.ToString());

                throw;
            }

            return(id);
        }
示例#2
0
        public void DeleteBenificiaryMember(BenificiaryMemberDTO dto)
        {
            try
            {
                log.Debug(BenificiaryMemberDTO.FormatBenificiaryMemberDTO(dto));

                R_BenificiaryMember t = BenificiaryMemberDTO.ConvertDTOtoEntity(dto);

                // delete
                Repository.DeleteBenificiaryMember(t);

                log.Debug("result: 'success'");
            }
            catch (System.Exception e)
            {
                // error
                log.Error(e.ToString());

                throw;
            }
        }
示例#3
0
        public void UpdateBenificiaryMember(BenificiaryMemberDTO dto)
        {
            try
            {
                //Requires.NotNull(t);
                //Requires.PropertyNotNegative(t, "BenificiaryMemberId");

                log.Debug(BenificiaryMemberDTO.FormatBenificiaryMemberDTO(dto));

                R_BenificiaryMember t = BenificiaryMemberDTO.ConvertDTOtoEntity(dto);

                // update
                Repository.UpdateBenificiaryMember(t);

                log.Debug("result: 'success'");
            }
            catch (System.Exception e)
            {
                // error
                log.Error(e.ToString());

                throw;
            }
        }