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,