Example #1
0
        public ActionResult Update(int id, string status, string user, string text, string notification)
        {
            var updateService = new UpdateIssueService(_db, ViewData);
            updateService.Update(User, id, user, status, text);

            if (notification.HasValue())
                SendNotification(id, notification);

            return RedirectToAction("Index", "Issue", new { id });
        }
Example #2
0
        public ActionResult Update(FormCollection form, string status, string user)
        {
            foreach (var issueId in GetSelectedIssues(form))
                if (form["Delete"] != null)
                {
                    var deleteService = new DeleteIssueService(_db);
                    deleteService.Delete(issueId);
                }
                else
                {
                    var updateService = new UpdateIssueService(_db, ViewData);
                    updateService.Update(User, issueId, user, status, null);
                }

            return RedirectToAction("Index", "Issues");
        }