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 })