| | |
| | | private void barBtnImportByExcel_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | var dlg = new ImportPumpPerform2dByExcelDlg(); |
| | | dlg.ReloadDataEvent += async (rhs) => |
| | | dlg.ReloadDataEvent += async (rhs, name, importance) => |
| | | { |
| | | var bll = new BLL.PhartDiagramRelation(); |
| | | var id = await bll.InsertEx(rhs); |
| | | if (id > 0) |
| | | { |
| | | var vmo = new PhartDiagramRelationVmo(rhs); |
| | | vmo.OtherName = name; |
| | | if (!string.IsNullOrEmpty(importance)) |
| | | { |
| | | vmo.Importance = Convert.ToInt32(importance); |
| | | } |
| | | var relationId = await BLLFactory<HStation.BLL.PhartDiagramRelation>.Instance.Insert(vmo); |
| | | if (relationId > 0) |
| | | { |
| | |
| | | //图片 |
| | | private void barBtnImportByPicture_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | var dlg = new ImportPumpPerform2dByExcelDlg(); |
| | | dlg.ReloadDataEvent += async (rhs) => |
| | | var dlg = new ImportPumpPerform2dByImageDlg(); |
| | | dlg.ReloadDataEvent += async (rhs, name, importance) => |
| | | { |
| | | var bll = new BLL.PhartDiagramRelation(); |
| | | var id = await bll.InsertEx(rhs); |
| | | if (id > 0) |
| | | { |
| | | var vmo = new PhartDiagramRelationVmo(rhs); |
| | | vmo.OtherName = name; |
| | | if (!string.IsNullOrEmpty(importance)) |
| | | { |
| | | vmo.Importance = Convert.ToInt32(importance); |
| | | } |
| | | var relationId = await BLLFactory<HStation.BLL.PhartDiagramRelation>.Instance.Insert(vmo); |
| | | if (relationId > 0) |
| | | { |