LoginForm - check exception login status text

This commit is contained in:
DucDangAnh 2020-07-10 15:11:41 +07:00
parent 56e6ef249d
commit 8ae4adae0a
2 changed files with 3 additions and 2 deletions

View File

@ -4,7 +4,6 @@ using System.Threading.Tasks;
using OpenCvSharp;
using Newtonsoft.Json;
using System.Net;
using System.Threading;
namespace AIParkingApplication
{

View File

@ -61,13 +61,15 @@ namespace AIParkingApplication
if (execeptioMessage.Contains("Error converting value"))
{
lblLoginStatus.UpdateLabel("Tên tài khoản hoặc mật khẩu không đúng!", Color.Red);
return;
}
if (execeptioMessage.Contains("An error occurred while sending the request"))
{
lblLoginStatus.UpdateLabel("Không có kết nối tới server!\r\nKiểm tra lại kết nối tới server!", Color.Red, Color.White);
return;
}
return;
lblLoginStatus.UpdateLabel("Không có kết nối tới server!\r\nKiểm tra lại kết nối tới server!", Color.Red, Color.White);
}
if (loginResult.IsLoginSuccess)