| | |
| | | PBS.Vmo.WE.ItemVmo itemVmo = null; |
| | | if (model != null) |
| | | { |
| | | // itemVmo = await new PBS.BLL.WE.Item().GetByID(model.ItemID); |
| | | //itemVmo = await new PBS.BLL.WE.Item().GetByID(model); |
| | | } |
| | | dlg.SetBindingData(itemVmo, catalogueID); |
| | | dlg.ReloadDataEvent += async (item, catalogue, mappingList) => |
| | | { |
| | | //现在默认只能增加,不能编辑 |
| | | if (itemVmo == null) |
| | | { |
| | | var id = await _bll.Insert(item); |
| | | if (id > 0) |
| | | { |
| | | item.ID = id; |
| | | catalogue.ItemID = id; |
| | | var cataID = await new PBS.BLL.WE.CatalogueMapping().Insert(catalogue); |
| | | if (cataID > 0) |
| | |
| | | } |
| | | else MessageBoxHelper.ShowError($"删除失败!"); |
| | | } |
| | | |
| | | //详细信息 |
| | | private void BtnInfo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | var vm = this.gridView1.GetCurrentViewModel(_allBindingList); |
| | | if (vm == null) |
| | | { |
| | | TipFormHelper.ShowWarn("请输入数据行!"); |
| | | return; |
| | | } |
| | | |
| | | var dlg = new EditWaterWEDlg(); |
| | | dlg.SetInfoDisplay(vm); |
| | | dlg.ShowDialog(); |
| | | } |
| | | } |
| | | } |