예제 #1
0
        public ActionResult Delete(string DeleteUserId, SearchForm SearchForm)
        {
            UserSearchService SearchService = new UserSearchService();
            UserDto           UserInfoDto   = SearchService.SearchUserWithPrimaryKeyUserId(DeleteUserId);

            if (UserInfoDto == null)
            {
                // 削除対象のユーザ情報がない場合、検索画面を再表示
                return(View("Search", SearchForm));
            }

            UserDeleteService DeleteService = new UserDeleteService();

            DeleteService.DeleteUserWithPrimaryKeyUserId(DeleteUserId);

            return(View("DeleteComplete"));
        }
예제 #2
0
        public ActionResult Edit(string EditUserId, SearchForm SearchForm)
        {
            UserSearchService service     = new UserSearchService();
            UserDto           UserInfoDto = service.SearchUserWithPrimaryKeyUserId(EditUserId);

            if (UserInfoDto == null)
            {
                // 編集対象のユーザ情報がない場合、検索画面を再表示
                return(View("Search", SearchForm));
            }

            EditForm EditForm = new EditForm();

            EditForm.UserId     = UserInfoDto.UserId;
            EditForm.UserName   = UserInfoDto.UserName;
            EditForm.UserGender = UserInfoDto.UserGender;

            return(View(EditForm));
        }