From 2903ea86530629cd2f0d2820a36bb0a7c563365d Mon Sep 17 00:00:00 2001 From: Le Chau Date: Fri, 26 Jun 2020 14:40:15 +0700 Subject: [PATCH] =?UTF-8?q?SmallRefactor:=20Truy=E1=BB=81n=20ki=E1=BB=83u?= =?UTF-8?q?=20d=E1=BB=AF=20li=E1=BB=87u=20enum=20thay=20v=C3=AC=20int?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AIParkingApplication/ApiController.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AIParkingApplication/ApiController.cs b/AIParkingApplication/ApiController.cs index b1cd7b5..17e95f1 100644 --- a/AIParkingApplication/ApiController.cs +++ b/AIParkingApplication/ApiController.cs @@ -141,7 +141,7 @@ namespace AIParkingApplication } //Neu Dicrection la Out thi logID la logID lay ve khi check the - public async Task SaveLog(int direction, string cardID, string cameraID, int squareOrLong, string timeInOrOut, string textPlate, Mat plateImage, Mat plateImageResult, Mat PlateFrameImage, Mat FrameImage, string logID = "") + public async Task SaveLog(VehicleDirection direction, string cardID, string cameraID, ModePlate squareOrLong, string timeInOrOut, string textPlate, Mat plateImage, Mat plateImageResult, Mat PlateFrameImage, Mat FrameImage, string logID = "") { string plateImageBase64 = Convert.ToBase64String(plateImage.ToBytes()); string plateImageResultBase64 = Convert.ToBase64String(plateImageResult.ToBytes()); @@ -151,12 +151,12 @@ namespace AIParkingApplication { var request = new SaveLogParams { - Direction = (direction == (int)VehicleDirection.In) ? "in" : "out", + Direction = (direction == VehicleDirection.In) ? "in" : "out", LogID = logID, CardID = cardID, TextPlate = textPlate, CameraID = cameraID, - ModePlate = (squareOrLong == (int)ModePlate.Sqare) ? "1":"0", + ModePlate = (squareOrLong == ModePlate.Sqare) ? "1":"0", TimeVehicleInOrOut = timeInOrOut, PlateImage = plateImageBase64, PlateResultImage = plateImageResultBase64,