|
|
@ -3516,6 +3516,11 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
ModelState.AddModelError("error", "請至少選擇一個線別"); |
|
|
|
return View("WHS025C", model); |
|
|
|
} |
|
|
|
if (model.Ct <= 0) |
|
|
|
{ |
|
|
|
ModelState.AddModelError("error", "CT不可小於0"); |
|
|
|
return View("WHS025C", model); |
|
|
|
} |
|
|
|
// 複製 model 中的其他欄位,產生新的物件
|
|
|
|
var item = new WorkingStandardWorkTime |
|
|
|
{ |
|
|
@ -3563,6 +3568,11 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
if (ModelState.IsValid) |
|
|
|
{ |
|
|
|
IResultModel result; |
|
|
|
if (model.Ct <= 0) |
|
|
|
{ |
|
|
|
ModelState.AddModelError("error", "CT不可小於0"); |
|
|
|
return View("WHS025U", model); |
|
|
|
} |
|
|
|
|
|
|
|
result = await _whsApi.PutWorkingStandardWorkTime(model.WorkingStandardID, JsonConvert.SerializeObject(model)); |
|
|
|
|
|
|
@ -3826,9 +3836,10 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
ErrorMsg += $"{rowMsg}人數必須大於 0\n"; continue; |
|
|
|
} |
|
|
|
|
|
|
|
if (!int.TryParse(CtStr, out int Ct)) |
|
|
|
if (!decimal.TryParse(CtStr, out decimal Ct)) |
|
|
|
{ |
|
|
|
ErrorMsg += $"{rowMsg}CT格式錯誤\n"; continue; |
|
|
|
ErrorMsg += $"{rowMsg}CT 格式錯誤\n"; |
|
|
|
continue; |
|
|
|
} |
|
|
|
if (Ct <= 0) |
|
|
|
{ |
|
|
|