예제 #1
0
        public static LocalizedRes ToMsg(this ControlPanelMenuLocalizedRes entity)
        {
            LocalizedRes msg = null;

            if (entity != null)
            {
                msg = new LocalizedRes
                {
                    Description  = entity.MenuDescription,
                    LanguageCode = entity.LanguageCode,
                    Name         = entity.DisplayName
                };
            }

            return(msg);
        }
예제 #2
0
        public static ControlPanelMenuLocalizedRes ToEntity(this LocalizedRes msg, ControlPanelMenuEntity menuItemEntity)
        {
            ControlPanelMenuLocalizedRes entity = null;

            if (msg != null)
            {
                entity = new ControlPanelMenuLocalizedRes
                {
                    MenuDescription = msg.Description,
                    EditDate        = menuItemEntity.InDate,
                    EditUser        = menuItemEntity.InUser,
                    IconStyle       = menuItemEntity.IconStyle,
                    InDate          = menuItemEntity.InDate,
                    InUser          = menuItemEntity.InUser,
                    LanguageCode    = msg.LanguageCode,
                    LinkPath        = menuItemEntity.LinkPath,
                    DisplayName     = msg.Name,
                    ReferenceMenuId = menuItemEntity.MenuId
                };
            }
            return(entity);
        }