Beispiel #1
0
        public static LabelTranslationDetailModel MapLabelTranslationDetailModel(LabelTranslationDto dto)
        {
            var model = new LabelTranslationDetailModel();

            model.LabelTranslationUid = dto.Uid;
            model.Translation         = dto.Translation;
            model.LabelKey            = dto.LabelKey;
            model.LanguageName        = dto.LanguageName;
            model.LanguageIconUrl     = dto.LanguageIconUrl;

            model.OrganizationUid = dto.OrganizationUid;
            model.SetInputModelValues();

            return(model);
        }
Beispiel #2
0
        public LabelTranslationDto CreateDtoFromEntity(LabelTranslation entity)
        {
            var dto = new LabelTranslationDto();

            dto.Uid         = entity.Uid;
            dto.Translation = entity.Translation;
            dto.CreatedAt   = entity.CreatedAt;
            dto.UpdatedAt   = entity.UpdatedAt;
            entity.IsActive = entity.IsActive;

            dto.OrganizationUid  = entity.OrganizationUid;
            dto.OrganizationName = entity.OrganizationName;

            dto.ProjectUid  = entity.ProjectUid;
            dto.ProjectName = entity.ProjectName;

            dto.LabelUid = entity.LabelUid;
            dto.LabelKey = entity.LabelName;

            dto.LanguageUid  = entity.LanguageUid;
            dto.LanguageName = entity.LanguageName;

            return(dto);
        }