Exemplo n.º 1
0
 public static BaseCurrencyDTO Entity2BaseCurrencyDto(this vw_SALE_Transactions entity)
 {
     return(new BaseCurrencyDTO
     {
         CurrencyId = entity.CurrencyId ?? -1
         , CurrencyName = entity.CurrencyName ?? string.Empty
         , ISO = entity.ISO ?? string.Empty
         , Symbol = entity.Symbol ?? string.Empty
     });
 }
Exemplo n.º 2
0
        public static TransactionSummaryToken Entity2TransactionSummaryToken(this vw_SALE_Transactions entity)
        {
            var trxType = Utils.ParseEnum <BillingEnums.eTransactionTypes>(entity.TransactionTypeId.ToString());

            return(new TransactionSummaryToken
            {
                TrxId = entity.TransactionId
                , TrxDate = entity.TransactionDate
                , TrxType = trxType
                , TrxTypeName = Utils.GetEnumDescription(trxType)
                , ItemName = entity.ItemName
                , Amount = entity.Amount
                , OrderNumber = entity.OrderNumber
                , OrderLineId = entity.LineId
                , PaymentNumber = entity.PaymentNumber
                , ExternalTrxId = entity.ExternalTransactionID
                , Fee = entity.Fee
                , Currency = entity.Entity2BaseCurrencyDto()
                , Course = entity.CourseId != null  ? new  BaseCourseInfoDTO
                {
                    CourseId = (int)entity.CourseId
                    , CourseName = entity.CourseName
                } : new BaseCourseInfoDTO()
                , Buyer = new BaseUserInfoDTO
                {
                    UserId = entity.BuyerUserId
                    , Email = entity.BuyerEmail
                    , FullName = entity.Entity2BuyerFullName()
                }
                , Seller = new BaseUserInfoDTO
                {
                    UserId = entity.SellerUserId
                    , Email = entity.SellerEmail
                    , FullName = entity.Entity2SellerFullName()
                }
            });
        }
Exemplo n.º 3
0
 public static string Entity2SellerFullName(this vw_SALE_Transactions entity)
 {
     return(CombineFullName(entity.SellerFirstName, entity.SellerLastName, entity.SellerNickName));
 }