Beispiel #1
0
        private void SetMyTeamsSelectList()
        {
            OperationResultVo teamResult = teamAppService.GetSelectListByUserId(CurrentUserId);

            if (teamResult.Success)
            {
                OperationResultListVo <SelectListItemVo> result = (OperationResultListVo <SelectListItemVo>)teamResult;
                List <SelectListItemVo> items = result.Value.ToList();
                items.Add(new SelectListItemVo(SharedLocalizer["Create a new team (you can edit it later)"], Guid.Empty.ToString()));

                SelectList selectList = new SelectList(items, "Value", "Text");

                ViewData["MyTeams"] = selectList;
            }
        }
Beispiel #2
0
        public IActionResult ListMyTeams()
        {
            OperationResultVo serviceResult = teamAppService.GetSelectListByUserId(CurrentUserId);

            if (serviceResult.Success)
            {
                OperationResultListVo <SelectListItemVo> castResult = serviceResult as OperationResultListVo <SelectListItemVo>;

                List <SelectListItemVo> model = castResult.Value.ToList();

                return(PartialView("_ListMine", model));
            }
            else
            {
                return(null);
            }
        }