Exemplo n.º 1
0
 public void UpdateJournalPrice(ValuationJournalPrice journalPrice)
 {
     journalPrice.Price.Amount   = this.HasPrice ? this.Price.Amount : 0;
     journalPrice.Price.Currency = this.HasPrice ? this.Price.Currency : null;
     journalPrice.Price.FeeType  = this.HasPrice ? FeeType.Article : FeeType.Absent;
     journalPrice.DateAdded      = DateTime.Now;
 }
Exemplo n.º 2
0
        public static JournalPriceViewModel ToViewModel(this ValuationJournalPrice journalPrice)
        {
            if (journalPrice == null)
            {
                return(new JournalPriceViewModel());
            }

            return(new JournalPriceViewModel
            {
                JournalPriceId = journalPrice.Id,
                Amount = journalPrice.Price.Amount,
                Currency = journalPrice.Price.Currency,
                FeeType = journalPrice.Price.FeeType
            });
        }