| | |
| | | dlg.SetBindingData(series.ID); |
| | | dlg.ReloadDataEvent += async (rhs, allMappingList) => |
| | | { |
| | | rhs.PumpTotal = allMappingList.Count; |
| | | var id = await _bll.Insert(rhs); |
| | | if (id > 0) |
| | | { |
| | |
| | | var model = new Vmo.AssetsPackagePumpMappingVmo(); |
| | | model.PumpMainID = item.PumpID; |
| | | model.EquipmentMainID = id; |
| | | for (int i = 0; i < item.UserCount; i++) |
| | | { |
| | | await _mappingBll.Insert(model); |
| | | } |
| | | await _mappingBll.Insert(model); |
| | | } |
| | | for (int i = 0; i < _allBindingList.Count; i++) |
| | | { |
| | |
| | | dlg.SetBindingData(Equipment); |
| | | dlg.ReloadDataEvent += async (rhs, allMappingList) => |
| | | { |
| | | rhs.PumpTotal = allMappingList.Count; |
| | | if (await _bll.Update(rhs)) |
| | | { |
| | | vm.Reset(rhs); |
| | |
| | | var model = new Vmo.AssetsPackagePumpMappingVmo(); |
| | | model.PumpMainID = item.PumpID; |
| | | model.EquipmentMainID = vm.ID; |
| | | for (int i = 0; i < item.UserCount; i++) |
| | | { |
| | | await _mappingBll.Insert(model); |
| | | } |
| | | await _mappingBll.Insert(model); |
| | | } |
| | | GridView1_FocusedRowChanged(null, null); |
| | | |
| | | return true; |
| | | } |
| | |
| | | var currentVm = this.gridView1.GetCurrentViewModel(_allBindingList); |
| | | if (currentVm != null) |
| | | { |
| | | var allList = await new BLL.AssetsPackagePumpMapping().GetByKitID(currentVm.ID); |
| | | var allList = await new BLL.AssetsPackagePumpMapping().GetByPackageID(currentVm.ID); |
| | | if (allList != null) |
| | | { |
| | | foreach (var item in allList) |