// GET: Frais/Create public async Task <ActionResult> CreateAsync() { CompteModel compte = _compteService.GetConnectedCompte(HttpContext.Session); List <MissionModel> result = await _missionService.GetListAsync(HttpContext.Session); ViewBag.listmission = result ?? new List <MissionModel>(); List <UserModel> listusers = await _userService.GetListUserByManagerAsync(HttpContext.Session, compte.User.Id.GetValueOrDefault(0)); listusers = listusers ?? new List <UserModel>(); listusers.Add(compte.User); ViewBag.userlist = listusers; return(View()); }
// GET: Mission public async Task <ActionResult> IndexAsync() { List <MissionModel> missions = await _missionService.GetListAsync(HttpContext.Session); ViewData.Model = missions; return(View()); }