示例#1
0
        // 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());
        }
示例#2
0
        // GET: Mission
        public async Task <ActionResult> IndexAsync()
        {
            List <MissionModel> missions = await _missionService.GetListAsync(HttpContext.Session);

            ViewData.Model = missions;
            return(View());
        }