예제 #1
0
        public CampaignDetailsViewModel(Campaign campaign,
                                        IEnumerable <CampaignOption> campaignOptions,
                                        IEnumerable <CampaignAccount> campaignAccounts,
                                        IEnumerable <Transaction> transactions) : base(campaign)
        {
            EnabledAccountChargeExtra = campaign.EnabledAccountChargeExtra;

            AccountChargeTime = campaign.AccountChargeTime;

            campaignAccounts = campaignAccounts.Where(m => m.Status != CampaignAccountStatus.Canceled);
            Payment          = new CampaignPaymentModel(campaign, campaignOptions, campaignAccounts, transactions);
            Transactions     = TransactionViewModel.GetList(transactions);
            CampaignAccounts = CampaignAccountViewModel.GetList(campaignAccounts);
        }
예제 #2
0
 public CampaignWithAccountViewModel(Campaign campaign, CampaignAccount campaignAccount) : base(campaign)
 {
     CampaignAccount = new CampaignAccountViewModel(campaignAccount);
 }