Пример #1
0
        Models.Home.NewsletterModel INewsletterHelper.GetNewsletterModel()
        {
            var list = GetNewsList(_newsletterRepository.TypeOfNews);
            var model = new NewsletterModel();

            model.TypeOfNews = list;

            return model;
        }
Пример #2
0
 public ActionResult SaveNewsletter(NewsletterModel newsletter)
 {
     if (ModelState.IsValid)
     {
         if (_newsletterHelper.TrySave(newsletter))
         {
             ViewBag.Email = newsletter.Email;
             Alert.SetAlert(AlertStatus.Succes, "Poprawnie zapisano do newslettera!");
             return RedirectToAction("Index");
         }
         else
             return View(_newsletterHelper.GetNewsletterModel());
     }
     else
         return View(_newsletterHelper.GetNewsletterModel());
 }