public override void OnActionExecuted(ActionExecutedContext context) { var rep = new CTReposetory(_connectionString); var controller = (Controller)context.Controller; controller.ViewBag.Pending = rep.GetPendingCount(); controller.ViewBag.Confirmed = rep.GetConfirmedCount(); controller.ViewBag.Declined = rep.GetDeclinedCount(); base.OnActionExecuted(context); }
public IActionResult Declined(int id) { var rep = new CTReposetory(_connectionString); rep.UpdateToDeclined(id); var ids = new { Pending = rep.GetPendingCount(), Confirmed = rep.GetConfirmedCount(), Declined = rep.GetDeclinedCount() }; return(Json(ids)); }