Example #1
0
 /// <summary>
 /// <see cref="ProductTagTypeModel"/> クラスの新しいインスタンスを作成します。
 /// </summary>
 /// <param name="productTagType">商品タグ区分。</param>
 /// <param name="productTagTypeName">商品タグ区分名。</param>
 public ProductTagTypeModel(
     ProductTagTypeOptions productTagType,
     string productTagTypeName
     )
 {
     this.ProductTagType     = productTagType;
     this.ProductTagTypeName = productTagTypeName;
 }
Example #2
0
 /// <summary>
 /// エンティティを転送オブジェクトに変換して取り込みます。
 /// </summary>
 /// <param name="entity">エンティティ。</param>
 public void ConvertFromEntity(IProductEntityModel entity)
 {
     this.ProductId      = entity.ProductId;
     this.ProductName    = entity.ProductName;
     this.BrandId        = entity.BrandId;
     this.CatetoryId     = entity.CatetoryId;
     this.ListPrice      = entity.ListPrice;
     this.ProductTagType = entity.ProductTagType;
     this.UpdateDateTime = entity.UpdateDateTime.SqlServerValue();
     this.UpdateUserId   = entity.UpdateUserId;
     this.EntityState    = entity.EntityState;
 }
Example #3
0
 /// <summary>
 /// <see cref="ProductEntityModel"/> クラスの新しいインスタンスを作成します。
 /// </summary>
 /// <param name="productId">商品コード。</param>
 /// <param name="productName">商品名。.</param>
 /// <param name="brandId">ブランドコード。</param>
 /// <param name="catetoryId">カテゴリコード。</param>
 /// <param name="listPrice">定価。</param>
 /// <param name="productTagType">商品タグ。</param>
 /// <param name="updateDateTime">更新日時。</param>
 /// <param name="updateUserId">更新者コード。</param>
 /// <param name="entityState">エンティティ状態。</param>
 public ProductEntityModel(
     string productId,
     string productName,
     string brandId,
     string catetoryId,
     decimal listPrice,
     ProductTagTypeOptions productTagType,
     DateTime updateDateTime,
     string updateUserId,
     EntityStateOptions entityState = EntityStateOptions.None
     )
 {
     this.ProductId      = productId;
     this.ProductName    = productName;
     this.BrandId        = brandId;
     this.CatetoryId     = catetoryId;
     this.ListPrice      = listPrice;
     this.ProductTagType = productTagType;
     this.UpdateDateTime = updateDateTime;
     this.UpdateUserId   = updateUserId;
     this.EntityState    = entityState;
 }
Example #4
0
 /// <summary>
 /// インスタンスを商品マスタからのロード状態で作成します。
 /// </summary>
 /// <param name="productId">商品コード。</param>
 /// <param name="productName">商品名。</param>
 /// <param name="brandId">ブランドコード。</param>
 /// <param name="catetoryId">カテゴリコード。</param>
 /// <param name="listPrice">定価。</param>
 /// <param name="productTagType">商品タグ。</param>
 /// <param name="updateDateTime">更新日時。</param>
 /// <param name="updateUserId">更新者コード。</param>
 /// <returns>
 /// 商品マスタを返却します。
 /// </returns>
 public static ProductEntityModel Load(
     string productId,
     string productName,
     string brandId,
     string catetoryId,
     decimal listPrice,
     ProductTagTypeOptions productTagType,
     DateTime updateDateTime,
     string updateUserId
     )
 {
     return(new ProductEntityModel(
                productId: productId,
                productName: productName,
                brandId: brandId,
                catetoryId: catetoryId,
                listPrice: listPrice,
                productTagType: productTagType,
                updateDateTime: updateDateTime,
                updateUserId: updateUserId
                ));
 }
Example #5
0
 /// <summary>
 /// インスタンスを商品マスタからの新規状態で作成します。
 /// </summary>
 /// <param name="productId">商品コード。</param>
 /// <param name="productName">商品名。</param>
 /// <param name="brandId">ブランドコード。</param>
 /// <param name="catetoryId">カテゴリコード。</param>
 /// <param name="listPrice">定価。</param>
 /// <param name="productTagType">商品タグ。</param>
 /// <param name="updateDateTime">更新日時。</param>
 /// <param name="updateUserId">更新者コード。</param>
 /// <returns>
 /// 商品マスタを返却します。
 /// </returns>
 public static ProductEntityModel Create(
     string productId,
     string productName = default,
     string brandId     = default,
     string catetoryId  = default,
     decimal listPrice  = default,
     ProductTagTypeOptions productTagType = default,
     DateTime updateDateTime = default,
     string updateUserId     = default
     )
 {
     return(new ProductEntityModel(
                productId: productId,
                productName: productName,
                brandId: brandId,
                catetoryId: catetoryId,
                listPrice: listPrice,
                productTagType: productTagType,
                updateDateTime: updateDateTime,
                updateUserId: updateUserId,
                entityState: EntityStateOptions.Added
                ));
 }