// GET: Mission/Create public async Task <ActionResult> CreateAsync() { CompteModel compte = _compteService.GetConnectedCompte(HttpContext.Session); List <ProjetModel> result = await _projetService.GetListProjectByManager(HttpContext.Session, compte.User.Id.GetValueOrDefault(0)); ViewBag.listprojet = result ?? new List <ProjetModel>(); return(View()); }
public async Task <IActionResult> List() { //GET LIST OF USER By manager CompteModel compte = _compteService.GetConnectedCompte(HttpContext.Session); List <ProjetModel> result = await _projetService.GetListProjectByManager(HttpContext.Session, compte.User.Id.GetValueOrDefault(0)); foreach (ProjetModel element in result) { List <RubriqueModel> rubriques = await _rubriqueService.GetListRubriqueByProjet(HttpContext.Session, element.Id); foreach (RubriqueModel item in rubriques) { element.EstimationTotal = element.EstimationTotal + (float)item.Estimation; } } ViewBag.lstmanager = result ?? new List <ProjetModel>(); return(View()); }