Пример #1
0
 public ActionResult Create(EmailNotification notification)
 {
     _iFEmailNotification.Send(CredentialId, notification);
     return(View(notification));
     //try
     //{
     //    if (ModelState.IsValid)
     //    {
     //        TempData["message"] = "Email has been sent, successfully!";
     //    }
     //    return RedirectToAction("Create");
     //}
     //catch (Exception )
     //{
     //    if (ModelState.IsValid)
     //    {
     //        TempData["message"] = "Opps! Something went wrong. Please, try again.";
     //    }
     //    return RedirectToAction("Create");
     //}
 }
Пример #2
0
        public IHttpActionResult Get(EmailNotification emailNotification)
        {
            _iFEmailNotification.Send(CredentialId, emailNotification);

            return(Ok(emailNotification));
        }
Пример #3
0
 public ActionResult Create(EmailNotification notification)
 {
     _iFEmailNotification.Send(CredentialId, notification);
     return(View(notification));
 }