Ejemplo n.º 1
0
        // logging helper
        public static string FormatContributionChannelDTO(ContributionChannelDTO contributionChannelDTO)
        {
            if (contributionChannelDTO == null)
            {
                // null
                return("contributionChannelDTO: null");
            }
            else
            {
                // output values
                return("contributionChannelDTO: \n"
                       + "{ \n"

                       + "    ContributionChannelId: " + "'" + contributionChannelDTO.ContributionChannelId + "'" + ", \n"
                       + "    Name: " + (contributionChannelDTO.Name != null ? "'" + contributionChannelDTO.Name + "'" : "null") + ", \n"
                       + "    Description: " + (contributionChannelDTO.Description != null ? "'" + contributionChannelDTO.Description + "'" : "null") + ", \n"
                       + "    Active: " + "'" + contributionChannelDTO.Active + "'" + ", \n"
                       + "    IsDeleted: " + "'" + contributionChannelDTO.IsDeleted + "'" + ", \n"
                       + "    CreateBy: " + (contributionChannelDTO.CreateBy != null ? "'" + contributionChannelDTO.CreateBy + "'" : "null") + ", \n"
                       + "    CreateOn: " + (contributionChannelDTO.CreateOn != null ? "'" + contributionChannelDTO.CreateOn + "'" : "null") + ", \n"
                       + "    UpdateBy: " + (contributionChannelDTO.UpdateBy != null ? "'" + contributionChannelDTO.UpdateBy + "'" : "null") + ", \n"
                       + "    UpdateOn: " + (contributionChannelDTO.UpdateOn != null ? "'" + contributionChannelDTO.UpdateOn + "'" : "null") + " \n"
                       + "} \n");
            }
        }
Ejemplo n.º 2
0
        public static R_ContributionChannel ConvertDTOtoEntity(ContributionChannelDTO dto)
        {
            R_ContributionChannel contributionChannel = new R_ContributionChannel();

            contributionChannel.ContributionChannelId = dto.ContributionChannelId;
            contributionChannel.Name        = dto.Name;
            contributionChannel.Description = dto.Description;
            contributionChannel.Active      = dto.Active;
            contributionChannel.IsDeleted   = dto.IsDeleted;
            contributionChannel.CreateBy    = dto.CreateBy;
            contributionChannel.CreateOn    = dto.CreateOn;
            contributionChannel.UpdateBy    = dto.UpdateBy;
            contributionChannel.UpdateOn    = dto.UpdateOn;

            return(contributionChannel);
        }