| | |
| | | { |
| | | rhs.ID = id; |
| | | _allBindingList.Add(new PackageViewModel(await _bll.GetByID(id))); |
| | | this.kitViewModelBindingSource.ResetBindings(false); |
| | | foreach (var item in allMappingList) |
| | | { |
| | | var model = new Vmo.AssetsPackagePumpMappingVmo(); |
| | |
| | | await _mappingBll.Insert(model); |
| | | } |
| | | } |
| | | for (int i = 0; i < _allBindingList.Count; i++) |
| | | { |
| | | if (_allBindingList[i].ID == id) |
| | | { |
| | | this.gridView1.FocusedRowHandle = i; |
| | | } |
| | | } |
| | | this.kitViewModelBindingSource.ResetBindings(false); |
| | | |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | await _mappingBll.Insert(model); |
| | | } |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | _allBindingList.Remove(currentVm); |
| | | await _mappingBll.DeleteByKitID(currentVm.ID); |
| | | this.kitViewModelBindingSource.ResetBindings(false); |
| | | this.equipmentViewModelBindingSource1.ResetBindings(false); |
| | | TipFormHelper.ShowSucceed("删除成功!"); |
| | | } |
| | | else |
| | |
| | | var currentVm = this.gridView1.GetCurrentViewModel(_allBindingList); |
| | | if (currentVm == null) |
| | | { |
| | | MessageBoxHelper.ShowWarning("请选择数据行!"); |
| | | return; |
| | | } |
| | | var allList = await new BLL.AssetsPackagePumpMapping().GetByKitID(currentVm.ID); |