예제 #1
0
        public async Task <IActionResult> Index()
        {
            var token = HttpContext.Session.GetString("Token");
            var rs    = await _functionClient.GetAllFunction(token);

            ViewBag.Data          = rs.data;
            ViewBag.statusMessage = TempData["Result"];
            var function = new AddFunctionViewModel();

            return(View(function));
        }
예제 #2
0
        public async Task <IActionResult> AssginRoleForUser()
        {
            var token     = HttpContext.Session.GetString("Token");
            var funcrions = await _manageFunction.GetAllFunction(token);

            var roles = await _manageRole.GetAllRole(token);

            var users = await _userApiClient.GetAllUser(token);

            ViewBag.UserId        = new Microsoft.AspNetCore.Mvc.Rendering.SelectList(users.data, "Id", "UserName");
            ViewBag.ListFunction  = funcrions.data;
            ViewBag.ListRole      = roles.data;
            ViewBag.statusMessage = TempData["ResultAssginRoleForUser"];
            return(View());
        }