Example #1
0
 public static BaseCurrencyDTO Entity2BaseCurrencyDto(this DB_SaleDetailsToken entity)
 {
     return(new BaseCurrencyDTO
     {
         CurrencyId = entity.CurrencyId
         , CurrencyName = entity.CurrencyName ?? string.Empty
         , ISO = entity.ISO ?? string.Empty
         , Symbol = entity.Symbol ?? string.Empty
     });
 }
Example #2
0
 public static BaseOrderLineDTO DbSaleEntity2BaseOrderLineDto(this DB_SaleDetailsToken entity)
 {
     return(new BaseOrderLineDTO
     {
         LineId = entity.OrderLineId
         , OrderNumber = entity.OrderNumber
         , OrderDate = entity.OrderDate
         , ItemName = entity.ItemName
         , Price = entity.Price
         , Discount = entity.Discount
         , TotalPrice = entity.TotalPrice
         , TotalAmount = entity.TotalAmountPayed ?? entity.TotalPrice
         , 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
         , TotalRefunded = entity.TotalRefunded
         , AffiliateCommisssion = entity.AffiliateCommission
         , 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
         }
         , 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()
     });
 }
Example #3
0
 public static string Entity2BuyerFullName(this DB_SaleDetailsToken entity)
 {
     return(CombineFullName(entity.BuyerFirstName, entity.BuyerLastName, entity.BuyerNickName));
 }
Example #4
0
 private static string OrderLineEntity2CouponDisplayValue(this DB_SaleDetailsToken entity)
 {
     return(entity.CouponTypeId == null ? string.Empty : CombineCouponDisplayValue((byte)entity.CouponTypeId, entity.CouponTypeAmount));
 }