Exemplo n.º 1
0
        async public Task <IActionResult> Projects(int?FilterTypeId)
        {
            SetPageContent("projects");

            var user = await _userEngine.CurrentUser(_userManager.GetUserId(User));

            var filterType = FilterTypeId != null ? (ProjectFilterTypes)FilterTypeId : ProjectFilterTypes.Open;
            var model      = new ProjectsViewModel()
            {
                Items        = _projectEngine.GetUserItems(user.Id, filterType),
                FilterTypeId = (int)filterType,
                FilterTypes  = _projectEngine.GetProjectFilterTypes()
            };

            return(View(model));
        }