public async Task <IActionResult> AssignedWork() { var user = await CurrentUser(); var assigments = _assignmentService.GetAllWithAssociatedTablesByUserId(user.Id); var assignedJobListViewModel = _workModelFactory.PrepareAssignedJobListViewModel(assigments); return(View(assignedJobListViewModel)); }
public async Task <IActionResult> List(int pageIndex = 1) { var user = await CurrentUser(); var assignments = _assignmentService.GetAllInCompleteWithRelationships(out int totalPageCount, user.Id, pageIndex); var assignedJobListViewModel = _workModelFactory.PrepareAssignedJobListViewModel(assignments); ViewBag.TotalPageCount = totalPageCount; ViewBag.ActivePage = pageIndex; return(View(assignedJobListViewModel)); }