コード例 #1
0
        /// <summary>
        ///     Allows you to convert the current CategorySnapshot object to the DTO equivalent for use with the REST API
        /// </summary>
        /// <returns>A new instance of CategorySnapshotDTO</returns>
        public CategorySnapshotDTO ToDto()
        {
            var dto = new CategorySnapshotDTO();

            dto.Bvin = Bvin;
            dto.CustomPageOpenInNewWindow = CustomPageOpenInNewWindow;
            dto.CustomPageUrl             = CustomPageUrl;
            dto.Hidden         = Hidden;
            dto.ImageUrl       = ImageUrl;
            dto.BannerImageUrl = BannerImageUrl;
            dto.Name           = Name;
            dto.Description    = Description;
            dto.ParentId       = ParentId;
            dto.RewriteUrl     = RewriteUrl;
            dto.ShowInTopMenu  = ShowInTopMenu;
            dto.SourceType     = (CategorySourceTypeDTO)(int)SourceType;
            dto.StoreId        = StoreId;
            dto.SortOrder      = SortOrder;
            dto.MetaTitle      = MetaTitle;
            return(dto);
        }
コード例 #2
0
        // DTO
        public CategorySnapshotDTO ToDto()
        {
            CategorySnapshotDTO dto = new CategorySnapshotDTO();

            dto.Bvin                      = this.Bvin;
            dto.CustomPageId              = this.CustomPageId;
            dto.CustomPageLayout          = (CustomPageLayoutTypeDTO)((int)this.CustomPageLayout);
            dto.CustomPageOpenInNewWindow = this.CustomPageOpenInNewWindow;
            dto.CustomPageUrl             = this.CustomPageUrl;
            dto.Hidden                    = this.Hidden;
            dto.ImageUrl                  = this.ImageUrl;
            dto.LatestProductCount        = this.LatestProductCount;
            dto.Name                      = this.Name;
            dto.ParentId                  = this.ParentId;
            dto.RewriteUrl                = this.RewriteUrl;
            dto.ShowInTopMenu             = this.ShowInTopMenu;
            dto.SourceType                = (CategorySourceTypeDTO)((int)this.SourceType);
            dto.StoreId                   = this.StoreId;
            dto.SortOrder                 = this.SortOrder;
            dto.MetaTitle                 = this.MetaTitle;
            return(dto);
        }