Ejemplo n.º 1
0
        public ActionResult Contact(NailShop.DataAccess.Contact model)
        {
            IContact _contact = new ContactBO();
                if (model != null)
                {
                    model.CreatedDate = DateTime.Now;
                    model.SiteID = _session.SiteID;
                    if (_contact.Add(model))
                    {
                        string body = string.Format(Resources.EmailTemplate.feedbackBody, model.UserName);
                        this.SendEmailMessage(model.Email, Resources.EmailTemplate.feedbackSubject, Resources.EmailTemplate.feedbackBody);

                        body = string.Format(Resources.EmailTemplate.fromBody, model.UserName, model.Email, model.Title, model.Content);
                        this.SendEmailMessage(model.Email, Resources.EmailTemplate.fromSubject, body);

                        this.ModelState.Clear();
                        model = new Contact();
                    }
                }
                return View(model);
        }
Ejemplo n.º 2
0
 public ActionResult Contact()
 {
     Contact model = new Contact();
         return View(model);
 }