private ActionResult TrySendAll(SendNotificationAllModel model, string returnUrl) { try { var notification = CreateNotificationAll(model.Message, model.CaseId, model.Type); this.Service.SendNotificationAll(this.SecurityToken, notification); } catch (ForbiddenException) { AddModelStateError(GlobalStrings.Forbidden); return View(model); } catch (Exception) { AddModelStateError(GlobalStrings.SomethingWentWrong); return View(model); } return RedirectToLocal(returnUrl,model.CaseId); }
public ActionResult SendAll(int id, string returnUrl) { var model = new SendNotificationAllModel() { CaseId = id, }; return View(model); }
public ActionResult SendAll(SendNotificationAllModel model, string returnUrl) { if (ModelState.IsValid) return TrySendAll(model, returnUrl); return View(model); }