示例#1
0
        public IActionResult Index(int Id)
        {
            // get bussinessRole
            var businessRoles     = businessRoleService.GetAll();
            var itemsBusinessRole = new List <SelectListItem>();

            foreach (var item in businessRoles)
            {
                itemsBusinessRole.Add(new SelectListItem()
                {
                    Text = item.BusinessRoleName, Value = item.Id
                });
            }
            ViewBag.itemsBusinessRole = itemsBusinessRole;

            // get userId,UserName của user cần gán quyền
            var user = userService.FindById(Id);

            ViewBag.user = user;

            return(View());
        }
        public IActionResult Index()
        {
            var businessRoles = businessRoleService.GetAll();

            return(View(businessRoles));
        }