コード例 #1
0
ファイル: UserDtoMapper.cs プロジェクト: zenit1/beame-lfe
 public static BaseUserInfoDTO SalesOrderLine2BuyerInfoDto(this vw_SALE_OrderLines orderLineEntity)
 {
     return(new BaseUserInfoDTO
     {
         UserId = orderLineEntity.BuyerUserId,
         Email = orderLineEntity.BuyerEmail,
         FullName = orderLineEntity.Entity2BuyerFullName()
     });
 }
コード例 #2
0
 public static DbSubscriptionDetailToken Entity2DbSubscriptionDetailToken(this vw_SALE_OrderLines entity)
 {
     return(new DbSubscriptionDetailToken
     {
         LineId = entity.LineId
         , OrderNumber = entity.OrderNumber
         , OrderDate = entity.OrderDate
         , ItemName = entity.ItemName
         , Price = entity.Price
         , Discount = entity.Discount
         , TotalPrice = entity.TotalPrice
         , TotalAmount = entity.TotalAmountPayed
         , OrderStatus = Utils.ParseEnum <BillingEnums.eOrderStatuses>(entity.OrderStatusId)
         , Status = Utils.GetEnumDescription(Utils.ParseEnum <BillingEnums.eOrderStatuses>(entity.OrderStatusId))
         , LineType = Utils.ParseEnum <BillingEnums.eOrderLineTypes>(entity.LineTypeId)
         , Currency = entity.Entity2BaseCurrencyDto()
         , PaypalProfileID = entity.PaypalProfileID
         , AffiliateCommisssion = entity.AffiliateCommission
         , CancelledOn = entity.CancelledOn
         , Buyer = new BaseUserInfoDTO
         {
             UserId = entity.BuyerUserId
             , FullName = entity.Entity2BuyerFullName()
             , Email = entity.BuyerEmail
         }
         , Seller = new BaseUserInfoDTO
         {
             UserId = entity.SellerUserId
             , FullName = entity.Entity2SellerFullName()
             , Email = entity.SellerEmail
         }
         , WebStoreOwner = entity.StoreOwnerUserId != null ? new BaseUserInfoDTO
         {
             UserId = (int)entity.StoreOwnerUserId
             , FullName = entity.Entity2StoreOwnerFullName()
             , Email = entity.StoreOwnerEmail
         } : new BaseUserInfoDTO()
         , WebStore = entity.WebStoreId != null ? new BaseWebStoreDTO
         {
             StoreId = (int)entity.WebStoreId
             , TrackingID = entity.TrackingID
             , Name = entity.StoreName
         } : new BaseWebStoreDTO()
     });
 }
コード例 #3
0
        public static OrderLineDTO Entity2OrderLineDto(this vw_SALE_OrderLines entity)
        {
            var pm = Utils.ParseEnum <BillingEnums.ePaymentTerms>(entity.PaymentTermId);

            return(new OrderLineDTO
            {
                LineId = entity.LineId
                , OrderNumber = entity.OrderNumber
                , OrderId = entity.OrderId
                , OrderDate = entity.OrderDate
                , ItemName = entity.ItemName
                , Price = entity.Price
                , Discount = entity.Discount
                , TotalPrice = entity.TotalPrice
                , PaymentMethod = Utils.ParseEnum <BillingEnums.ePaymentMethods>(entity.PaymentMethodId)
                , OrderStatus = Utils.ParseEnum <BillingEnums.eOrderStatuses>(entity.OrderStatusId)
                , Status = Utils.GetEnumDescription(Utils.ParseEnum <BillingEnums.eOrderStatuses>(entity.OrderStatusId))
                , LineType = Utils.ParseEnum <BillingEnums.eOrderLineTypes>(entity.LineTypeId)
                , Currency = entity.Entity2BaseCurrencyDto()
                , PaymentTerm = pm
                , PaymentTermName = Utils.GetEnumDescription(pm)
                , PaypalProfileID = entity.PaypalProfileID
                , TotalRefunded = entity.TotalRefunded
                , CouponValue = entity.OrderLineEntity2CouponDisplayValue()
                , Buyer = new BaseUserInfoDTO
                {
                    UserId = entity.BuyerUserId
                    , FullName = entity.Entity2BuyerFullName()
                    , Email = entity.BuyerEmail
                }
                , Seller = new BaseUserInfoDTO
                {
                    UserId = entity.SellerUserId
                    , FullName = entity.Entity2SellerFullName()
                    , Email = entity.SellerEmail
                }
                , WebStore = entity.WebStoreId != null ? new BaseWebStoreDTO
                {
                    StoreId = (int)entity.WebStoreId
                    , TrackingID = entity.TrackingID
                    , Name = entity.StoreName
                } : new BaseWebStoreDTO()
            });
        }