Example #1
0
        public CampaignRegisterViewModel GetCampaign(Guid idCampaign, Guid idAccount)
        {
            var model = new CampaignRegisterViewModel();

            if (idCampaign != Guid.Empty)
            {
                var campaign = _campaignDao.GetOne(idCampaign, idAccount);
                campaign.CampaignServices = _campaignServicesDao.GetCampaignServicesByCampaign(idCampaign, idAccount);
                foreach (var campaignService in campaign.CampaignServices)
                {
                    campaignService.Service = _serviceDao.GetOne(campaignService.IdService, idAccount);
                }
                model = ConvertCampaign.ToCampaignRegisterViewModel(campaign, model);
            }

            return(model);
        }
Example #2
0
 public Service GetOne(Guid id, Guid idAccount)
 {
     return(_serviceDao.GetOne(id, idAccount));
 }