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

            AccountChargeTime = campaign.AccountChargeTime;
            SystemNote        = campaign.SystemNote;


            //campaignAccounts = campaignAccounts.Where(m => m.Status != CampaignAccountStatus.Canceled);
            Payment      = new CampaignPaymentModel(campaign, campaignOptions, campaignAccounts, transactions);
            Transactions = TransactionViewModel.GetList(transactions);

            CampaignAccounts = CampaignAccountViewModel.GetList(campaignAccounts);
        }
 public ListCampaignAccountViewModel(List <CampaignAccount> campaignAccounts, int page, int pagesize, int total)
 {
     CampaignAccounts = CampaignAccountViewModel.GetList(campaignAccounts);
     Pager            = new PagerViewModel(page, pagesize, total);
 }