/// <summary> /// MVC get Action for Issue Index /// </summary> /// <returns>Issue Index (issues overview) view</returns> public ActionResult Index() { int userId = GetUserIdFromClaim(); IssueOverview iO = new IssueOverview(); KeyValuePair <int, List <UserIssueModel> > kvp = new KeyValuePair <int, List <UserIssueModel> >(userId, iO.GetUIM(userId)); return(View(kvp)); }
public JsonResult GetUserIssueModel(int issueId, int userId) { IssueOverview io = new IssueOverview(); var result = new JsonResult { Data = JsonConvert.SerializeObject(io.GetUserIssueModel(issueId, userId)) }; return(result); }
/// <summary> /// /// </summary> /// <param name="reviewModel"></param> /// <returns></returns> public HttpResponseMessage SaveIssueReview(ReviewModel reviewModel) { IssueOverview io = new IssueOverview(); io.SaveIssueReview(reviewModel); reviewModel.UserName = GetUserNameFromClaim(); var context = GlobalHost.ConnectionManager.GetHubContext <NotificationHub>(); context.Clients.All.reviewSaved(reviewModel); var ctx2 = GlobalHost.ConnectionManager.GetHubContext <NotificationHub>(); ctx2.Clients.All.updateActivity(reviewModel.IssueId, reviewModel.UserId); HttpResponseMessage msg = new HttpResponseMessage(); msg.StatusCode = System.Net.HttpStatusCode.OK; return(msg); }