示例#1
0
 public ActionResult Contact(ContactUsModel model)
 {
     if (ModelState.IsValid)
     {
         try
         {
             var entity = model.ToEntity();
             _contactUsService.Add(entity);
             _workflowMessageService.SendContactEmail(model.EmailAddress, model.Name, model.Message);
             this.SuccessNotification("Thank you for contacting us. We will respond withing 24-48 hours.");
             model = new ContactUsModel();
         }
         catch (Exception)
         {
             this.ErrorNotification(GlobalHelper.DefaultFormSubmissionErrorMessage);
             throw;
         }
     }
     return View(model);
 }
示例#2
0
 public ActionResult Contact()
 {
     var model = new ContactUsModel();
     return View(model);
 }