| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public partial class PumpPartMain : BaseDAL_Sorter<Entity.PumpPartMain>, IPumpPartMain |
| | | public partial class AssetsPumpPartMain : BaseDAL_Sorter<Entity.AssetsPumpPartMain>, IAssetsPumpPartMain |
| | | { |
| | | /// <summary> |
| | | /// |
| | |
| | | } |
| | | |
| | | //插入拓展 |
| | | public long InsertsEx(Entity.PumpPartMain part, List<Entity.PumpPropContent> pumpPropContents, Entity.PumpMainAndPartMap partmap) |
| | | public long InsertsEx(Entity.AssetsPumpPartMain part, List<Entity.AssetsPumpPropContent> AssetsPumpPropContents, Entity.AssetsPumpMainAndPartMap partmap) |
| | | { |
| | | if (part == null) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | if (pumpPropContents != null) |
| | | if (AssetsPumpPropContents != null) |
| | | { |
| | | foreach (var item in pumpPropContents) |
| | | { |
| | | item.PartID = result; |
| | | } |
| | | var content = db.Insertable(pumpPropContents).ExecuteReturnSnowflakeId(); |
| | | var content = db.Insertable(AssetsPumpPropContents).ExecuteReturnSnowflakeId(); |
| | | if (content < 0) |
| | | { |
| | | db.RollbackTran(); |
| | |
| | | } |
| | | |
| | | //编辑拓展 |
| | | public bool UpdateEx(Entity.PumpPartMain part, List<Entity.PumpPropContent> pumpPropContents) |
| | | public bool UpdateEx(Entity.AssetsPumpPartMain part, List<Entity.AssetsPumpPropContent> AssetsPumpPropContents) |
| | | { |
| | | if (part == null) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | if (pumpPropContents != null) |
| | | if (AssetsPumpPropContents != null) |
| | | { |
| | | var propresult = db.Updateable(pumpPropContents).ExecuteCommandHasChange(); |
| | | var propresult = db.Updateable(AssetsPumpPropContents).ExecuteCommandHasChange(); |
| | | if (!propresult) |
| | | { |
| | | db.RollbackTran(); |
| | |
| | | } |
| | | |
| | | //删除拓展 (删除产品表及属性表) |
| | | public bool DeleteEx(Entity.PumpPartMain part, List<Entity.PumpPropContent> pumpPropContents) |
| | | public bool DeleteEx(Entity.AssetsPumpPartMain part, List<Entity.AssetsPumpPropContent> AssetsPumpPropContents) |
| | | { |
| | | if (part == null) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | if (pumpPropContents != null) |
| | | if (AssetsPumpPropContents != null) |
| | | { |
| | | var propresult = db.Deleteable(pumpPropContents).ExecuteCommand() > 0; |
| | | var propresult = db.Deleteable(AssetsPumpPropContents).ExecuteCommand() > 0; |
| | | if (!propresult) |
| | | { |
| | | db.RollbackTran(); |