コード例 #1
0
        public static UpdatePersonTagDto FromPerson(PersonSummaryDto detail, string newTagNumber, TagType newTagType = TagType.PassiveRfid)
        {
            var dto = new UpdatePersonTagDto
            {
                Id = detail.Id
            };

            dto.PersonTagList.Add(new WriteTagDto()
            {
                TagNumber = newTagNumber, TagType = newTagType
            });
            return(dto);
        }
コード例 #2
0
        public PersonSummaryDto(PersonSummaryDto dto) : base(dto)
        {
            if (dto == null)
            {
                return;
            }

            var type       = typeof(PersonSummaryDto);
            var properties = type.GetTypeInfo().DeclaredProperties;

            foreach (var property in properties)
            {
                var value = property.GetValue(dto);
                property.SetValue(this, value);
            }
        }