public IActionResult YourTasks() { string userId = User.FindFirstValue(ClaimTypes.NameIdentifier); var q = new GetOpenTasks(_configuration); string username = q.FindUsername(userId); var yourList = q.GetYourList(username); var yourArchivedList = q.GetYourArchivedList(username); ViewBag.YourList = yourList; ViewBag.ArchivedList = yourArchivedList; return(View("../Task/Supplier/YourTasks")); }
public IActionResult ShowIncomingBids(int taskId, string createdBy) { string userId = User.FindFirstValue(ClaimTypes.NameIdentifier); var b = new GetOpenTasks(_configuration); string username = b.FindUsername(userId); if (username == createdBy) { var q = new GetIncomingBids(_configuration); var getlist = q.GetList(taskId); return(View("../Task/Bidding/Supplier/ShowIncomingBids", getlist)); } else { return(RedirectToAction("YourTasks", "YourTask")); } }