From bc86b4c00fabd46f7b276cf0a0404b7fea1cd37f Mon Sep 17 00:00:00 2001 From: Le Chau Date: Thu, 25 Jun 2020 10:29:24 +0700 Subject: [PATCH] =?UTF-8?q?SmallRefactor:=20B=E1=BB=8F=20check=20object=20?= =?UTF-8?q?{Vehicle}=20null=20khi=20g=C3=A1n=20gi=C3=A1=20tr=E1=BB=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AIParkingApplication/Statistic.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/AIParkingApplication/Statistic.cs b/AIParkingApplication/Statistic.cs index a9189f7..b2b1c06 100644 --- a/AIParkingApplication/Statistic.cs +++ b/AIParkingApplication/Statistic.cs @@ -44,19 +44,19 @@ namespace AIParkingApplication HttpResponseMessage response = await client.GetAsync("/api/statistics"); response.EnsureSuccessStatusCode(); var vehicle = await response.Content.ReadAsAsync(); - lblSoLuongXeMay?.Invoke(new Action(() => + lblSoLuongXeMay.Invoke(new Action(() => { lblSoLuongXeMay.Text = vehicle.NumberOfMoto.ToString(); })); - lblSoLuongOto?.Invoke(new Action(() => + lblSoLuongOto.Invoke(new Action(() => { lblSoLuongOto.Text = vehicle.NumberOfCar.ToString(); })); - lblVehicleTotalIn?.Invoke(new Action(() => + lblVehicleTotalIn.Invoke(new Action(() => { lblVehicleTotalIn.Text = vehicle.TotalIn; })); - lblVehicleTotalOut?.Invoke(new Action(() => + lblVehicleTotalOut.Invoke(new Action(() => { lblVehicleTotalOut.Text = vehicle.TotelOut; }));