Esempio n. 1
0
        /// <summary>
        /// Construct the viewmodel
        /// </summary>
        /// <param name="transaction">Transaction entity</param>
        public TransactionDetailsViewModel(Model.Transaction transaction)
            : this()
        {
            var domainlessLicenseQuery =
                (from x in transaction.TransactionItems
                 where (x.License != null) && (!x.License.Domains.Any())
                 select x.License);

            var customerapplessLicenseQuery =
                (from x in transaction.TransactionItems
                 where (x.License != null) && (!x.License.LicenseCustomerApps.Any())
                 select x.License);

            Transaction = new TransactionDetailsViewItem(transaction,
                                                         transaction.TransactionItems,
                                                         transaction.IgnoredItems,
                                                         domainlessLicenseQuery.ToList(),
                                                         customerapplessLicenseQuery.ToList());
        }
        /// <summary>
        /// Construct the viewmodel
        /// </summary>
        /// <param name="transaction">Transaction entity</param>
        public TransactionDetailsViewModel(Model.Transaction transaction)
            : this()
        {
            var domainlessLicenseQuery =
                (from x in transaction.TransactionItems
                 where (x.License != null) && (!x.License.Domains.Any())
                 select x.License);

            var customerapplessLicenseQuery =
                (from x in transaction.TransactionItems
                 where (x.License != null) && (!x.License.LicenseCustomerApps.Any())
                 select x.License);

            Transaction = new TransactionDetailsViewItem(transaction,
                transaction.TransactionItems,
                transaction.IgnoredItems,
                domainlessLicenseQuery.ToList(),
                customerapplessLicenseQuery.ToList());
        }