| | |
| | | if (id > 0) |
| | | { |
| | | UpdateCache(id); |
| | | // AssetsPumpPropContent.UpdateCacheByPartID(id); |
| | | AssetsPumpPropContent.UpdateCacheByPartID(id); |
| | | AssetsPumpMainAndPartMap.UpdateCacheByPartID(id); |
| | | } |
| | | return id; |
| | |
| | | return bol; |
| | | } |
| | | |
| | | /* //通过 ID 删除产品表及属性表 |
| | | public bool DeleteExByID(long ID) |
| | | { |
| | | var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsPumpPartMain>(); |
| | | var partmain = dal.GetByID(ID); |
| | | var propmodellist = AssetsPumpPropContent.GetProplistByPartID(ID); |
| | | var propentitylist = AssetsPumpPropContent.Model2Entities(propmodellist); |
| | | var bol = dal.DeleteEx(partmain, propentitylist); |
| | | if (bol) |
| | | { |
| | | RemoveCache(ID); |
| | | AssetsPumpPropContent.RemoveCacheByIDs(propmodellist.Select(x => x.ID).ToList()); |
| | | } |
| | | return bol; |
| | | } |
| | | */ |
| | | //通过 ID 删除产品表及属性表 |
| | | public bool DeleteExByID(long ID) |
| | | { |
| | | var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsPumpPartMain>(); |
| | | var partmain = dal.GetByID(ID); |
| | | var propmodellist = AssetsPumpPropContent.GetProplistByPartID(ID); |
| | | var propentitylist = AssetsPumpPropContent.Model2Entities(propmodellist); |
| | | var bol = dal.DeleteEx(partmain, propentitylist); |
| | | if (bol) |
| | | { |
| | | RemoveCache(ID); |
| | | AssetsPumpPropContent.RemoveCacheByIDs(propmodellist.Select(x => x.ID).ToList()); |
| | | } |
| | | return bol; |
| | | } |
| | | |
| | | #endregion Delete |
| | | } |