예제 #1
0
        public async Task <IActionResult> Edit(UserUpdateGet User)
        {
            var token = HttpContext.Session.GetString("Token"); if (token == null)
            {
                return(RedirectToAction("Login", "FrontAuth"));
            }
            var UserUpdateGetWithErrorMessage = await _client.PostProtectedAsync <UserUpdateGetWithErrorMessages>($"{_configuration["APIUrl"]}api/User/Update", User, token);

            if (UserUpdateGetWithErrorMessage.ErrorMessages.Count > 0)
            {
                ViewBag.Favorites = await _client.GetProtectedAsync <List <MVCFavoriteMenu> >($"{_configuration["APIUrl"]}api/MVCFavorite/Menu", token);

                ViewBag.FavoriteGroupList = await _client.GetProtectedAsync <List <MVCFavoriteGroupList> >($"{_configuration["APIUrl"]}api/MVCFavorite/GroupList", token);

                ViewBag.UITerms = await _client.GetProtectedAsync <List <UITermLanguageCustomizationList> >($"{_configuration["APIUrl"]}api/MVC/User/Edit", token);

                ViewBag.Env = _hostingEnv.EnvironmentName;

                ViewBag.ErrorMessages = UserUpdateGetWithErrorMessage.ErrorMessages;
                return(View(UserUpdateGetWithErrorMessage.User));
            }

            return(RedirectToAction("Index"));
        }
예제 #2
0
 private async Task <UserUpdateGet> UpdateAddDropDownBoxes(UserUpdateGet User, string UserId)
 {
     return(User);
 }