public async Task <ActionResult> Card(int?id) { if (!id.HasValue) { return(HttpNotFound()); } var task = await TaskClaim.Get(id.Value); ViewBag.StateHistory = await task.GetStateHistoryAsync(); if (CurUser.Is(AdGroup.TaskTrackerManager, AdGroup.TaskTrackerProg)) { ViewBag.Checkpoints = await TaskCheckpoint.GetListAsync(id.Value); ViewBag.TaskFiles = await TaskFile.GetListAsync(id.Value); ViewBag.TaskComments = await TaskComment.GetListAsync(id.Value); return(View("CardPerf", task)); } else { return(View("CardUser", task)); } }