public ActionResult Create(MarketingViewModel model)
        {
            if (EmailMarketingValido(model)) {
            var emailsMarketing = new EmailsMarketing();
            fillCTM(emailsMarketing, model);

            EmailMarketingService.save(emailsMarketing);

            addMensagemSucesso("E-mail marketing criado com sucesso!");
              }

              return View(model);
        }
        private MarketingViewModel getViewModel(EmailsMarketing emailMarketing)
        {
            var model = new MarketingViewModel() {
            IDEmailMarketing = emailMarketing.IDEmailMarketing,
            Assunto = emailMarketing.Assunto,
            Corpo = emailMarketing.Corpo,
            DataCriacao = emailMarketing.DataCriacao,
            Destinatario = emailMarketing.Destinatarios,
            Remetente = emailMarketing.Remetente
              };

              return model;
        }
 public void save(EmailsMarketing emailMarketing)
 {
     _dao.save(emailMarketing);
 }
 private void fillCTM(EmailsMarketing emailMarketing, MarketingViewModel model)
 {
     emailMarketing.IDUsuario = visitor.ID;
       emailMarketing.Assunto = model.Assunto;
       emailMarketing.Corpo = model.Corpo;
       emailMarketing.Destinatarios = model.Destinatario;
       emailMarketing.Remetente = model.Remetente;
       emailMarketing.IDEmailMarketing = model.IDEmailMarketing;
 }
 public void delete(EmailsMarketing emailMarketing)
 {
     _dao.delete(emailMarketing);
 }