コード例 #1
0
        public async Task <IActionResult> Delete(string email)
        {
            using (var client = new HttpClient())
            {
                try
                {
                    if (email.Equals(String.Empty))
                    {
                        return(BadRequest(Lang.LANG_EMAIL_NOT_FOUND));
                    }
                    String result = await UserVM.DeleteUserAsync(client, email);

                    if (result.Equals(ResultCode.DONE))
                    {
                        return(RedirectToAction("Index"));
                    }
                    else
                    {
                        return(BadRequest(Lang.LANG_DELETE_PROBLEM));
                    }
                }
                catch (Exception)
                {
                    return(BadRequest(Lang.LANG_CONNECTION_PROBLEM));
                }
            }
        }