From 0a90ed6673063c4ccc044034931883460d2bd4ab Mon Sep 17 00:00:00 2001 From: berlin-tzen Date: Tue, 7 Feb 2023 17:13:54 +0800 Subject: [PATCH] =?UTF-8?q?[WHAT]=20=E4=BF=AE=E6=AD=A3=E9=A1=9E=E5=88=A5?= =?UTF-8?q?=E7=84=A1=E6=B3=95=E5=88=AA=E9=99=A4=E9=8C=AF=E8=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EasyBL.WEBAPP/ShowEasy/CategoryMaintain_UpdService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/CategoryMaintain_UpdService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/CategoryMaintain_UpdService.cs index efecb91..d9bac3c 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/CategoryMaintain_UpdService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/CategoryMaintain_UpdService.cs @@ -4,6 +4,7 @@ using Entity.Sugar; using SqlSugar.Base; using System; using System.Collections.Generic; +using System.Linq; namespace EasyBL.WEBAPP.WSM { @@ -274,7 +275,8 @@ namespace EasyBL.WEBAPP.WSM var sCategoryID = _fetchString(i_crm, @"CategoryID"); - var oEntity = db.Queryable().Single(x => x.OrgID == i_crm.ORIGID && x.CategoryID == sCategoryID); + //var oEntity = db.Queryable().Single(x => x.OrgID == i_crm.ORIGID && x.CategoryID == sCategoryID); + var oEntity = db.Queryable().Where(x => x.OrgID == i_crm.ORIGID && x.CategoryID == sCategoryID).ToList().FirstOrDefault(); var iRel = db.Updateable().UpdateColumns(x => new SETB_SYS_Category { DelStatus = "Y" }).Where(x => x.OrgID == i_crm.ORIGID && x.CategoryID == sCategoryID).ExecuteCommand(); var iRelUp = db.Updateable() .UpdateColumns(x => new SETB_SYS_Category { OrderByValue = x.OrderByValue - 1 })