Ecos is an open source project powered by Assembla

Assembla offers free public and private SVN/Git repositories and project hosting with bug/issue tracking and collaboration tools.

/trunkecosecosControllers
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
´╗┐using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace ecos.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Bem Vindo a Ecos";

            return View();
        }

        public ActionResult About()
        {
            return View();
        }

        public ActionResult SendNewsletter()
        {
            var contact = new Models.Contact
                              {
                                  Email = Request["ecos-newsletter-emailinput"],
                                  Subject = "Newsletter",
                                  Content = "Desejo receber noticias da Ecos"
                              };

            try
                {
                    contact.sendMail();

                    return View("Index");

                }
                catch (Exception Ex)
                {
                    ModelState.AddModelError("", Ex.Message);

                    return View("Index");
                }

        }


    }
}
Ajax-loader Loading, please wait...