public CampaignDetailsViewModel(Campaign campaign, IEnumerable <CampaignOption> campaignOptions, IEnumerable <CampaignAccount> campaignAccounts, CampaignPaymentModel payment, IEnumerable <Transaction> transactions) : base(campaign) { EnabledAccountChargeExtra = campaign.EnabledAccountChargeExtra; AccountChargeTime = campaign.AccountChargeTime; SystemNote = campaign.SystemNote; //campaignAccounts = campaignAccounts.Where(m => m.Status != CampaignAccountStatus.Canceled); Payment = payment; 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); }