From d588afa9b989b30f371a551b2ad7e423e8b4066d Mon Sep 17 00:00:00 2001 From: Marvin Date: Mon, 7 Aug 2023 22:55:38 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9WriteBarcodeStation4DataCar?= =?UTF-8?q?rier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/AMES/BarcodeStationController.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeStationController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeStationController.cs index 9b57ad9b..57147456 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeStationController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeStationController.cs @@ -316,7 +316,11 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES barcode_station.CreateDate = DateTime.Now; _context.BarcodeStation.Add(barcode_station); - await _context.SaveChangesAsync(); + try + { + await _context.SaveChangesAsync(); + } + catch { } //紀錄筆數 result.Success = true;