SmallRefactor: Bỏ check object {Vehicle} null khi gán giá trị
This commit is contained in:
parent
cdc5ffb968
commit
bc86b4c00f
|
@ -44,19 +44,19 @@ namespace AIParkingApplication
|
|||
HttpResponseMessage response = await client.GetAsync("/api/statistics");
|
||||
response.EnsureSuccessStatusCode();
|
||||
var vehicle = await response.Content.ReadAsAsync<Vehicle>();
|
||||
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;
|
||||
}));
|
||||
|
|
Loading…
Reference in New Issue
Block a user