Ejemplo n.º 1
0
        public CampaignVM GetCampaign(int campaignId)
        {
            CampaignService campaignService = new CampaignService();
            var             campaign        = campaignService.GetCampaign(campaignId);

            CampaignAdapter adapter = new CampaignAdapter();

            return(adapter.GetVMFromCampaign(campaign));
        }
Ejemplo n.º 2
0
        public List <CampaignVM> GetApprovalCampaigns()
        {
            List <CampaignVM> campaignVMList  = new List <CampaignVM>();
            CampaignService   campaignService = new CampaignService();
            int departmentId = UserModule.GetUsersDepartment();
            var campaigns    = campaignService.GetApprovalCampaigns(departmentId);

            CampaignAdapter adapter = new CampaignAdapter();

            foreach (var campaign in campaigns)
            {
                campaignVMList.Add(adapter.GetVMFromCampaign(campaign));
            }
            return(campaignVMList);
        }