From f28037675218870d153f39f5ef1deb79fd044ce1 Mon Sep 17 00:00:00 2001 From: DucDangAnh Date: Mon, 29 Jun 2020 11:46:07 +0700 Subject: [PATCH] LaneIn - Merge isAutoOpenDoor && this.doorId == doorId --- AIParkingApplication/LaneIn.cs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/AIParkingApplication/LaneIn.cs b/AIParkingApplication/LaneIn.cs index 8a4097e..7a46070 100644 --- a/AIParkingApplication/LaneIn.cs +++ b/AIParkingApplication/LaneIn.cs @@ -91,19 +91,16 @@ namespace AIParkingApplication var saveLogResult = await apiController.SaveLog(LaneDirection.In, cardInformation.CardRealID.ToString(), "1", result.PlateType, DateTime.Now.ToString(AppConstant.DATETIME_FORMAT), result.PlateString, result.PlateImage, result.PlateImage, result.PlateImage, overviewVideoFrame); if (saveLogResult.Status) { - if (isAutoOpenDoor) + if (isAutoOpenDoor && this.doorId == doorId) { - if (this.doorId == doorId) + var openDoorResult = c3Device.OpenDoor(doorId); + if (openDoorResult.HasError) { - var openDoorResult = c3Device.OpenDoor(doorId); - if (openDoorResult.HasError) + lblRecogizePlateStatus.Invoke(new Action(() => { - lblRecogizePlateStatus.Invoke(new Action(() => - { - lblRecogizePlateStatus.BackColor = Color.Red; - lblRecogizePlateStatus.Text = "KHÔNG THỂ MỞ CỬA"; - })); - } + lblRecogizePlateStatus.BackColor = Color.Red; + lblRecogizePlateStatus.Text = "KHÔNG THỂ MỞ CỬA"; + })); } } }