예제 #1
0
        private decimal?GetPriceValue(EPI.Price price)
        {
            var result = price != null
                ? (decimal)price.Value
                : (decimal?)null;

            return(result);
        }
예제 #2
0
        private string GetDisplayName(EPI.Price price)
        {
            var result = string.IsNullOrEmpty(price.Base64DisplayName)
                ? price.DisplayName
                : Encoding.UTF8.GetString(Convert.FromBase64String(price.Base64DisplayName));

            return(result);
        }
예제 #3
0
        private void TryInsertMetaData(EPI.Price price, string key)
        {
            if (price != null && !_metaDataWasCreated.Contains(key))
            {
                var entity = new Entity.tEnhancedPurchaseInfoMetaData()
                {
                    EnhancedPurchaseInfoFieldName = key,
                    Description = GetDisplayName(price),
                };

                _context.tEnhancedPurchaseInfoMetaData.Add(entity);

                _metaDataWasCreated.Add(key);
            }
        }