| | |
| | | /// </summary> |
| | | public List<Model.AssetsPumpPartMain> GetByMainID(long ID) |
| | | { |
| | | var idlist = AssetsPumpMainAndPartMap.GetByPumpMainID(ID); |
| | | var idlist = AssetsPumpMainAndPartMapping.GetByPumpMainID(ID); |
| | | return GetByIds(idlist); |
| | | } |
| | | |
| | |
| | | var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsPumpPartMain>(); |
| | | var partentity = Model2Entity(part); |
| | | var propcontentsentity = AssetsPumpPropContent.Model2Entities(AssetsPumpPropContents); |
| | | var partmapentity = AssetsPumpMainAndPartMap.Model2Entity(partmap); |
| | | var partmapentity = AssetsPumpMainAndPartMapping.Model2Entity(partmap); |
| | | var id = dal.InsertsEx(partentity, propcontentsentity, partmapentity); |
| | | if (id > 0) |
| | | { |
| | | UpdateCache(id); |
| | | AssetsPumpPropContent.UpdateCacheByPartID(id); |
| | | AssetsPumpMainAndPartMap.UpdateCacheByPartID(id); |
| | | AssetsPumpMainAndPartMapping.UpdateCacheByPartID(id); |
| | | } |
| | | return id; |
| | | } |