From 26917739c47252ecdc3b8f43eca6ebaf9cba6ac4 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期二, 10 十二月 2024 15:17:04 +0800 Subject: [PATCH] 提交报告修改 --- WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/04-chart-edit/TankPerform2dEditChart.cs | 2 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/test.cs | 9 Service/HStation.Service.Assets.Core/02-model/12-Compressor/AssetsCompressorPropContent.cs | 13 WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/CompressorManageMainPage.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditPackagePartPropDlg.Designer.cs | 186 +++-- WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/ExchangerProductListBox.cs | 15 WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/ExchangerProductListBox.resx | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/ExchangerPartViewModel.cs | 2 Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerMainAndPartMappingVmo.cs | 2 WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Assets.PropGroupChoiceViewModel.datasource | 10 WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/ExchangerPartViewModel.cs | 2 WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/01-series/AddAssetsExchangerSeriesDlg.cs | 20 WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/01-series/EditAssetsExchangerSeriesDlg.cs | 15 Dto/HStation.Dto.Assets.Core/11-Exchanger/04-ExchangerPropContent/ExchangerPropContentDto.cs | 12 WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/ExchangerPropChoiceViewModel.cs | 3 WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj | 14 WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Assets.CompressorPropChoiceViewModel.datasource | 10 WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/CompressorPropChoiceViewModel.cs | 3 Service/HStation.Service.Assets.Core/01-entity/11-Exchanger/AssetsExchangerPropContent.cs | 7 BLL/HStation.BLL.Assets.Core/04-bll/12-Comressor/05-CompressorMainAndPartMap/AssetsCompressorMainAndPartMapping.cs | 54 WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditPackagePartPropDlg.resx | 10 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/ReportViewModel.cs | 283 ++++++++ WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/Local_resistance.png | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/12-package/EditPackagePartPropDlg.cs | 2 Dto/HStation.Dto.Assets.Core/12-Compressor/04-CompressorPropContent/AddAssetsCompressorPropContentInput.cs | 9 WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user | 11 WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/01-series/EditAssetsExchangerSeriesDlg.Designer.cs | 37 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/SimulationWordReportHelper.cs | 31 WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/ExchangerProductListBox.cs | 15 BLL/HStation.BLL.Assets.Core/04-bll/12-Comressor/03-CompressorPartMain/AssetsCompressorPartMain.cs | 6 Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsCompressorPropContentVmo.cs | 9 WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/04-chart-edit/CompressorPerform2dEditChart.cs | 2 Desktop/HStation.Desktop.Xhs.Core/MainForm.cs | 6 WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/EditPackagePartPropDlg.resx | 12 WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/CompressorManageMainPage.resx | 0 Dto/HStation.Dto.Assets.Core/11-Exchanger/04-ExchangerPropContent/UpdateExchangerPropContentInput.cs | 5 Dto/HStation.Dto.Assets.Core/12-Compressor/04-CompressorPropContent/AssetsCompressorPropContentDto.cs | 12 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/04-chart-edit/ValvePerform2dEditChart.cs | 2 WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/Pressure_conversion_formula_small1.2.png | 0 Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsCompressorMainAndPartMappingVmo.cs | 2 WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/CompressorManageMainPage.Designer.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/ExchangerProductListBox.Designer.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditPackagePartPropDlg.cs | 162 ++- WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/EditPackagePartPropDlg.cs | 146 ++- WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/01-series/AddAssetsCompressorSeriesDlg.cs | 14 Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerPropContentVmo.cs | 9 Dto/HStation.Dto.Assets.Core/11-Exchanger/04-ExchangerPropContent/AddExchangerPropContentInput.cs | 5 WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/01-series/ExchangerTreeListCtrl.cs | 1 WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/01-series/AddAssetsCompressorSeriesDlg.Designer.cs | 37 BLL/HStation.BLL.Assets.Core/04-bll/11-Exchanger/05-AssetsExchangerMainAndPartMap/AssetsExchangerMainAndPartMapping.cs | 54 WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/Pressure_conversion_formula_big1.2.png | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/EditPackagePartPropDlg.Designer.cs | 178 ++-- WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/01-series/EditAssetsExchangerSeriesDlg.cs | 5 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/SimulationWordReport.cs | 568 +++++++--------- WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/04-chart-edit/ExchangerPerform2dEditChart.cs | 2 Dto/HStation.Dto.Assets.Core/12-Compressor/04-CompressorPropContent/UpdateAssetsCompressorPropContentInput.cs | 5 Service/HStation.Service.Assets.Core/02-model/11-Exchanger/AssetsExchangerPropContent.cs | 17 /dev/null | 10 Service/HStation.Service.Assets.Core/01-entity/12-Compressor/AssetsCompressorPropContent.cs | 7 BLL/HStation.BLL.Assets.Core/04-bll/11-Exchanger/03-AssetsExchangerPartMain/AssetsExchangerPartMain.cs | 6 60 files changed, 1,310 insertions(+), 749 deletions(-) diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/11-Exchanger/03-AssetsExchangerPartMain/AssetsExchangerPartMain.cs b/BLL/HStation.BLL.Assets.Core/04-bll/11-Exchanger/03-AssetsExchangerPartMain/AssetsExchangerPartMain.cs index 4dc2570..b01d47f 100644 --- a/BLL/HStation.BLL.Assets.Core/04-bll/11-Exchanger/03-AssetsExchangerPartMain/AssetsExchangerPartMain.cs +++ b/BLL/HStation.BLL.Assets.Core/04-bll/11-Exchanger/03-AssetsExchangerPartMain/AssetsExchangerPartMain.cs @@ -91,7 +91,7 @@ return await _cal.Inserts(VmoList); } - public async Task<long> InsertEx(Vmo.AssetsExchangerPartMainVmo part, List<Vmo.AssetsExchangerPropContentVmo> propcontents, Vmo.AssetsExchangerMainAndPartMapVmo partmap) + public async Task<long> InsertEx(Vmo.AssetsExchangerPartMainVmo part, List<Vmo.AssetsExchangerPropContentVmo> propcontents, Vmo.AssetsExchangerMainAndPartMappingVmo partmap) { var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsExchangerPartMainVmo, AddAssetsExchangerPartMainInput>() ).CreateMapper(); @@ -101,9 +101,9 @@ ).CreateMapper(); var VmoContent = mapperContent.Map<List<Vmo.AssetsExchangerPropContentVmo>, List<AddAssetsExchangerPropContentInput>>(propcontents); - var mapperPartmap = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsExchangerMainAndPartMapVmo, AddAssetsExchangerMainAndPartMappingInput>() + var mapperPartmap = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsExchangerMainAndPartMappingVmo, AddAssetsExchangerMainAndPartMappingInput>() ).CreateMapper(); - var Vmopartmap = mapperPartmap.Map<Vmo.AssetsExchangerMainAndPartMapVmo, AddAssetsExchangerMainAndPartMappingInput>(partmap); + var Vmopartmap = mapperPartmap.Map<Vmo.AssetsExchangerMainAndPartMappingVmo, AddAssetsExchangerMainAndPartMappingInput>(partmap); return await _cal.InsertEx(VmoPart, VmoContent, Vmopartmap); } diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/11-Exchanger/05-AssetsExchangerMainAndPartMap/AssetsExchangerMainAndPartMapping.cs b/BLL/HStation.BLL.Assets.Core/04-bll/11-Exchanger/05-AssetsExchangerMainAndPartMap/AssetsExchangerMainAndPartMapping.cs index 9b7bf26..b2c75e8 100644 --- a/BLL/HStation.BLL.Assets.Core/04-bll/11-Exchanger/05-AssetsExchangerMainAndPartMap/AssetsExchangerMainAndPartMapping.cs +++ b/BLL/HStation.BLL.Assets.Core/04-bll/11-Exchanger/05-AssetsExchangerMainAndPartMap/AssetsExchangerMainAndPartMapping.cs @@ -16,24 +16,24 @@ /// <summary> /// /// </summary> - public async Task<List<Vmo.AssetsExchangerMainAndPartMapVmo>> GetAll() + public async Task<List<Vmo.AssetsExchangerMainAndPartMappingVmo>> GetAll() { var DtoList = await _cal.GetAll(); - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.AssetsExchangerMainAndPartMappingDto, Vmo.AssetsExchangerMainAndPartMapVmo>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.AssetsExchangerMainAndPartMappingDto, Vmo.AssetsExchangerMainAndPartMappingVmo>() ).CreateMapper(); - var vmoList = mapper.Map<List<Dto.Assets.AssetsExchangerMainAndPartMappingDto>, List<Vmo.AssetsExchangerMainAndPartMapVmo>>(DtoList); + var vmoList = mapper.Map<List<Dto.Assets.AssetsExchangerMainAndPartMappingDto>, List<Vmo.AssetsExchangerMainAndPartMappingVmo>>(DtoList); return vmoList; } /// <summary> /// /// </summary> - public async Task<Vmo.AssetsExchangerMainAndPartMapVmo> GetByID(long ID) + public async Task<Vmo.AssetsExchangerMainAndPartMappingVmo> GetByID(long ID) { var Dto = await _cal.GetByID(ID); - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.AssetsExchangerMainAndPartMappingDto, Vmo.AssetsExchangerMainAndPartMapVmo>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.AssetsExchangerMainAndPartMappingDto, Vmo.AssetsExchangerMainAndPartMappingVmo>() ).CreateMapper(); - var vmo = mapper.Map<Dto.Assets.AssetsExchangerMainAndPartMappingDto, Vmo.AssetsExchangerMainAndPartMapVmo>(Dto); + var vmo = mapper.Map<Dto.Assets.AssetsExchangerMainAndPartMappingDto, Vmo.AssetsExchangerMainAndPartMappingVmo>(Dto); return vmo; } @@ -41,12 +41,12 @@ /// <summary> /// /// </summary> - public async Task<List<Vmo.AssetsExchangerMainAndPartMapVmo>> GetByIds(List<long> Ids) + public async Task<List<Vmo.AssetsExchangerMainAndPartMappingVmo>> GetByIds(List<long> Ids) { var DtoList = await _cal.GetByIds(Ids); - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.AssetsExchangerMainAndPartMappingDto, Vmo.AssetsExchangerMainAndPartMapVmo>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.AssetsExchangerMainAndPartMappingDto, Vmo.AssetsExchangerMainAndPartMappingVmo>() ).CreateMapper(); - var vmoList = mapper.Map<List<Dto.Assets.AssetsExchangerMainAndPartMappingDto>, List<Vmo.AssetsExchangerMainAndPartMapVmo>>(DtoList); + var vmoList = mapper.Map<List<Dto.Assets.AssetsExchangerMainAndPartMappingDto>, List<Vmo.AssetsExchangerMainAndPartMappingVmo>>(DtoList); return vmoList; } @@ -58,11 +58,11 @@ /// <summary> /// /// </summary> - public async Task<long> Insert(Vmo.AssetsExchangerMainAndPartMapVmo model) + public async Task<long> Insert(Vmo.AssetsExchangerMainAndPartMappingVmo model) { - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsExchangerMainAndPartMapVmo, AddAssetsExchangerMainAndPartMappingInput>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsExchangerMainAndPartMappingVmo, AddAssetsExchangerMainAndPartMappingInput>() ).CreateMapper(); - var vmo = mapper.Map<Vmo.AssetsExchangerMainAndPartMapVmo, AddAssetsExchangerMainAndPartMappingInput>(model); + var vmo = mapper.Map<Vmo.AssetsExchangerMainAndPartMappingVmo, AddAssetsExchangerMainAndPartMappingInput>(model); return await _cal.Insert(vmo); } @@ -70,11 +70,11 @@ /// <summary> /// /// </summary> - public async Task<bool> Inserts(List<Vmo.AssetsExchangerMainAndPartMapVmo> list) + public async Task<bool> Inserts(List<Vmo.AssetsExchangerMainAndPartMappingVmo> list) { - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsExchangerMainAndPartMapVmo, AddAssetsExchangerMainAndPartMappingInput>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsExchangerMainAndPartMappingVmo, AddAssetsExchangerMainAndPartMappingInput>() ).CreateMapper(); - var vmoList = mapper.Map<List<Vmo.AssetsExchangerMainAndPartMapVmo>, List<AddAssetsExchangerMainAndPartMappingInput>>(list); + var vmoList = mapper.Map<List<Vmo.AssetsExchangerMainAndPartMappingVmo>, List<AddAssetsExchangerMainAndPartMappingInput>>(list); return await _cal.Inserts(vmoList); } @@ -82,11 +82,11 @@ /// <summary> /// /// </summary> - public async Task<bool> BulkInserts(List<Vmo.AssetsExchangerMainAndPartMapVmo> list) + public async Task<bool> BulkInserts(List<Vmo.AssetsExchangerMainAndPartMappingVmo> list) { - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsExchangerMainAndPartMapVmo, AddAssetsExchangerMainAndPartMappingInput>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsExchangerMainAndPartMappingVmo, AddAssetsExchangerMainAndPartMappingInput>() ).CreateMapper(); - var vmoList = mapper.Map<List<Vmo.AssetsExchangerMainAndPartMapVmo>, List<AddAssetsExchangerMainAndPartMappingInput>>(list); + var vmoList = mapper.Map<List<Vmo.AssetsExchangerMainAndPartMappingVmo>, List<AddAssetsExchangerMainAndPartMappingInput>>(list); return await _cal.BulkInserts(vmoList); } @@ -97,22 +97,22 @@ /// <summary> /// /// </summary> - public async Task<bool> Update(Vmo.AssetsExchangerMainAndPartMapVmo model) + public async Task<bool> Update(Vmo.AssetsExchangerMainAndPartMappingVmo model) { - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsExchangerMainAndPartMapVmo, UpdateAssetsExchangerMainAndPartMappingInput>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsExchangerMainAndPartMappingVmo, UpdateAssetsExchangerMainAndPartMappingInput>() ).CreateMapper(); - var vmo = mapper.Map<Vmo.AssetsExchangerMainAndPartMapVmo, UpdateAssetsExchangerMainAndPartMappingInput>(model); + var vmo = mapper.Map<Vmo.AssetsExchangerMainAndPartMappingVmo, UpdateAssetsExchangerMainAndPartMappingInput>(model); return await _cal.Update(vmo); } /// <summary> /// /// </summary> - public async Task<bool> Updates(List<Vmo.AssetsExchangerMainAndPartMapVmo> list) + public async Task<bool> Updates(List<Vmo.AssetsExchangerMainAndPartMappingVmo> list) { - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsExchangerMainAndPartMapVmo, UpdateAssetsExchangerMainAndPartMappingInput>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsExchangerMainAndPartMappingVmo, UpdateAssetsExchangerMainAndPartMappingInput>() ).CreateMapper(); - var vmoList = mapper.Map<List<Vmo.AssetsExchangerMainAndPartMapVmo>, List<UpdateAssetsExchangerMainAndPartMappingInput>>(list); + var vmoList = mapper.Map<List<Vmo.AssetsExchangerMainAndPartMappingVmo>, List<UpdateAssetsExchangerMainAndPartMappingInput>>(list); return await _cal.Updates(vmoList); } @@ -120,11 +120,11 @@ /// <summary> /// /// </summary> - public async Task<bool> BulkUpdates(List<Vmo.AssetsExchangerMainAndPartMapVmo> list) + public async Task<bool> BulkUpdates(List<Vmo.AssetsExchangerMainAndPartMappingVmo> list) { - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsExchangerMainAndPartMapVmo, UpdateAssetsExchangerMainAndPartMappingInput>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsExchangerMainAndPartMappingVmo, UpdateAssetsExchangerMainAndPartMappingInput>() ).CreateMapper(); - var vmoList = mapper.Map<List<Vmo.AssetsExchangerMainAndPartMapVmo>, List<UpdateAssetsExchangerMainAndPartMappingInput>>(list); + var vmoList = mapper.Map<List<Vmo.AssetsExchangerMainAndPartMappingVmo>, List<UpdateAssetsExchangerMainAndPartMappingInput>>(list); return await _cal.BulkUpdates(vmoList); } diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/12-Comressor/03-CompressorPartMain/AssetsCompressorPartMain.cs b/BLL/HStation.BLL.Assets.Core/04-bll/12-Comressor/03-CompressorPartMain/AssetsCompressorPartMain.cs index 6164ecd..297ecf1 100644 --- a/BLL/HStation.BLL.Assets.Core/04-bll/12-Comressor/03-CompressorPartMain/AssetsCompressorPartMain.cs +++ b/BLL/HStation.BLL.Assets.Core/04-bll/12-Comressor/03-CompressorPartMain/AssetsCompressorPartMain.cs @@ -91,7 +91,7 @@ return await _cal.Inserts(VmoList); } - public async Task<long> InsertEx(Vmo.AssetsCompressorPartMainVmo part, List<Vmo.AssetsCompressorPropContentVmo> propcontents, Vmo.AssetsCompressorMainAndPartMapVmo partmap) + public async Task<long> InsertEx(Vmo.AssetsCompressorPartMainVmo part, List<Vmo.AssetsCompressorPropContentVmo> propcontents, Vmo.AssetsCompressorMainAndPartMappingVmo partmap) { var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsCompressorPartMainVmo, AddAssetsCompressorPartMainInput>() ).CreateMapper(); @@ -101,9 +101,9 @@ ).CreateMapper(); var VmoContent = mapperContent.Map<List<Vmo.AssetsCompressorPropContentVmo>, List<AddAssetsCompressorPropContentInput>>(propcontents); - var mapperPartmap = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsCompressorMainAndPartMapVmo, AddAssetsCompressorMainAndPartMapInput>() + var mapperPartmap = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsCompressorMainAndPartMappingVmo, AddAssetsCompressorMainAndPartMapInput>() ).CreateMapper(); - var Vmopartmap = mapperPartmap.Map<Vmo.AssetsCompressorMainAndPartMapVmo, AddAssetsCompressorMainAndPartMapInput>(partmap); + var Vmopartmap = mapperPartmap.Map<Vmo.AssetsCompressorMainAndPartMappingVmo, AddAssetsCompressorMainAndPartMapInput>(partmap); return await _cal.InsertEx(VmoPart, VmoContent, Vmopartmap); } diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/12-Comressor/05-CompressorMainAndPartMap/AssetsCompressorMainAndPartMapping.cs b/BLL/HStation.BLL.Assets.Core/04-bll/12-Comressor/05-CompressorMainAndPartMap/AssetsCompressorMainAndPartMapping.cs index 2887c9c..0566452 100644 --- a/BLL/HStation.BLL.Assets.Core/04-bll/12-Comressor/05-CompressorMainAndPartMap/AssetsCompressorMainAndPartMapping.cs +++ b/BLL/HStation.BLL.Assets.Core/04-bll/12-Comressor/05-CompressorMainAndPartMap/AssetsCompressorMainAndPartMapping.cs @@ -16,24 +16,24 @@ /// <summary> /// /// </summary> - public async Task<List<Vmo.AssetsCompressorMainAndPartMapVmo>> GetAll() + public async Task<List<Vmo.AssetsCompressorMainAndPartMappingVmo>> GetAll() { var DtoList = await _cal.GetAll(); - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.AssetsCompressorMainAndPartMapDto, Vmo.AssetsCompressorMainAndPartMapVmo>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.AssetsCompressorMainAndPartMapDto, Vmo.AssetsCompressorMainAndPartMappingVmo>() ).CreateMapper(); - var vmoList = mapper.Map<List<Dto.Assets.AssetsCompressorMainAndPartMapDto>, List<Vmo.AssetsCompressorMainAndPartMapVmo>>(DtoList); + var vmoList = mapper.Map<List<Dto.Assets.AssetsCompressorMainAndPartMapDto>, List<Vmo.AssetsCompressorMainAndPartMappingVmo>>(DtoList); return vmoList; } /// <summary> /// /// </summary> - public async Task<Vmo.AssetsCompressorMainAndPartMapVmo> GetByID(long ID) + public async Task<Vmo.AssetsCompressorMainAndPartMappingVmo> GetByID(long ID) { var Dto = await _cal.GetByID(ID); - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.AssetsCompressorMainAndPartMapDto, Vmo.AssetsCompressorMainAndPartMapVmo>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.AssetsCompressorMainAndPartMapDto, Vmo.AssetsCompressorMainAndPartMappingVmo>() ).CreateMapper(); - var vmo = mapper.Map<Dto.Assets.AssetsCompressorMainAndPartMapDto, Vmo.AssetsCompressorMainAndPartMapVmo>(Dto); + var vmo = mapper.Map<Dto.Assets.AssetsCompressorMainAndPartMapDto, Vmo.AssetsCompressorMainAndPartMappingVmo>(Dto); return vmo; } @@ -41,12 +41,12 @@ /// <summary> /// /// </summary> - public async Task<List<Vmo.AssetsCompressorMainAndPartMapVmo>> GetByIds(List<long> Ids) + public async Task<List<Vmo.AssetsCompressorMainAndPartMappingVmo>> GetByIds(List<long> Ids) { var DtoList = await _cal.GetByIds(Ids); - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.AssetsCompressorMainAndPartMapDto, Vmo.AssetsCompressorMainAndPartMapVmo>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.AssetsCompressorMainAndPartMapDto, Vmo.AssetsCompressorMainAndPartMappingVmo>() ).CreateMapper(); - var vmoList = mapper.Map<List<Dto.Assets.AssetsCompressorMainAndPartMapDto>, List<Vmo.AssetsCompressorMainAndPartMapVmo>>(DtoList); + var vmoList = mapper.Map<List<Dto.Assets.AssetsCompressorMainAndPartMapDto>, List<Vmo.AssetsCompressorMainAndPartMappingVmo>>(DtoList); return vmoList; } @@ -58,11 +58,11 @@ /// <summary> /// /// </summary> - public async Task<long> Insert(Vmo.AssetsCompressorMainAndPartMapVmo model) + public async Task<long> Insert(Vmo.AssetsCompressorMainAndPartMappingVmo model) { - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsCompressorMainAndPartMapVmo, AddAssetsCompressorMainAndPartMapInput>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsCompressorMainAndPartMappingVmo, AddAssetsCompressorMainAndPartMapInput>() ).CreateMapper(); - var vmo = mapper.Map<Vmo.AssetsCompressorMainAndPartMapVmo, AddAssetsCompressorMainAndPartMapInput>(model); + var vmo = mapper.Map<Vmo.AssetsCompressorMainAndPartMappingVmo, AddAssetsCompressorMainAndPartMapInput>(model); return await _cal.Insert(vmo); } @@ -70,11 +70,11 @@ /// <summary> /// /// </summary> - public async Task<bool> Inserts(List<Vmo.AssetsCompressorMainAndPartMapVmo> list) + public async Task<bool> Inserts(List<Vmo.AssetsCompressorMainAndPartMappingVmo> list) { - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsCompressorMainAndPartMapVmo, AddAssetsCompressorMainAndPartMapInput>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsCompressorMainAndPartMappingVmo, AddAssetsCompressorMainAndPartMapInput>() ).CreateMapper(); - var vmoList = mapper.Map<List<Vmo.AssetsCompressorMainAndPartMapVmo>, List<AddAssetsCompressorMainAndPartMapInput>>(list); + var vmoList = mapper.Map<List<Vmo.AssetsCompressorMainAndPartMappingVmo>, List<AddAssetsCompressorMainAndPartMapInput>>(list); return await _cal.Inserts(vmoList); } @@ -82,11 +82,11 @@ /// <summary> /// /// </summary> - public async Task<bool> BulkInserts(List<Vmo.AssetsCompressorMainAndPartMapVmo> list) + public async Task<bool> BulkInserts(List<Vmo.AssetsCompressorMainAndPartMappingVmo> list) { - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsCompressorMainAndPartMapVmo, AddAssetsCompressorMainAndPartMapInput>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsCompressorMainAndPartMappingVmo, AddAssetsCompressorMainAndPartMapInput>() ).CreateMapper(); - var vmoList = mapper.Map<List<Vmo.AssetsCompressorMainAndPartMapVmo>, List<AddAssetsCompressorMainAndPartMapInput>>(list); + var vmoList = mapper.Map<List<Vmo.AssetsCompressorMainAndPartMappingVmo>, List<AddAssetsCompressorMainAndPartMapInput>>(list); return await _cal.BulkInserts(vmoList); } @@ -97,22 +97,22 @@ /// <summary> /// /// </summary> - public async Task<bool> Update(Vmo.AssetsCompressorMainAndPartMapVmo model) + public async Task<bool> Update(Vmo.AssetsCompressorMainAndPartMappingVmo model) { - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsCompressorMainAndPartMapVmo, UpdateAssetsCompressorMainAndPartMapInput>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsCompressorMainAndPartMappingVmo, UpdateAssetsCompressorMainAndPartMapInput>() ).CreateMapper(); - var vmo = mapper.Map<Vmo.AssetsCompressorMainAndPartMapVmo, UpdateAssetsCompressorMainAndPartMapInput>(model); + var vmo = mapper.Map<Vmo.AssetsCompressorMainAndPartMappingVmo, UpdateAssetsCompressorMainAndPartMapInput>(model); return await _cal.Update(vmo); } /// <summary> /// /// </summary> - public async Task<bool> Updates(List<Vmo.AssetsCompressorMainAndPartMapVmo> list) + public async Task<bool> Updates(List<Vmo.AssetsCompressorMainAndPartMappingVmo> list) { - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsCompressorMainAndPartMapVmo, UpdateAssetsCompressorMainAndPartMapInput>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsCompressorMainAndPartMappingVmo, UpdateAssetsCompressorMainAndPartMapInput>() ).CreateMapper(); - var vmoList = mapper.Map<List<Vmo.AssetsCompressorMainAndPartMapVmo>, List<UpdateAssetsCompressorMainAndPartMapInput>>(list); + var vmoList = mapper.Map<List<Vmo.AssetsCompressorMainAndPartMappingVmo>, List<UpdateAssetsCompressorMainAndPartMapInput>>(list); return await _cal.Updates(vmoList); } @@ -120,11 +120,11 @@ /// <summary> /// /// </summary> - public async Task<bool> BulkUpdates(List<Vmo.AssetsCompressorMainAndPartMapVmo> list) + public async Task<bool> BulkUpdates(List<Vmo.AssetsCompressorMainAndPartMappingVmo> list) { - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsCompressorMainAndPartMapVmo, UpdateAssetsCompressorMainAndPartMapInput>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsCompressorMainAndPartMappingVmo, UpdateAssetsCompressorMainAndPartMapInput>() ).CreateMapper(); - var vmoList = mapper.Map<List<Vmo.AssetsCompressorMainAndPartMapVmo>, List<UpdateAssetsCompressorMainAndPartMapInput>>(list); + var vmoList = mapper.Map<List<Vmo.AssetsCompressorMainAndPartMappingVmo>, List<UpdateAssetsCompressorMainAndPartMapInput>>(list); return await _cal.BulkUpdates(vmoList); } diff --git a/Desktop/HStation.Desktop.Xhs.Core/MainForm.cs b/Desktop/HStation.Desktop.Xhs.Core/MainForm.cs index 9c07abc..368d5d8 100644 --- a/Desktop/HStation.Desktop.Xhs.Core/MainForm.cs +++ b/Desktop/HStation.Desktop.Xhs.Core/MainForm.cs @@ -1133,11 +1133,11 @@ { //foreach (NavButton item in this.tileNavPane.Buttons) //{ - // if (item.Tag == null) + // if (item.TagName == null) // continue; - // if (item.Tag is int) + // if (item.TagName is int) // { - // if (((int)item.Tag) == (int)modular) + // if (((int)item.TagName) == (int)modular) // { // item.Appearance.BackColor = Color.FromArgb(255, 128, 0); // } diff --git a/Dto/HStation.Dto.Assets.Core/11-Exchanger/04-ExchangerPropContent/AddExchangerPropContentInput.cs b/Dto/HStation.Dto.Assets.Core/11-Exchanger/04-ExchangerPropContent/AddExchangerPropContentInput.cs index 41a8d69..1e3c76c 100644 --- a/Dto/HStation.Dto.Assets.Core/11-Exchanger/04-ExchangerPropContent/AddExchangerPropContentInput.cs +++ b/Dto/HStation.Dto.Assets.Core/11-Exchanger/04-ExchangerPropContent/AddExchangerPropContentInput.cs @@ -21,5 +21,10 @@ /// 灞炴�у�� /// </summary> public string PropValue { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public string TagName { get; set; } } } \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/11-Exchanger/04-ExchangerPropContent/ExchangerPropContentDto.cs b/Dto/HStation.Dto.Assets.Core/11-Exchanger/04-ExchangerPropContent/ExchangerPropContentDto.cs index 5e2d627..a128018 100644 --- a/Dto/HStation.Dto.Assets.Core/11-Exchanger/04-ExchangerPropContent/ExchangerPropContentDto.cs +++ b/Dto/HStation.Dto.Assets.Core/11-Exchanger/04-ExchangerPropContent/ExchangerPropContentDto.cs @@ -13,6 +13,7 @@ this.PropID = rhs.PropID; this.PartID = rhs.PartID; this.PropValue = rhs.PropValue; + this.TagName = rhs.TagName; } /// <summary> @@ -21,17 +22,17 @@ public long ID { get; set; } /// <summary> - /// 娉电郴鍒桰D + /// 绯诲垪ID /// </summary> public long SeriesID { get; set; } /// <summary> - /// 娉靛瀷鍙稩D + /// 鍨嬪彿ID /// </summary> public long MainID { get; set; } /// <summary> - /// 娉典骇鍝両D + /// 浜у搧ID /// </summary> public long PartID { get; set; } @@ -44,5 +45,10 @@ /// 灞炴�у�� /// </summary> public string PropValue { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public string TagName { get; set; } } } \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/11-Exchanger/04-ExchangerPropContent/UpdateExchangerPropContentInput.cs b/Dto/HStation.Dto.Assets.Core/11-Exchanger/04-ExchangerPropContent/UpdateExchangerPropContentInput.cs index 71c28d4..745fee3 100644 --- a/Dto/HStation.Dto.Assets.Core/11-Exchanger/04-ExchangerPropContent/UpdateExchangerPropContentInput.cs +++ b/Dto/HStation.Dto.Assets.Core/11-Exchanger/04-ExchangerPropContent/UpdateExchangerPropContentInput.cs @@ -29,5 +29,10 @@ /// 灞炴�у�� /// </summary> public string PropValue { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public string TagName { get; set; } } } \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/12-Compressor/04-CompressorPropContent/AddAssetsCompressorPropContentInput.cs b/Dto/HStation.Dto.Assets.Core/12-Compressor/04-CompressorPropContent/AddAssetsCompressorPropContentInput.cs index 9157a03..65a9b84 100644 --- a/Dto/HStation.Dto.Assets.Core/12-Compressor/04-CompressorPropContent/AddAssetsCompressorPropContentInput.cs +++ b/Dto/HStation.Dto.Assets.Core/12-Compressor/04-CompressorPropContent/AddAssetsCompressorPropContentInput.cs @@ -3,12 +3,12 @@ public class AddAssetsCompressorPropContentInput { /// <summary> - /// 娉电郴鍒桰D + /// 绯诲垪ID /// </summary> public long SeriesID { get; set; } /// <summary> - /// 娉典骇鍝両D + /// 浜у搧ID /// </summary> public long PartID { get; set; } @@ -21,5 +21,10 @@ /// 灞炴�у�� /// </summary> public string PropValue { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public string TagName { get; set; } } } \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/12-Compressor/04-CompressorPropContent/AssetsCompressorPropContentDto.cs b/Dto/HStation.Dto.Assets.Core/12-Compressor/04-CompressorPropContent/AssetsCompressorPropContentDto.cs index a56c6b7..07711e3 100644 --- a/Dto/HStation.Dto.Assets.Core/12-Compressor/04-CompressorPropContent/AssetsCompressorPropContentDto.cs +++ b/Dto/HStation.Dto.Assets.Core/12-Compressor/04-CompressorPropContent/AssetsCompressorPropContentDto.cs @@ -13,6 +13,7 @@ this.PropID = rhs.PropID; this.PartID = rhs.PartID; this.PropValue = rhs.PropValue; + this.TagName = rhs.TagName; } /// <summary> @@ -21,17 +22,17 @@ public long ID { get; set; } /// <summary> - /// 娉电郴鍒桰D + /// 绯诲垪ID /// </summary> public long SeriesID { get; set; } /// <summary> - /// 娉靛瀷鍙稩D + /// 鍨嬪彿ID /// </summary> public long MainID { get; set; } /// <summary> - /// 娉典骇鍝両D + /// 浜у搧ID /// </summary> public long PartID { get; set; } @@ -44,5 +45,10 @@ /// 灞炴�у�� /// </summary> public string PropValue { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public string TagName { get; set; } } } \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/12-Compressor/04-CompressorPropContent/UpdateAssetsCompressorPropContentInput.cs b/Dto/HStation.Dto.Assets.Core/12-Compressor/04-CompressorPropContent/UpdateAssetsCompressorPropContentInput.cs index 058c0f7..4c3cf19 100644 --- a/Dto/HStation.Dto.Assets.Core/12-Compressor/04-CompressorPropContent/UpdateAssetsCompressorPropContentInput.cs +++ b/Dto/HStation.Dto.Assets.Core/12-Compressor/04-CompressorPropContent/UpdateAssetsCompressorPropContentInput.cs @@ -29,5 +29,10 @@ /// 灞炴�у�� /// </summary> public string PropValue { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public string TagName { get; set; } } } \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/01-entity/11-Exchanger/AssetsExchangerPropContent.cs b/Service/HStation.Service.Assets.Core/01-entity/11-Exchanger/AssetsExchangerPropContent.cs index ccae52e..2d4760a 100644 --- a/Service/HStation.Service.Assets.Core/01-entity/11-Exchanger/AssetsExchangerPropContent.cs +++ b/Service/HStation.Service.Assets.Core/01-entity/11-Exchanger/AssetsExchangerPropContent.cs @@ -7,7 +7,7 @@ /// </summary> [SysType("assets_exchanger_part_prop_content")] [SugarTable("assets_exchanger_part_prop_content")] - public class AssetsExchangerPropContent : BaseEntity, System.ICloneable + public class AssetsExchangerPropContent : BaseEntity, ITagName, System.ICloneable { public AssetsExchangerPropContent() { } @@ -33,6 +33,11 @@ public string PropValue { get; set; } /// <summary> + /// 鏍囩 + /// </summary> + public string TagName { get; set; } + + /// <summary> /// /// </summary> public AssetsPumpMain Clone() diff --git a/Service/HStation.Service.Assets.Core/01-entity/12-Compressor/AssetsCompressorPropContent.cs b/Service/HStation.Service.Assets.Core/01-entity/12-Compressor/AssetsCompressorPropContent.cs index eaf9390..c212578 100644 --- a/Service/HStation.Service.Assets.Core/01-entity/12-Compressor/AssetsCompressorPropContent.cs +++ b/Service/HStation.Service.Assets.Core/01-entity/12-Compressor/AssetsCompressorPropContent.cs @@ -7,7 +7,7 @@ /// </summary> [SysType("assets_compressor_part_prop_content")] [SugarTable("assets_compressor_part_prop_content")] - public class AssetsCompressorPropContent : BaseEntity, System.ICloneable + public class AssetsCompressorPropContent : BaseEntity, ITagName, System.ICloneable { public AssetsCompressorPropContent() { } @@ -33,6 +33,11 @@ public string PropValue { get; set; } /// <summary> + /// 鏍囩 + /// </summary> + public string TagName { get; set; } + + /// <summary> /// /// </summary> public AssetsPumpMain Clone() diff --git a/Service/HStation.Service.Assets.Core/02-model/11-Exchanger/AssetsExchangerPropContent.cs b/Service/HStation.Service.Assets.Core/02-model/11-Exchanger/AssetsExchangerPropContent.cs index eb2cf41..6fe5071 100644 --- a/Service/HStation.Service.Assets.Core/02-model/11-Exchanger/AssetsExchangerPropContent.cs +++ b/Service/HStation.Service.Assets.Core/02-model/11-Exchanger/AssetsExchangerPropContent.cs @@ -6,27 +6,29 @@ /// 灞炴�у�� /// </summary> [SysType("assets_exchanger_part_prop_content")] - public class AssetsExchangerPropContent : BaseModel, System.ICloneable + public class AssetsExchangerPropContent : BaseModel, ITagName, System.ICloneable { public AssetsExchangerPropContent() { } public AssetsExchangerPropContent(AssetsExchangerPropContent rhs) { - this.SeriesID = rhs.SeriesID; - this.PropID = rhs.PropID; this.ID = rhs.ID; + this.SeriesID = rhs.SeriesID; this.PartID = rhs.PartID; + this.PropID = rhs.PropID; this.PropValue = rhs.PropValue; + this.TagName = rhs.TagName; } public void Reset(AssetsExchangerPropContent rhs) { - this.SeriesID = rhs.SeriesID; - this.PropID = rhs.PropID; this.ID = rhs.ID; + this.SeriesID = rhs.SeriesID; this.PartID = rhs.PartID; + this.PropID = rhs.PropID; this.PropValue = rhs.PropValue; + this.TagName = rhs.TagName; } /// <summary> @@ -50,6 +52,11 @@ public string PropValue { get; set; } /// <summary> + /// 鏍囩 + /// </summary> + public string TagName { get; set; } + + /// <summary> /// /// </summary> public AssetsPumpMain Clone() diff --git a/Service/HStation.Service.Assets.Core/02-model/12-Compressor/AssetsCompressorPropContent.cs b/Service/HStation.Service.Assets.Core/02-model/12-Compressor/AssetsCompressorPropContent.cs index 64f6f60..fad8159 100644 --- a/Service/HStation.Service.Assets.Core/02-model/12-Compressor/AssetsCompressorPropContent.cs +++ b/Service/HStation.Service.Assets.Core/02-model/12-Compressor/AssetsCompressorPropContent.cs @@ -6,27 +6,29 @@ /// 灞炴�у�� /// </summary> [SysType("assets_compressor_part_prop_content")] - public class AssetsCompressorPropContent : BaseModel, System.ICloneable + public class AssetsCompressorPropContent : BaseModel, ITagName, System.ICloneable { public AssetsCompressorPropContent() { } public AssetsCompressorPropContent(AssetsCompressorPropContent rhs) { + this.ID = rhs.ID; this.SeriesID = rhs.SeriesID; this.PropID = rhs.PropID; - this.ID = rhs.ID; this.PartID = rhs.PartID; this.PropValue = rhs.PropValue; + this.TagName = rhs.TagName; } public void Reset(AssetsCompressorPropContent rhs) { + this.ID = rhs.ID; this.SeriesID = rhs.SeriesID; this.PropID = rhs.PropID; - this.ID = rhs.ID; this.PartID = rhs.PartID; this.PropValue = rhs.PropValue; + this.TagName = rhs.TagName; } /// <summary> @@ -50,6 +52,11 @@ public string PropValue { get; set; } /// <summary> + /// 鏍囩 + /// </summary> + public string TagName { get; set; } + + /// <summary> /// /// </summary> public AssetsPumpMain Clone() diff --git a/Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerMainAndPartMapVmo.cs b/Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerMainAndPartMappingVmo.cs similarity index 83% rename from Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerMainAndPartMapVmo.cs rename to Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerMainAndPartMappingVmo.cs index 0f20ff1..0154a15 100644 --- a/Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerMainAndPartMapVmo.cs +++ b/Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerMainAndPartMappingVmo.cs @@ -1,6 +1,6 @@ 锘縩amespace HStation.Vmo { - public class AssetsExchangerMainAndPartMapVmo : Yw.Vmo.BaseVmo + public class AssetsExchangerMainAndPartMappingVmo : Yw.Vmo.BaseVmo { /// <summary> /// 绯诲垪ID diff --git a/Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerPropContentVmo.cs b/Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerPropContentVmo.cs index 8df3671..f043578 100644 --- a/Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerPropContentVmo.cs +++ b/Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerPropContentVmo.cs @@ -8,12 +8,12 @@ public long ID { get; set; } /// <summary> - /// 娉电郴鍒桰D + /// 绯诲垪ID /// </summary> public long SeriesID { get; set; } /// <summary> - /// 娉典骇鍝両D + /// 浜у搧ID /// </summary> public long PartID { get; set; } @@ -26,5 +26,10 @@ /// 灞炴�у�� /// </summary> public string PropValue { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public string TagName { get; set; } } } \ No newline at end of file diff --git a/Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsCompressorMainAndPartMapVmo.cs b/Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsCompressorMainAndPartMappingVmo.cs similarity index 83% rename from Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsCompressorMainAndPartMapVmo.cs rename to Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsCompressorMainAndPartMappingVmo.cs index 6e510d8..787afc2 100644 --- a/Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsCompressorMainAndPartMapVmo.cs +++ b/Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsCompressorMainAndPartMappingVmo.cs @@ -1,6 +1,6 @@ 锘縩amespace HStation.Vmo { - public class AssetsCompressorMainAndPartMapVmo : Yw.Vmo.BaseVmo + public class AssetsCompressorMainAndPartMappingVmo : Yw.Vmo.BaseVmo { /// <summary> /// 绯诲垪ID diff --git a/Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsCompressorPropContentVmo.cs b/Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsCompressorPropContentVmo.cs index 75f5aab..9704415 100644 --- a/Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsCompressorPropContentVmo.cs +++ b/Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsCompressorPropContentVmo.cs @@ -8,12 +8,12 @@ public long ID { get; set; } /// <summary> - /// 娉电郴鍒桰D + /// 绯诲垪ID /// </summary> public long SeriesID { get; set; } /// <summary> - /// 娉典骇鍝両D + /// 浜у搧ID /// </summary> public long PartID { get; set; } @@ -26,5 +26,10 @@ /// 灞炴�у�� /// </summary> public string PropValue { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public string TagName { get; set; } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/04-chart-edit/ValvePerform2dEditChart.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/04-chart-edit/ValvePerform2dEditChart.cs index 772149c..e2d36d0 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/04-chart-edit/ValvePerform2dEditChart.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/04-chart-edit/ValvePerform2dEditChart.cs @@ -336,7 +336,7 @@ { if (hitInfo.InSeriesPoint) { - //if ((int)hitInfo.Series.Tag != (int)_edit_curve_type) + //if ((int)hitInfo.Series.TagName != (int)_edit_curve_type) //{ // _pickPoint = null; // return; diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/01-series/AddAssetsExchangerSeriesDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/01-series/AddAssetsExchangerSeriesDlg.cs index dcfe106..5909a8e 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/01-series/AddAssetsExchangerSeriesDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/01-series/AddAssetsExchangerSeriesDlg.cs @@ -8,16 +8,17 @@ { InitializeComponent(); this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; - this.Load += AddAssetsExchangerSeriesDlg_Load; } + + private Vmo.AssetsExchangerSeriesVmo _assetsExchangerSeries; public event Func<Vmo.AssetsExchangerSeriesVmo, object, Task<bool>> ReloadDataEvent = null; private List<AssetsExchangerSeriesViewModel> _assetsExchangerSeriesViews; - //鍒濆鍖� - private async void AddAssetsExchangerSeriesDlg_Load(object sender, EventArgs e) + public async void SetBindingData() { + _assetsExchangerSeries = new Vmo.AssetsExchangerSeriesVmo(); _assetsExchangerSeriesViews = new List<AssetsExchangerSeriesViewModel>(); var allList = await new BLL.AssetsExchangerSeries().GetAll(); if (allList != null) @@ -54,11 +55,14 @@ { if (!Valid()) return; - var model = new Vmo.AssetsExchangerSeriesVmo(); - model.Name = NameTextEdit.Text; - model.TagName = TagNameTextEdit.Text; - model.Description = DescriptionTextEdit.Text; - if (await this.ReloadDataEvent.Invoke(model, this.textEditParentList.EditValue)) + _assetsExchangerSeries.Name = NameTextEdit.Text; + _assetsExchangerSeries.TagName = TagNameTextEdit.Text; + _assetsExchangerSeries.Description = DescriptionTextEdit.Text; + if (this.TextEditCatalogChoice.EditValue != null) + { + _assetsExchangerSeries.CatalogID = (long)this.TextEditCatalogChoice.EditValue; + } + if (await this.ReloadDataEvent.Invoke(_assetsExchangerSeries, this.textEditParentList.EditValue)) { TipFormHelper.ShowSucceed("娣诲姞鎴愬姛!"); } diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/01-series/EditAssetsExchangerSeriesDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/01-series/EditAssetsExchangerSeriesDlg.cs index 2bddf7f..6340e96 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/01-series/EditAssetsExchangerSeriesDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/01-series/EditAssetsExchangerSeriesDlg.cs @@ -1,4 +1,5 @@ 锘縰sing DevExpress.XtraEditors.Controls; +using HStation.Vmo; namespace HStation.WinFrmUI.Assets { @@ -62,6 +63,10 @@ _assetsExchangerSeries.Name = NameTextEdit.Text; _assetsExchangerSeries.TagName = TagNameTextEdit.Text; _assetsExchangerSeries.Description = DescriptionTextEdit.Text; + if (this.TextEditCatalogChoice.EditValue != null) + { + _assetsExchangerSeries.CatalogID = (long)this.TextEditCatalogChoice.EditValue; + } if (await this.ReloadDataEvent.Invoke(_assetsExchangerSeries, this.textEditParentList.EditValue)) { TipFormHelper.ShowSucceed("淇敼鎴愬姛!"); diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/01-series/ExchangerTreeListCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/01-series/ExchangerTreeListCtrl.cs index 42d0cd1..df7711d 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/01-series/ExchangerTreeListCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/01-series/ExchangerTreeListCtrl.cs @@ -51,6 +51,7 @@ private void BtnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var dlg = new AddAssetsExchangerSeriesDlg(); + dlg.SetBindingData(); dlg.ReloadDataEvent += async (rhs, currentId) => { if (currentId != null) diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/04-chart-edit/ExchangerPerform2dEditChart.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/04-chart-edit/ExchangerPerform2dEditChart.cs index b1f786a..5e833c1 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/04-chart-edit/ExchangerPerform2dEditChart.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/04-chart-edit/ExchangerPerform2dEditChart.cs @@ -336,7 +336,7 @@ { if (hitInfo.InSeriesPoint) { - //if ((int)hitInfo.Series.Tag != (int)_edit_curve_type) + //if ((int)hitInfo.Series.TagName != (int)_edit_curve_type) //{ // _pickPoint = null; // return; diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditExchangerPartPropDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditPackagePartPropDlg.Designer.cs similarity index 81% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditExchangerPartPropDlg.Designer.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditPackagePartPropDlg.Designer.cs index 38e98cf..7a1a1ef 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditExchangerPartPropDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditPackagePartPropDlg.Designer.cs @@ -1,4 +1,4 @@ -锘縩amespace HStation.WinFrmUI.Assets +锘縩amespace HStation.WinFrmUI { partial class EditExchangerPartPropDlg @@ -31,12 +31,11 @@ { components = new System.ComponentModel.Container(); layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); - ExchangerProductListBox1 = new Assets.ExchangerProductListBox(); - BtnAddPumpPart = new DevExpress.XtraEditors.SimpleButton(); + exchangerProductListBox1 = new Assets.ExchangerProductListBox(); + BtnAddExchangerPart = new DevExpress.XtraEditors.SimpleButton(); BtnOk = new DevExpress.XtraEditors.SimpleButton(); simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); gridControl1 = new DevExpress.XtraGrid.GridControl(); - propGroupChoiceViewModelBindingSource = new BindingSource(components); gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); colPropGroupName = new DevExpress.XtraGrid.Columns.GridColumn(); colPropName = new DevExpress.XtraGrid.Columns.GridColumn(); @@ -49,27 +48,29 @@ r = new DevExpress.XtraLayout.EmptySpaceItem(); layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControAddPart = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); tabbedControlGroup1 = new DevExpress.XtraLayout.TabbedControlGroup(); layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); barManager1 = new DevExpress.XtraBars.BarManager(components); barDockControlTop = new DevExpress.XtraBars.BarDockControl(); barDockControlBottom = new DevExpress.XtraBars.BarDockControl(); barDockControlLeft = new DevExpress.XtraBars.BarDockControl(); barDockControlRight = new DevExpress.XtraBars.BarDockControl(); - popupPumpPartMenu = new DevExpress.XtraBars.PopupMenu(components); + popupExchangerPartMenu = new DevExpress.XtraBars.PopupMenu(components); dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + propGroupChoiceViewModelBindingSource = new BindingSource(components); + colTagName = new DevExpress.XtraGrid.Columns.GridColumn(); ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)gridControl1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)propGroupChoiceViewModelBindingSource).BeginInit(); ((System.ComponentModel.ISupportInitialize)gridView1).BeginInit(); ((System.ComponentModel.ISupportInitialize)TextEditProductName.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)TextEditProductCode.Properties).BeginInit(); @@ -79,25 +80,27 @@ ((System.ComponentModel.ISupportInitialize)r).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControAddPart).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); ((System.ComponentModel.ISupportInitialize)tabbedControlGroup1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup2).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); ((System.ComponentModel.ISupportInitialize)barManager1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)popupPumpPartMenu).BeginInit(); + ((System.ComponentModel.ISupportInitialize)popupExchangerPartMenu).BeginInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)propGroupChoiceViewModelBindingSource).BeginInit(); SuspendLayout(); // // layoutControl1 // - layoutControl1.Controls.Add(ExchangerProductListBox1); - layoutControl1.Controls.Add(BtnAddPumpPart); + layoutControl1.Controls.Add(exchangerProductListBox1); + layoutControl1.Controls.Add(BtnAddExchangerPart); layoutControl1.Controls.Add(BtnOk); layoutControl1.Controls.Add(simpleButton1); layoutControl1.Controls.Add(gridControl1); @@ -113,24 +116,24 @@ layoutControl1.TabIndex = 0; layoutControl1.Text = "layoutControl1"; // - // ExchangerProductListBox1 + // exchangerProductListBox1 // - ExchangerProductListBox1.Location = new Point(12, 12); - ExchangerProductListBox1.Name = "ExchangerProductListBox1"; - ExchangerProductListBox1.Size = new Size(163, 512); - ExchangerProductListBox1.TabIndex = 0; + exchangerProductListBox1.Location = new Point(12, 12); + exchangerProductListBox1.Name = "exchangerProductListBox1"; + exchangerProductListBox1.Size = new Size(156, 512); + exchangerProductListBox1.TabIndex = 11; // - // BtnAddPumpPart + // BtnAddExchangerPart // - BtnAddPumpPart.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; - BtnAddPumpPart.Appearance.Options.UseBackColor = true; - BtnAddPumpPart.Location = new Point(713, 502); - BtnAddPumpPart.Name = "BtnAddPumpPart"; - BtnAddPumpPart.Size = new Size(85, 22); - BtnAddPumpPart.StyleController = layoutControl1; - BtnAddPumpPart.TabIndex = 7; - BtnAddPumpPart.Text = "娣诲姞灞炴��"; - // BtnAddPumpPart.Click += BtnAddPumpPart_Click; + BtnAddExchangerPart.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; + BtnAddExchangerPart.Appearance.Options.UseBackColor = true; + BtnAddExchangerPart.Location = new Point(713, 502); + BtnAddExchangerPart.Name = "BtnAddExchangerPart"; + BtnAddExchangerPart.Size = new Size(85, 22); + BtnAddExchangerPart.StyleController = layoutControl1; + BtnAddExchangerPart.TabIndex = 8; + BtnAddExchangerPart.Text = "娣诲姞灞炴��"; + BtnAddExchangerPart.Click += BtnAddExchangerPart_Click; // // BtnOk // @@ -140,7 +143,7 @@ BtnOk.Name = "BtnOk"; BtnOk.Size = new Size(91, 22); BtnOk.StyleController = layoutControl1; - BtnOk.TabIndex = 8; + BtnOk.TabIndex = 9; BtnOk.Text = "纭缂栬緫"; BtnOk.Click += BtnOk_Click; // @@ -153,28 +156,24 @@ simpleButton1.Name = "simpleButton1"; simpleButton1.Size = new Size(92, 22); simpleButton1.StyleController = layoutControl1; - simpleButton1.TabIndex = 9; + simpleButton1.TabIndex = 10; simpleButton1.Text = "鍙栨秷"; // // gridControl1 // gridControl1.DataSource = propGroupChoiceViewModelBindingSource; - gridControl1.Location = new Point(184, 113); + gridControl1.Location = new Point(177, 137); gridControl1.MainView = gridView1; gridControl1.Name = "gridControl1"; - gridControl1.Size = new Size(800, 380); - gridControl1.TabIndex = 6; + gridControl1.Size = new Size(807, 356); + gridControl1.TabIndex = 7; gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); - // - // propGroupChoiceViewModelBindingSource - // - propGroupChoiceViewModelBindingSource.DataSource = typeof(Xhs.PumpProduct.PropGroupChoiceViewModel); // // gridView1 // gridView1.Appearance.HeaderPanel.Options.UseTextOptions = true; gridView1.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; - gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colPropGroupName, colPropName, colValue }); + gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colPropGroupName, colPropName, colValue, colTagName }); gridView1.GridControl = gridControl1; gridView1.Name = "gridView1"; gridView1.OptionsView.AllowCellMerge = true; @@ -214,25 +213,25 @@ // // TextEditProductName // - TextEditProductName.Location = new Point(248, 41); + TextEditProductName.Location = new Point(241, 41); TextEditProductName.Name = "TextEditProductName"; - TextEditProductName.Size = new Size(736, 20); + TextEditProductName.Size = new Size(743, 20); TextEditProductName.StyleController = layoutControl1; TextEditProductName.TabIndex = 3; // // TextEditProductCode // - TextEditProductCode.Location = new Point(248, 65); + TextEditProductCode.Location = new Point(241, 65); TextEditProductCode.Name = "TextEditProductCode"; - TextEditProductCode.Size = new Size(736, 20); + TextEditProductCode.Size = new Size(743, 20); TextEditProductCode.StyleController = layoutControl1; TextEditProductCode.TabIndex = 4; // // TextEditNo // - TextEditNo.Location = new Point(248, 89); + TextEditNo.Location = new Point(241, 89); TextEditNo.Name = "TextEditNo"; - TextEditNo.Size = new Size(736, 20); + TextEditNo.Size = new Size(743, 20); TextEditNo.StyleController = layoutControl1; TextEditNo.TabIndex = 5; // @@ -240,7 +239,7 @@ // Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; - Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem3, r, layoutControlItem2, layoutControAddPart, layoutControlItem8, tabbedControlGroup1 }); + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem3, r, layoutControlItem2, layoutControAddPart, tabbedControlGroup1, layoutControlItem4 }); Root.Name = "Root"; Root.Size = new Size(1001, 536); Root.TextVisible = false; @@ -260,9 +259,9 @@ // r // r.AllowHotTrack = false; - r.Location = new Point(167, 490); + r.Location = new Point(160, 490); r.Name = "r"; - r.Size = new Size(534, 26); + r.Size = new Size(541, 26); r.TextSize = new Size(0, 0); // // layoutControlItem2 @@ -279,7 +278,7 @@ // // layoutControAddPart // - layoutControAddPart.Control = BtnAddPumpPart; + layoutControAddPart.Control = BtnAddExchangerPart; layoutControAddPart.Location = new Point(701, 490); layoutControAddPart.MaxSize = new Size(89, 26); layoutControAddPart.MinSize = new Size(89, 26); @@ -289,31 +288,22 @@ layoutControAddPart.TextSize = new Size(0, 0); layoutControAddPart.TextVisible = false; // - // layoutControlItem8 - // - layoutControlItem8.Control = ExchangerProductListBox1; - layoutControlItem8.Location = new Point(0, 0); - layoutControlItem8.Name = "layoutControlItem8"; - layoutControlItem8.Size = new Size(167, 516); - layoutControlItem8.TextSize = new Size(0, 0); - layoutControlItem8.TextVisible = false; - // // tabbedControlGroup1 // - tabbedControlGroup1.Location = new Point(167, 0); + tabbedControlGroup1.Location = new Point(160, 0); tabbedControlGroup1.Name = "tabbedControlGroup1"; tabbedControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 2, 2); tabbedControlGroup1.SelectedTabPage = layoutControlGroup1; - tabbedControlGroup1.Size = new Size(814, 490); + tabbedControlGroup1.Size = new Size(821, 490); tabbedControlGroup1.TabPages.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup1, layoutControlGroup2, layoutControlGroup3, layoutControlGroup4 }); tabbedControlGroup1.Text = "瀹夎鍥�"; // // layoutControlGroup1 // - layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5, layoutControlItem6, layoutControlItem7, layoutControlItem1 }); + layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5, layoutControlItem6, layoutControlItem7, layoutControlItem1, emptySpaceItem1 }); layoutControlGroup1.Location = new Point(0, 0); layoutControlGroup1.Name = "layoutControlGroup1"; - layoutControlGroup1.Size = new Size(804, 456); + layoutControlGroup1.Size = new Size(811, 456); layoutControlGroup1.Text = "浜у搧灞炴��"; // // layoutControlItem5 @@ -321,7 +311,7 @@ layoutControlItem5.Control = TextEditProductName; layoutControlItem5.Location = new Point(0, 0); layoutControlItem5.Name = "layoutControlItem5"; - layoutControlItem5.Size = new Size(804, 24); + layoutControlItem5.Size = new Size(811, 24); layoutControlItem5.Text = "浜у搧鍚嶇О:"; layoutControlItem5.TextSize = new Size(52, 14); // @@ -330,7 +320,7 @@ layoutControlItem6.Control = TextEditProductCode; layoutControlItem6.Location = new Point(0, 24); layoutControlItem6.Name = "layoutControlItem6"; - layoutControlItem6.Size = new Size(804, 24); + layoutControlItem6.Size = new Size(811, 24); layoutControlItem6.Text = "浜у搧鍥惧彿:"; layoutControlItem6.TextSize = new Size(52, 14); // @@ -339,39 +329,56 @@ layoutControlItem7.Control = TextEditNo; layoutControlItem7.Location = new Point(0, 48); layoutControlItem7.Name = "layoutControlItem7"; - layoutControlItem7.Size = new Size(804, 24); + layoutControlItem7.Size = new Size(811, 24); layoutControlItem7.Text = "浜у搧缂栧彿:"; layoutControlItem7.TextSize = new Size(52, 14); // // layoutControlItem1 // layoutControlItem1.Control = gridControl1; - layoutControlItem1.Location = new Point(0, 72); + layoutControlItem1.Location = new Point(0, 96); layoutControlItem1.Name = "layoutControlItem1"; - layoutControlItem1.Size = new Size(804, 384); + layoutControlItem1.Size = new Size(811, 360); layoutControlItem1.TextSize = new Size(0, 0); layoutControlItem1.TextVisible = false; + // + // emptySpaceItem1 + // + emptySpaceItem1.AllowHotTrack = false; + emptySpaceItem1.Location = new Point(0, 72); + emptySpaceItem1.Name = "emptySpaceItem1"; + emptySpaceItem1.Size = new Size(811, 24); + emptySpaceItem1.TextSize = new Size(0, 0); // // layoutControlGroup2 // layoutControlGroup2.Location = new Point(0, 0); layoutControlGroup2.Name = "layoutControlGroup2"; - layoutControlGroup2.Size = new Size(804, 456); + layoutControlGroup2.Size = new Size(811, 456); layoutControlGroup2.Text = "瀹夎鍥�"; // // layoutControlGroup3 // layoutControlGroup3.Location = new Point(0, 0); layoutControlGroup3.Name = "layoutControlGroup3"; - layoutControlGroup3.Size = new Size(804, 456); + layoutControlGroup3.Size = new Size(811, 456); layoutControlGroup3.Text = "缁撴瀯鍥�"; // // layoutControlGroup4 // layoutControlGroup4.Location = new Point(0, 0); layoutControlGroup4.Name = "layoutControlGroup4"; - layoutControlGroup4.Size = new Size(804, 456); + layoutControlGroup4.Size = new Size(811, 456); layoutControlGroup4.Text = "灏哄鍥�"; + // + // layoutControlItem4 + // + layoutControlItem4.Control = exchangerProductListBox1; + layoutControlItem4.Location = new Point(0, 0); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(160, 516); + layoutControlItem4.TextSize = new Size(0, 0); + layoutControlItem4.TextVisible = false; // // barManager1 // @@ -413,16 +420,32 @@ barDockControlRight.Manager = barManager1; barDockControlRight.Size = new Size(0, 536); // - // popupPumpPartMenu + // popupExchangerPartMenu // - popupPumpPartMenu.Manager = barManager1; - popupPumpPartMenu.Name = "popupPumpPartMenu"; + popupExchangerPartMenu.Manager = barManager1; + popupExchangerPartMenu.Name = "popupExchangerPartMenu"; // // dxErrorProvider1 // dxErrorProvider1.ContainerControl = this; // - // EditPumpPartPropDlg + // propGroupChoiceViewModelBindingSource + // + propGroupChoiceViewModelBindingSource.DataSource = typeof(Assets.ExchangerPropChoiceViewModel); + // + // colTagName + // + colTagName.AppearanceCell.Options.UseTextOptions = true; + colTagName.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colTagName.Caption = "鏍囩"; + colTagName.FieldName = "TagName"; + colTagName.Name = "colTagName"; + colTagName.OptionsColumn.AllowEdit = false; + colTagName.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + colTagName.Visible = true; + colTagName.VisibleIndex = 3; + // + // EditExchangerPartPropDlg // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; @@ -432,13 +455,12 @@ Controls.Add(barDockControlRight); Controls.Add(barDockControlBottom); Controls.Add(barDockControlTop); - Name = "EditPumpPartPropDlg"; + Name = "EditExchangerPartPropDlg"; StartPosition = FormStartPosition.CenterScreen; Text = "缂栬緫灞炴��"; ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)gridControl1).EndInit(); - ((System.ComponentModel.ISupportInitialize)propGroupChoiceViewModelBindingSource).EndInit(); ((System.ComponentModel.ISupportInitialize)gridView1).EndInit(); ((System.ComponentModel.ISupportInitialize)TextEditProductName.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)TextEditProductCode.Properties).EndInit(); @@ -448,19 +470,21 @@ ((System.ComponentModel.ISupportInitialize)r).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControAddPart).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); ((System.ComponentModel.ISupportInitialize)tabbedControlGroup1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup2).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); ((System.ComponentModel.ISupportInitialize)barManager1).EndInit(); - ((System.ComponentModel.ISupportInitialize)popupPumpPartMenu).EndInit(); + ((System.ComponentModel.ISupportInitialize)popupExchangerPartMenu).EndInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); + ((System.ComponentModel.ISupportInitialize)propGroupChoiceViewModelBindingSource).EndInit(); ResumeLayout(false); PerformLayout(); } @@ -487,17 +511,14 @@ private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; private DevExpress.XtraLayout.EmptySpaceItem r; - private BindingSource propGroupChoiceViewModelBindingSource; - private DevExpress.XtraBars.PopupMenu popupPumpPartMenu; - private DevExpress.XtraEditors.SimpleButton BtnAddPumpPart; + private DevExpress.XtraBars.PopupMenu popupExchangerPartMenu; + private DevExpress.XtraEditors.SimpleButton BtnAddExchangerPart; private DevExpress.XtraLayout.LayoutControlItem layoutControAddPart; private DevExpress.XtraBars.BarManager barManager1; private DevExpress.XtraBars.BarDockControl barDockControlTop; private DevExpress.XtraBars.BarDockControl barDockControlBottom; private DevExpress.XtraBars.BarDockControl barDockControlLeft; private DevExpress.XtraBars.BarDockControl barDockControlRight; - private Assets.ExchangerProductListBox ExchangerProductListBox1; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; private DevExpress.XtraLayout.TabbedControlGroup tabbedControlGroup1; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; @@ -508,5 +529,10 @@ private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private Assets.ExchangerProductListBox exchangerProductListBox1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private BindingSource propGroupChoiceViewModelBindingSource; + private DevExpress.XtraGrid.Columns.GridColumn colTagName; } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditExchangerPartPropDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditPackagePartPropDlg.cs similarity index 60% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditExchangerPartPropDlg.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditPackagePartPropDlg.cs index f5788b9..30f8f3c 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditExchangerPartPropDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditPackagePartPropDlg.cs @@ -1,4 +1,6 @@ -锘縩amespace HStation.WinFrmUI.Assets +锘縰sing HStation.WinFrmUI.Assets; + +namespace HStation.WinFrmUI { public partial class EditExchangerPartPropDlg : DevExpress.XtraEditors.XtraForm { @@ -7,55 +9,66 @@ InitializeComponent(); this.gridView1.Columns["PropGroupName"].Group(); this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; - this.ExchangerProductListBox1.MouseUp += ExchangerProductListBox1_MouseUp; + this.exchangerProductListBox1.MouseUp += exchangerProductListBox1_MouseUp; } - private BLL.AssetsExchangerPartMain _bll = null; - private List<PropGroupChoiceViewModel> _proplist = null; + #region Private - private List<CurrentPartMainViewModel> _allBindingList = new List<CurrentPartMainViewModel>(); + private BLL.AssetsExchangerPartMain _bll; + private List<HStation.WinFrmUI.Assets.ExchangerPropChoiceViewModel> _propList; - private Vmo.AssetsExchangerMainAndPartMapVmo _partmap = null; + private Vmo.AssetsExchangerMainAndPartMappingVmo _partMapping; - private Vmo.AssetsExchangerPartMainVmo _ExchangerPart = null; + private Vmo.AssetsExchangerMainVmo _ExchangerMain; + + private Vmo.AssetsExchangerPartMainVmo _ExchangerPart; private long _catalogID; //鍒嗙被ID - private long _seriesID; //绯诲垪ID + private Vmo.AssetsExchangerSeriesVmo _series; //绯诲垪ID - private List<Vmo.AssetsExchangerPropContentVmo> _allPropList = null; + private List<Vmo.AssetsExchangerPropContentVmo> _allPropList; + + private Yw.BLL.SysPropMapping _sysPropMapping; + + #endregion Private //鍥炶皟浜嬩欢 - public event Func<Vmo.AssetsExchangerPartMainVmo, List<Vmo.AssetsExchangerPropContentVmo>, Vmo.AssetsExchangerMainAndPartMapVmo, Task<bool>> ReloadEvent; + public event Func<Vmo.AssetsExchangerPartMainVmo, List<Vmo.AssetsExchangerPropContentVmo>, Vmo.AssetsExchangerMainAndPartMappingVmo, Task<bool>> ReloadEvent; //鏁版嵁缁戝畾 public async void SetBindingData(Vmo.AssetsExchangerMainVmo AssetsExchangerMain) { - this.ExchangerProductListBox1.SetBindingData(AssetsExchangerMain); - this.ExchangerProductListBox1.SelectReloadEvent += () => + this.exchangerProductListBox1.SetBindingData(AssetsExchangerMain); + _ExchangerMain = AssetsExchangerMain; + this.exchangerProductListBox1.SelectReloadEvent += () => { ListBoxPart_SelectedIndexChanged(); }; - this.ExchangerProductListBox1.AddReloadEvent += () => + this.exchangerProductListBox1.AddReloadEvent += () => { BarBtnAddExchangerPart_ItemClick(); }; + this.exchangerProductListBox1.DeleteReloadEvent += () => + { + BarBtnDeletePart_ItemClick(); + }; _bll = new BLL.AssetsExchangerPartMain(); var allpartlist = await _bll.GetByExchangerMainID(AssetsExchangerMain.ID); //鑾峰彇鎵�鏈変骇鍝� - /* var series = await new BLL.AssetsExchangerSeries().GetByID(AssetsExchangerMain.ExchangerSeriesID); //鑾峰彇绯诲垪 - _ExchangerPart = new Vmo.AssetsExchangerPartMainVmo(); - _series = series.ID; - _ExchangerPart.SeriesID = _series; - _catalogID = series.CatalogID; - _propList = new List<PropGroupChoiceViewModel>(); - _partMapping = new Vmo.AssetsExchangerMainAndPartMapVmo(); - _partMapping.ExchangerID = AssetsExchangerMain.ID; - _partMapping.SeriesID = _series;*/ - this.propGroupChoiceViewModelBindingSource.DataSource = _proplist; + var series = await new BLL.AssetsExchangerSeries().GetByID(AssetsExchangerMain.SeriesID); //鑾峰彇绯诲垪 + _ExchangerPart = new Vmo.AssetsExchangerPartMainVmo(); + _series = series; + _ExchangerPart.SeriesID = _series.ID; + _catalogID = _series.CatalogID; + _propList = new List<HStation.WinFrmUI.Assets.ExchangerPropChoiceViewModel>(); + _partMapping = new Vmo.AssetsExchangerMainAndPartMappingVmo(); + _partMapping.MainID = AssetsExchangerMain.ID; + _partMapping.SeriesID = _series.ID; + this.propGroupChoiceViewModelBindingSource.DataSource = _propList; this.propGroupChoiceViewModelBindingSource.ResetBindings(false); } - //鍒嗙被閫夋嫨鍙樻崲 + //閫夋嫨鍙樻崲 private async void SetPropSelectedValue(ExchangerPartViewModel partmain) { layoutControAddPart.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; @@ -64,7 +77,7 @@ this.TextEditNo.Text = partmain.NO.Trim(); this.TextEditProductCode.Text = partmain.Code.Trim(); this.TextEditProductName.Text = partmain.Name.Trim(); - _proplist.Clear(); + _propList.Clear(); var bll = new Yw.BLL.SysPropStruct(); var catlog = await bll.GetByCatalogID(_catalogID); if (catlog == null) @@ -72,20 +85,25 @@ this.propGroupChoiceViewModelBindingSource.ResetBindings(false); return; } - _proplist.Clear(); + _propList.Clear(); foreach (var item in catlog) { foreach (var prop in item.PropList) { - _proplist.Add(new PropGroupChoiceViewModel() { PropGroupName = item.Name, PropName = prop.Name, ID = prop.ID }); + _propList.Add(new ExchangerPropChoiceViewModel() + { + PropGroupName = item.Name, + PropName = prop.Name, + ID = prop.ID, + TagName = prop.Code + }); } } var propbll = new BLL.AssetsExchangerPartPropContent(); - var alllist = await propbll.GetByExchangerPartID(model.ID); - _allPropList = alllist; - foreach (var item in alllist) + _allPropList = await propbll.GetByExchangerPartID(model.ID); + foreach (var item in _allPropList) { - var selectProp = _proplist.Find(x => x.ID == item.PropID); + var selectProp = _propList.Find(x => x.ID == item.PropID); if (selectProp != null) { selectProp.Value = item.PropValue; @@ -98,7 +116,7 @@ //浜у搧鍒楄〃鑱氱劍鏀瑰彉 private void ListBoxPart_SelectedIndexChanged() { - var vm = this.ExchangerProductListBox1.GetCurrentVm(); + var vm = this.exchangerProductListBox1.GetCurrentVm(); if (vm == null) return; SetPropSelectedValue(vm); @@ -107,7 +125,7 @@ //纭缂栬緫 private async void BtnOk_Click(object sender, EventArgs e) { - var vm = this.ExchangerProductListBox1.GetCurrentVm(); + var vm = this.exchangerProductListBox1.GetCurrentVm(); if (vm == null) return; var updatepart = new Vmo.AssetsExchangerPartMainVmo(); @@ -115,9 +133,8 @@ updatepart.Name = TextEditProductName.Text; updatepart.NO = TextEditNo.Text; updatepart.Code = TextEditProductCode.Text; - updatepart.SeriesID = _seriesID; - var updateproplist = new List<UpdateAssetsExchangerPropContentInput>(); - foreach (var item in _proplist) + updatepart.SeriesID = _series.ID; + foreach (var item in _propList) { if (_allPropList != null) { @@ -130,14 +147,23 @@ } else { - _allPropList.Add(new Vmo.AssetsExchangerPropContentVmo() { SeriesID = _allPropList.First().SeriesID, PartID = _allPropList.First().PartID, PropID = item.ID, PropValue = item.Value }); + _allPropList.Add(new Vmo.AssetsExchangerPropContentVmo() + { + SeriesID = _allPropList.First().SeriesID, + PartID = _allPropList.First().PartID, + PropID = item.ID, + PropValue = item.Value, + TagName = item.TagName + }); } } } + var ExchangerMainBll = new BLL.AssetsExchangerMain(); + await ExchangerMainBll.Update(_ExchangerMain); if (await _bll.UpdateEx(updatepart, _allPropList)) { vm.Reset(updatepart); - this.ExchangerProductListBox1.Refresh(); + this.exchangerProductListBox1.Refresh(); TipFormHelper.ShowSucceed("淇敼鎴愬姛!"); } else @@ -149,15 +175,16 @@ } //宸︿晶鏍戝彸鍑昏彍鍗曚簨浠� - private void ExchangerProductListBox1_MouseUp(object sender, MouseEventArgs e) + private void exchangerProductListBox1_MouseUp(object sender, MouseEventArgs e) { - /* if (e.Button == MouseButtons.Right) - { - Point screenPoint = Cursor.Position; - popupExchangerPartMenu.ShowPopup(screenPoint); - }*/ + if (e.Button == MouseButtons.Right) + { + Point screenPoint = Cursor.Position; + popupExchangerPartMenu.ShowPopup(screenPoint); + } } + //鏁版嵁楠岃瘉 private bool Vaild() { this.dxErrorProvider1.ClearErrors(); @@ -178,16 +205,22 @@ _ExchangerPart.NO = TextEditNo.Text; _ExchangerPart.Code = TextEditProductCode.Text; var AssetsExchangerPropContent = new List<Vmo.AssetsExchangerPropContentVmo>(); - foreach (var item in _proplist) + foreach (var item in _propList) { - AssetsExchangerPropContent.Add(new Vmo.AssetsExchangerPropContentVmo { PropID = item.ID, PropValue = item.Value, SeriesID = _ExchangerPart.SeriesID }); + AssetsExchangerPropContent.Add(new Vmo.AssetsExchangerPropContentVmo + { + PropID = item.ID, + PropValue = item.Value, + SeriesID = _ExchangerPart.SeriesID, + TagName = item.TagName + }); } - var id = await _bll.InsertEx(_ExchangerPart, AssetsExchangerPropContent, _partmap); + var id = await _bll.InsertEx(_ExchangerPart, AssetsExchangerPropContent, _partMapping); if (id > 0) { var Exchangerpart = await _bll.GetByID(id); - this.ExchangerProductListBox1._allBindingList.Add(new ExchangerPartViewModel(Exchangerpart)); - this.ExchangerProductListBox1.Refresh(); + this.exchangerProductListBox1._allBindingList.Add(new ExchangerPartViewModel(Exchangerpart)); + this.exchangerProductListBox1.Refresh(); TipFormHelper.ShowSucceed("娣诲姞鎴愬姛!"); } else @@ -204,9 +237,9 @@ private async void BarBtnAddExchangerPart_ItemClick() { layoutControAddPart.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always; - TextEditProductName.Text = string.Empty; - TextEditNo.Text = string.Empty; - TextEditProductCode.Text = string.Empty; + this.TextEditProductName.Text = string.Empty; + this.TextEditNo.Text = string.Empty; + this.TextEditProductCode.Text = string.Empty; var bll = new Yw.BLL.SysPropStruct(); try { @@ -216,12 +249,19 @@ this.propGroupChoiceViewModelBindingSource.ResetBindings(false); return; } - _proplist.Clear(); + _propList.Clear(); foreach (var item in catlog) { foreach (var prop in item.PropList) { - _proplist.Add(new PropGroupChoiceViewModel() { PropGroupName = item.Name, PropName = prop.Name, ID = prop.ID, Value = prop.DefaultValue }); + _propList.Add(new ExchangerPropChoiceViewModel() + { + PropGroupName = item.Name, + PropName = prop.Name, + ID = prop.ID, + Value = prop.DefaultValue, + TagName = prop.Code + }); } } this.propGroupChoiceViewModelBindingSource.ResetBindings(false); @@ -233,23 +273,27 @@ // 灏濊瘯鏀瑰彉鐒︾偣浠ヨЕ鍙戞帶浠舵洿鏂� this.TextEditProductName.Focus(); // this.TextEditProductName.SelectAll(); - this.TextEditNo.Properties.NullText = "鍦ㄦ杈撳叆浜у搧缂栧彿"; this.TextEditProductCode.Properties.NullText = "鍦ㄦ杈撳叆浜у搧鍥惧彿"; } // 鍒犻櫎浜у搧 - private async void BarBtnDeletePart_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + private async void BarBtnDeletePart_ItemClick() { - var vm = this.ExchangerProductListBox1.GetCurrentVm(); + var vm = this.exchangerProductListBox1.GetCurrentVm(); if (vm == null) return; if (!MessageBoxHelper.IsClickOk("纭畾鍒犻櫎鏁版嵁琛�")) { if (await _bll.DeleteEx(vm.ID)) { - this.ExchangerProductListBox1._allBindingList.Remove(vm); - this.ExchangerProductListBox1.Refresh(); + this.exchangerProductListBox1._allBindingList.Remove(vm); + this.exchangerProductListBox1.Refresh(); + this._propList.Clear(); + this.propGroupChoiceViewModelBindingSource.ResetBindings(false); + this.TextEditProductName.Text = string.Empty; + this.TextEditNo.Text = string.Empty; + this.TextEditProductCode.Text = string.Empty; MessageBoxHelper.ShowSuccess("鍒犻櫎鎴愬姛!"); } else diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditExchangerPartPropDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditPackagePartPropDlg.resx similarity index 95% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditExchangerPartPropDlg.resx rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditPackagePartPropDlg.resx index ba25433..cfc1f7d 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditExchangerPartPropDlg.resx +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditPackagePartPropDlg.resx @@ -118,15 +118,15 @@ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <metadata name="propGroupChoiceViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> + <value>826, 17</value> </metadata> <metadata name="barManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>509, 17</value> + <value>536, 17</value> </metadata> - <metadata name="popupPumpPartMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>326, 17</value> + <metadata name="popupExchangerPartMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> </metadata> <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>644, 17</value> + <value>671, 17</value> </metadata> </root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/ExchangerPartViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/ExchangerPartViewModel.cs index 22bbf63..77848d0 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/ExchangerPartViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/ExchangerPartViewModel.cs @@ -32,7 +32,7 @@ public long ID { get; set; } /// <summary> - /// 娉佃澶嘔D + /// 璁惧ID /// </summary> public long PartID { get; set; } diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/ExchangerProductListBox.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/ExchangerProductListBox.cs index 74c9d6e..a6b3b40 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/ExchangerProductListBox.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/ExchangerProductListBox.cs @@ -17,25 +17,27 @@ public async void SetBindingData(Vmo.AssetsExchangerMainVmo AssetsExchangerMain) { - /*_allBindingList = new List<CurrentPartMainViewModel>(); + _allBindingList = new List<ExchangerPartViewModel>(); _Bll = new BLL.AssetsExchangerPartMain(); var allpartlist = await _Bll.GetByExchangerMainID(AssetsExchangerMain.ID); //鑾峰彇鎵�鏈変骇鍝� - var series = await new BLL.AssetsExchangerSeries().GetByID(AssetsExchangerMain.ExchangerSeriesID); //鑾峰彇绯诲垪 + var series = await new BLL.AssetsExchangerSeries().GetByID(AssetsExchangerMain.SeriesID); //鑾峰彇绯诲垪 if (allpartlist != null) { foreach (var item in allpartlist) { - var model = new CurrentPartMainViewModel(item); + var model = new ExchangerPartViewModel(item); _allBindingList.Add(model); } } this.listBoxControl1.DataSource = _allBindingList; - this.listBoxControl1.Refresh();*/ + this.listBoxControl1.Refresh(); } public event Action AddReloadEvent = null; public event Action SelectReloadEvent = null; + + public event Action DeleteReloadEvent = null; private void BtnAddProductProp_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { @@ -60,7 +62,8 @@ //鍒犻櫎灞炴�� private async void barBtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { - var vm = this.listBoxControl1.GetCurrentViewModel(_allBindingList); + DeleteReloadEvent.Invoke(); + /*var vm = this.listBoxControl1.GetCurrentViewModel(_allBindingList); if (vm == null) { TipFormHelper.ShowWarn("璇烽�夋嫨鏁版嵁琛�!"); @@ -77,7 +80,7 @@ else { TipFormHelper.ShowError("鍒犻櫎澶辫触!"); - } + }*/ } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/PropGroupChoiceViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/ExchangerPropChoiceViewModel.cs similarity index 71% copy from WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/PropGroupChoiceViewModel.cs copy to WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/ExchangerPropChoiceViewModel.cs index 09d7b5f..50a529e 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/PropGroupChoiceViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/ExchangerPropChoiceViewModel.cs @@ -1,10 +1,11 @@ 锘縩amespace HStation.WinFrmUI.Assets { - public class PropGroupChoiceViewModel + public class ExchangerPropChoiceViewModel { public long ID { get; set; } public string PropGroupName { get; set; } public string PropName { get; set; } public string Value { get; set; } + public string TagName { get; set; } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/01-series/AddAssetsCompressorSeriesDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/01-series/AddAssetsCompressorSeriesDlg.Designer.cs index af2eb0b..be9ac5f 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/01-series/AddAssetsCompressorSeriesDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/01-series/AddAssetsCompressorSeriesDlg.Designer.cs @@ -47,6 +47,8 @@ layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + TextEditCatalogChoice = new DevExpress.XtraEditors.ImageComboBoxEdit(); + layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)textEditParentList.Properties).BeginInit(); @@ -63,10 +65,13 @@ ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TextEditCatalogChoice.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); SuspendLayout(); // // layoutControl1 // + layoutControl1.Controls.Add(TextEditCatalogChoice); layoutControl1.Controls.Add(textEditParentList); layoutControl1.Controls.Add(BtnOk); layoutControl1.Controls.Add(btnCancel); @@ -154,9 +159,9 @@ // // DescriptionTextEdit // - DescriptionTextEdit.Location = new Point(55, 80); + DescriptionTextEdit.Location = new Point(55, 104); DescriptionTextEdit.Name = "DescriptionTextEdit"; - DescriptionTextEdit.Size = new Size(448, 161); + DescriptionTextEdit.Size = new Size(448, 137); DescriptionTextEdit.StyleController = layoutControl1; DescriptionTextEdit.TabIndex = 4; // @@ -166,7 +171,7 @@ Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; - Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem3, layoutControlItem5, layoutControlItem1, layoutControlItem6, emptySpaceItem1, layoutControlItem4, layoutControlItem2 }); + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem3, layoutControlItem5, layoutControlItem1, layoutControlItem6, emptySpaceItem1, layoutControlItem4, layoutControlItem2, layoutControlItem7 }); Root.Name = "Root"; Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); Root.Size = new Size(511, 275); @@ -184,9 +189,9 @@ // layoutControlItem5 // layoutControlItem5.Control = DescriptionTextEdit; - layoutControlItem5.Location = new Point(0, 72); + layoutControlItem5.Location = new Point(0, 96); layoutControlItem5.Name = "layoutControlItem5"; - layoutControlItem5.Size = new Size(499, 165); + layoutControlItem5.Size = new Size(499, 141); layoutControlItem5.Text = "璇存槑:"; layoutControlItem5.TextSize = new Size(35, 14); // @@ -239,6 +244,24 @@ // dxErrorProvider1.ContainerControl = this; // + // TextEditCatalogChoice + // + TextEditCatalogChoice.Location = new Point(55, 80); + TextEditCatalogChoice.Name = "TextEditCatalogChoice"; + TextEditCatalogChoice.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); + TextEditCatalogChoice.Size = new Size(448, 20); + TextEditCatalogChoice.StyleController = layoutControl1; + TextEditCatalogChoice.TabIndex = 13; + // + // layoutControlItem7 + // + layoutControlItem7.Control = TextEditCatalogChoice; + layoutControlItem7.Location = new Point(0, 72); + layoutControlItem7.Name = "layoutControlItem7"; + layoutControlItem7.Size = new Size(499, 24); + layoutControlItem7.Text = "鍒嗙被:"; + layoutControlItem7.TextSize = new Size(35, 14); + // // AddAssetsCompressorSeriesDlg // AutoScaleDimensions = new SizeF(7F, 14F); @@ -264,6 +287,8 @@ ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); + ((System.ComponentModel.ISupportInitialize)TextEditCatalogChoice.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); ResumeLayout(false); } @@ -287,5 +312,7 @@ private DevExpress.XtraTreeList.TreeList treeListLookUpEdit1TreeList; private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraEditors.ImageComboBoxEdit TextEditCatalogChoice; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/01-series/AddAssetsCompressorSeriesDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/01-series/AddAssetsCompressorSeriesDlg.cs index 233954b..3ccc4b4 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/01-series/AddAssetsCompressorSeriesDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/01-series/AddAssetsCompressorSeriesDlg.cs @@ -1,4 +1,6 @@ -锘縩amespace HStation.WinFrmUI.Assets +锘縰sing DevExpress.XtraEditors.Controls; + +namespace HStation.WinFrmUI.Assets { public partial class AddAssetsCompressorSeriesDlg : DevExpress.XtraEditors.XtraForm { @@ -26,6 +28,12 @@ } } treeListLookUpEdit1TreeList.DataSource = _assetsCompressorSeriesViews; + var alllist = await new Yw.BLL.SysCatalog().GetAll(); + foreach (var item in alllist) + { + var imageItem = new ImageComboBoxItem(item.Name, item.ID); + TextEditCatalogChoice.Properties.Items.Add(imageItem); + } } //鏁版嵁楠岃瘉 @@ -49,6 +57,10 @@ model.Name = NameTextEdit.Text; model.TagName = TagNameTextEdit.Text; model.Description = DescriptionTextEdit.Text; + if (this.TextEditCatalogChoice.EditValue != null) + { + model.CatalogID = (long)this.TextEditCatalogChoice.EditValue; + } if (await this.ReloadDataEvent.Invoke(model, this.textEditParentList.EditValue)) { TipFormHelper.ShowSucceed("娣诲姞鎴愬姛!"); diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/01-series/EditAssetsExchangerSeriesDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/01-series/EditAssetsExchangerSeriesDlg.Designer.cs index edc06c5..0707300 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/01-series/EditAssetsExchangerSeriesDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/01-series/EditAssetsExchangerSeriesDlg.Designer.cs @@ -47,6 +47,8 @@ layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + TextEditCatalogChoice = new DevExpress.XtraEditors.ImageComboBoxEdit(); + layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)textEditParentList.Properties).BeginInit(); @@ -63,10 +65,13 @@ ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TextEditCatalogChoice.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); SuspendLayout(); // // layoutControl1 // + layoutControl1.Controls.Add(TextEditCatalogChoice); layoutControl1.Controls.Add(textEditParentList); layoutControl1.Controls.Add(BtnOk); layoutControl1.Controls.Add(btnCancel); @@ -154,9 +159,9 @@ // // DescriptionTextEdit // - DescriptionTextEdit.Location = new Point(55, 80); + DescriptionTextEdit.Location = new Point(55, 104); DescriptionTextEdit.Name = "DescriptionTextEdit"; - DescriptionTextEdit.Size = new Size(448, 161); + DescriptionTextEdit.Size = new Size(448, 137); DescriptionTextEdit.StyleController = layoutControl1; DescriptionTextEdit.TabIndex = 4; // @@ -166,7 +171,7 @@ Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; - Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5, layoutControlItem1, layoutControlItem6, emptySpaceItem1, layoutControlItem4, layoutControlItem3, layoutControlItem2 }); + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5, layoutControlItem1, layoutControlItem6, emptySpaceItem1, layoutControlItem4, layoutControlItem3, layoutControlItem2, layoutControlItem7 }); Root.Name = "Root"; Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); Root.Size = new Size(511, 275); @@ -175,9 +180,9 @@ // layoutControlItem5 // layoutControlItem5.Control = DescriptionTextEdit; - layoutControlItem5.Location = new Point(0, 72); + layoutControlItem5.Location = new Point(0, 96); layoutControlItem5.Name = "layoutControlItem5"; - layoutControlItem5.Size = new Size(499, 165); + layoutControlItem5.Size = new Size(499, 141); layoutControlItem5.Text = "璇存槑:"; layoutControlItem5.TextSize = new Size(35, 14); // @@ -239,6 +244,24 @@ // dxErrorProvider1.ContainerControl = this; // + // TextEditCatalogChoice + // + TextEditCatalogChoice.Location = new Point(55, 80); + TextEditCatalogChoice.Name = "TextEditCatalogChoice"; + TextEditCatalogChoice.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); + TextEditCatalogChoice.Size = new Size(448, 20); + TextEditCatalogChoice.StyleController = layoutControl1; + TextEditCatalogChoice.TabIndex = 14; + // + // layoutControlItem7 + // + layoutControlItem7.Control = TextEditCatalogChoice; + layoutControlItem7.Location = new Point(0, 72); + layoutControlItem7.Name = "layoutControlItem7"; + layoutControlItem7.Size = new Size(499, 24); + layoutControlItem7.Text = "鍒嗙被:"; + layoutControlItem7.TextSize = new Size(35, 14); + // // EditAssetsCompressorSeriesDlg // AutoScaleDimensions = new SizeF(7F, 14F); @@ -264,6 +287,8 @@ ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); + ((System.ComponentModel.ISupportInitialize)TextEditCatalogChoice.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); ResumeLayout(false); } @@ -287,5 +312,7 @@ private DevExpress.XtraTreeList.TreeList treeListLookUpEdit1TreeList; private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraEditors.ImageComboBoxEdit TextEditCatalogChoice; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/01-series/EditAssetsExchangerSeriesDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/01-series/EditAssetsExchangerSeriesDlg.cs index 9b6e584..9a0c3aa 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/01-series/EditAssetsExchangerSeriesDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/01-series/EditAssetsExchangerSeriesDlg.cs @@ -1,4 +1,6 @@ -锘縩amespace HStation.WinFrmUI.Assets +锘縰sing DevExpress.XtraEditors.Controls; + +namespace HStation.WinFrmUI.Assets { public partial class EditAssetsCompressorSeriesDlg : DevExpress.XtraEditors.XtraForm { @@ -30,6 +32,13 @@ { this.textEditParentList.EditValue = _assetsCompressorSeries.ParentIds.Last(); } + var alllist = await new Yw.BLL.SysCatalog().GetAll(); + foreach (var item in alllist) + { + var imageItem = new ImageComboBoxItem(item.Name, item.ID); + TextEditCatalogChoice.Properties.Items.Add(imageItem); + } + this.TextEditCatalogChoice.EditValue = _assetsCompressorSeries.CatalogID; } //鏁版嵁楠岃瘉 @@ -52,6 +61,10 @@ _assetsCompressorSeries.Name = NameTextEdit.Text; _assetsCompressorSeries.TagName = TagNameTextEdit.Text; _assetsCompressorSeries.Description = DescriptionTextEdit.Text; + if (this.TextEditCatalogChoice.EditValue != null) + { + _assetsCompressorSeries.CatalogID = (long)this.TextEditCatalogChoice.EditValue; + } if (await this.ReloadDataEvent.Invoke(_assetsCompressorSeries, this.textEditParentList.EditValue)) { TipFormHelper.ShowSucceed("淇敼鎴愬姛!"); diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/EditExchangerPartPropDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/EditExchangerPartPropDlg.resx deleted file mode 100644 index ba25433..0000000 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/EditExchangerPartPropDlg.resx +++ /dev/null @@ -1,132 +0,0 @@ -锘�<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <metadata name="propGroupChoiceViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> - <metadata name="barManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>509, 17</value> - </metadata> - <metadata name="popupPumpPartMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>326, 17</value> - </metadata> - <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>644, 17</value> - </metadata> -</root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/PropGroupChoiceViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/PropGroupChoiceViewModel.cs deleted file mode 100644 index bc57506..0000000 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/PropGroupChoiceViewModel.cs +++ /dev/null @@ -1,10 +0,0 @@ -锘縩amespace HStation.WinFrmUI.Assets -{ - public class CompressorPropGroupChoiceViewModel - { - public long ID { get; set; } - public string PropGroupName { get; set; } - public string PropName { get; set; } - public string Value { get; set; } - } -} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/04-chart-edit/CompressorPerform2dEditChart.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/04-chart-edit/CompressorPerform2dEditChart.cs index 68743b8..ce69a32 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/04-chart-edit/CompressorPerform2dEditChart.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/04-chart-edit/CompressorPerform2dEditChart.cs @@ -336,7 +336,7 @@ { if (hitInfo.InSeriesPoint) { - //if ((int)hitInfo.Series.Tag != (int)_edit_curve_type) + //if ((int)hitInfo.Series.TagName != (int)_edit_curve_type) //{ // _pickPoint = null; // return; diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/PropGroupChoiceViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/CompressorPropChoiceViewModel.cs similarity index 71% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/PropGroupChoiceViewModel.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/CompressorPropChoiceViewModel.cs index 09d7b5f..acf958f 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/PropGroupChoiceViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/CompressorPropChoiceViewModel.cs @@ -1,10 +1,11 @@ 锘縩amespace HStation.WinFrmUI.Assets { - public class PropGroupChoiceViewModel + public class CompressorPropChoiceViewModel { public long ID { get; set; } public string PropGroupName { get; set; } public string PropName { get; set; } public string Value { get; set; } + public string TagName { get; set; } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/EditExchangerPartPropDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/EditPackagePartPropDlg.Designer.cs similarity index 79% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/EditExchangerPartPropDlg.Designer.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/EditPackagePartPropDlg.Designer.cs index 5c8a1ca..a076a9f 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/EditExchangerPartPropDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/EditPackagePartPropDlg.Designer.cs @@ -1,4 +1,4 @@ -锘縩amespace HStation.WinFrmUI.Assets +锘縩amespace HStation.WinFrmUI { partial class EditCompressorPartPropDlg @@ -32,15 +32,15 @@ components = new System.ComponentModel.Container(); layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); CompressorProductListBox1 = new Assets.CompressorProductListBox(); - BtnAddPumpPart = new DevExpress.XtraEditors.SimpleButton(); + BtnAddCompressorPart = new DevExpress.XtraEditors.SimpleButton(); BtnOk = new DevExpress.XtraEditors.SimpleButton(); simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); gridControl1 = new DevExpress.XtraGrid.GridControl(); - propGroupChoiceViewModelBindingSource = new BindingSource(components); gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); colPropGroupName = new DevExpress.XtraGrid.Columns.GridColumn(); colPropName = new DevExpress.XtraGrid.Columns.GridColumn(); colValue = new DevExpress.XtraGrid.Columns.GridColumn(); + colTagName = new DevExpress.XtraGrid.Columns.GridColumn(); TextEditProductName = new DevExpress.XtraEditors.TextEdit(); TextEditProductCode = new DevExpress.XtraEditors.TextEdit(); TextEditNo = new DevExpress.XtraEditors.TextEdit(); @@ -49,27 +49,28 @@ r = new DevExpress.XtraLayout.EmptySpaceItem(); layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControAddPart = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); tabbedControlGroup1 = new DevExpress.XtraLayout.TabbedControlGroup(); layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); barManager1 = new DevExpress.XtraBars.BarManager(components); barDockControlTop = new DevExpress.XtraBars.BarDockControl(); barDockControlBottom = new DevExpress.XtraBars.BarDockControl(); barDockControlLeft = new DevExpress.XtraBars.BarDockControl(); barDockControlRight = new DevExpress.XtraBars.BarDockControl(); - popupPumpPartMenu = new DevExpress.XtraBars.PopupMenu(components); + popupCompressorPartMenu = new DevExpress.XtraBars.PopupMenu(components); dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + compressorPropChoiceViewModelBindingSource = new BindingSource(components); ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)gridControl1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)propGroupChoiceViewModelBindingSource).BeginInit(); ((System.ComponentModel.ISupportInitialize)gridView1).BeginInit(); ((System.ComponentModel.ISupportInitialize)TextEditProductName.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)TextEditProductCode.Properties).BeginInit(); @@ -79,25 +80,27 @@ ((System.ComponentModel.ISupportInitialize)r).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControAddPart).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); ((System.ComponentModel.ISupportInitialize)tabbedControlGroup1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup2).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); ((System.ComponentModel.ISupportInitialize)barManager1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)popupPumpPartMenu).BeginInit(); + ((System.ComponentModel.ISupportInitialize)popupCompressorPartMenu).BeginInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)compressorPropChoiceViewModelBindingSource).BeginInit(); SuspendLayout(); // // layoutControl1 // layoutControl1.Controls.Add(CompressorProductListBox1); - layoutControl1.Controls.Add(BtnAddPumpPart); + layoutControl1.Controls.Add(BtnAddCompressorPart); layoutControl1.Controls.Add(BtnOk); layoutControl1.Controls.Add(simpleButton1); layoutControl1.Controls.Add(gridControl1); @@ -117,20 +120,20 @@ // CompressorProductListBox1.Location = new Point(12, 12); CompressorProductListBox1.Name = "CompressorProductListBox1"; - CompressorProductListBox1.Size = new Size(163, 512); - CompressorProductListBox1.TabIndex = 0; + CompressorProductListBox1.Size = new Size(156, 512); + CompressorProductListBox1.TabIndex = 11; // - // BtnAddPumpPart + // BtnAddCompressorPart // - BtnAddPumpPart.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; - BtnAddPumpPart.Appearance.Options.UseBackColor = true; - BtnAddPumpPart.Location = new Point(713, 502); - BtnAddPumpPart.Name = "BtnAddPumpPart"; - BtnAddPumpPart.Size = new Size(85, 22); - BtnAddPumpPart.StyleController = layoutControl1; - BtnAddPumpPart.TabIndex = 7; - BtnAddPumpPart.Text = "娣诲姞灞炴��"; - // BtnAddPumpPart.Click += BtnAddPumpPart_Click; + BtnAddCompressorPart.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; + BtnAddCompressorPart.Appearance.Options.UseBackColor = true; + BtnAddCompressorPart.Location = new Point(713, 502); + BtnAddCompressorPart.Name = "BtnAddCompressorPart"; + BtnAddCompressorPart.Size = new Size(85, 22); + BtnAddCompressorPart.StyleController = layoutControl1; + BtnAddCompressorPart.TabIndex = 8; + BtnAddCompressorPart.Text = "娣诲姞灞炴��"; + BtnAddCompressorPart.Click += BtnAddCompressorPart_Click; // // BtnOk // @@ -140,7 +143,7 @@ BtnOk.Name = "BtnOk"; BtnOk.Size = new Size(91, 22); BtnOk.StyleController = layoutControl1; - BtnOk.TabIndex = 8; + BtnOk.TabIndex = 9; BtnOk.Text = "纭缂栬緫"; BtnOk.Click += BtnOk_Click; // @@ -153,28 +156,24 @@ simpleButton1.Name = "simpleButton1"; simpleButton1.Size = new Size(92, 22); simpleButton1.StyleController = layoutControl1; - simpleButton1.TabIndex = 9; + simpleButton1.TabIndex = 10; simpleButton1.Text = "鍙栨秷"; // // gridControl1 // - gridControl1.DataSource = propGroupChoiceViewModelBindingSource; - gridControl1.Location = new Point(184, 113); + gridControl1.DataSource = compressorPropChoiceViewModelBindingSource; + gridControl1.Location = new Point(177, 137); gridControl1.MainView = gridView1; gridControl1.Name = "gridControl1"; - gridControl1.Size = new Size(800, 380); - gridControl1.TabIndex = 6; + gridControl1.Size = new Size(807, 356); + gridControl1.TabIndex = 7; gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); - // - // propGroupChoiceViewModelBindingSource - // - propGroupChoiceViewModelBindingSource.DataSource = typeof(Xhs.PumpProduct.PropGroupChoiceViewModel); // // gridView1 // gridView1.Appearance.HeaderPanel.Options.UseTextOptions = true; gridView1.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; - gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colPropGroupName, colPropName, colValue }); + gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colPropGroupName, colPropName, colValue, colTagName }); gridView1.GridControl = gridControl1; gridView1.Name = "gridView1"; gridView1.OptionsView.AllowCellMerge = true; @@ -212,27 +211,39 @@ colValue.Visible = true; colValue.VisibleIndex = 2; // + // colTagName + // + colTagName.AppearanceCell.Options.UseTextOptions = true; + colTagName.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colTagName.Caption = "鏍囩"; + colTagName.FieldName = "TagName"; + colTagName.Name = "colTagName"; + colTagName.OptionsColumn.AllowEdit = false; + colTagName.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + colTagName.Visible = true; + colTagName.VisibleIndex = 3; + // // TextEditProductName // - TextEditProductName.Location = new Point(248, 41); + TextEditProductName.Location = new Point(241, 41); TextEditProductName.Name = "TextEditProductName"; - TextEditProductName.Size = new Size(736, 20); + TextEditProductName.Size = new Size(743, 20); TextEditProductName.StyleController = layoutControl1; TextEditProductName.TabIndex = 3; // // TextEditProductCode // - TextEditProductCode.Location = new Point(248, 65); + TextEditProductCode.Location = new Point(241, 65); TextEditProductCode.Name = "TextEditProductCode"; - TextEditProductCode.Size = new Size(736, 20); + TextEditProductCode.Size = new Size(743, 20); TextEditProductCode.StyleController = layoutControl1; TextEditProductCode.TabIndex = 4; // // TextEditNo // - TextEditNo.Location = new Point(248, 89); + TextEditNo.Location = new Point(241, 89); TextEditNo.Name = "TextEditNo"; - TextEditNo.Size = new Size(736, 20); + TextEditNo.Size = new Size(743, 20); TextEditNo.StyleController = layoutControl1; TextEditNo.TabIndex = 5; // @@ -240,7 +251,7 @@ // Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; - Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem3, r, layoutControlItem2, layoutControAddPart, layoutControlItem8, tabbedControlGroup1 }); + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem3, r, layoutControlItem2, layoutControAddPart, tabbedControlGroup1, layoutControlItem4 }); Root.Name = "Root"; Root.Size = new Size(1001, 536); Root.TextVisible = false; @@ -260,9 +271,9 @@ // r // r.AllowHotTrack = false; - r.Location = new Point(167, 490); + r.Location = new Point(160, 490); r.Name = "r"; - r.Size = new Size(534, 26); + r.Size = new Size(541, 26); r.TextSize = new Size(0, 0); // // layoutControlItem2 @@ -279,7 +290,7 @@ // // layoutControAddPart // - layoutControAddPart.Control = BtnAddPumpPart; + layoutControAddPart.Control = BtnAddCompressorPart; layoutControAddPart.Location = new Point(701, 490); layoutControAddPart.MaxSize = new Size(89, 26); layoutControAddPart.MinSize = new Size(89, 26); @@ -289,31 +300,22 @@ layoutControAddPart.TextSize = new Size(0, 0); layoutControAddPart.TextVisible = false; // - // layoutControlItem8 - // - layoutControlItem8.Control = CompressorProductListBox1; - layoutControlItem8.Location = new Point(0, 0); - layoutControlItem8.Name = "layoutControlItem8"; - layoutControlItem8.Size = new Size(167, 516); - layoutControlItem8.TextSize = new Size(0, 0); - layoutControlItem8.TextVisible = false; - // // tabbedControlGroup1 // - tabbedControlGroup1.Location = new Point(167, 0); + tabbedControlGroup1.Location = new Point(160, 0); tabbedControlGroup1.Name = "tabbedControlGroup1"; tabbedControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 2, 2); tabbedControlGroup1.SelectedTabPage = layoutControlGroup1; - tabbedControlGroup1.Size = new Size(814, 490); + tabbedControlGroup1.Size = new Size(821, 490); tabbedControlGroup1.TabPages.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup1, layoutControlGroup2, layoutControlGroup3, layoutControlGroup4 }); tabbedControlGroup1.Text = "瀹夎鍥�"; // // layoutControlGroup1 // - layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5, layoutControlItem6, layoutControlItem7, layoutControlItem1 }); + layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5, layoutControlItem6, layoutControlItem7, layoutControlItem1, emptySpaceItem1 }); layoutControlGroup1.Location = new Point(0, 0); layoutControlGroup1.Name = "layoutControlGroup1"; - layoutControlGroup1.Size = new Size(804, 456); + layoutControlGroup1.Size = new Size(811, 456); layoutControlGroup1.Text = "浜у搧灞炴��"; // // layoutControlItem5 @@ -321,7 +323,7 @@ layoutControlItem5.Control = TextEditProductName; layoutControlItem5.Location = new Point(0, 0); layoutControlItem5.Name = "layoutControlItem5"; - layoutControlItem5.Size = new Size(804, 24); + layoutControlItem5.Size = new Size(811, 24); layoutControlItem5.Text = "浜у搧鍚嶇О:"; layoutControlItem5.TextSize = new Size(52, 14); // @@ -330,7 +332,7 @@ layoutControlItem6.Control = TextEditProductCode; layoutControlItem6.Location = new Point(0, 24); layoutControlItem6.Name = "layoutControlItem6"; - layoutControlItem6.Size = new Size(804, 24); + layoutControlItem6.Size = new Size(811, 24); layoutControlItem6.Text = "浜у搧鍥惧彿:"; layoutControlItem6.TextSize = new Size(52, 14); // @@ -339,39 +341,56 @@ layoutControlItem7.Control = TextEditNo; layoutControlItem7.Location = new Point(0, 48); layoutControlItem7.Name = "layoutControlItem7"; - layoutControlItem7.Size = new Size(804, 24); + layoutControlItem7.Size = new Size(811, 24); layoutControlItem7.Text = "浜у搧缂栧彿:"; layoutControlItem7.TextSize = new Size(52, 14); // // layoutControlItem1 // layoutControlItem1.Control = gridControl1; - layoutControlItem1.Location = new Point(0, 72); + layoutControlItem1.Location = new Point(0, 96); layoutControlItem1.Name = "layoutControlItem1"; - layoutControlItem1.Size = new Size(804, 384); + layoutControlItem1.Size = new Size(811, 360); layoutControlItem1.TextSize = new Size(0, 0); layoutControlItem1.TextVisible = false; + // + // emptySpaceItem1 + // + emptySpaceItem1.AllowHotTrack = false; + emptySpaceItem1.Location = new Point(0, 72); + emptySpaceItem1.Name = "emptySpaceItem1"; + emptySpaceItem1.Size = new Size(811, 24); + emptySpaceItem1.TextSize = new Size(0, 0); // // layoutControlGroup2 // layoutControlGroup2.Location = new Point(0, 0); layoutControlGroup2.Name = "layoutControlGroup2"; - layoutControlGroup2.Size = new Size(804, 456); + layoutControlGroup2.Size = new Size(811, 456); layoutControlGroup2.Text = "瀹夎鍥�"; // // layoutControlGroup3 // layoutControlGroup3.Location = new Point(0, 0); layoutControlGroup3.Name = "layoutControlGroup3"; - layoutControlGroup3.Size = new Size(804, 456); + layoutControlGroup3.Size = new Size(811, 456); layoutControlGroup3.Text = "缁撴瀯鍥�"; // // layoutControlGroup4 // layoutControlGroup4.Location = new Point(0, 0); layoutControlGroup4.Name = "layoutControlGroup4"; - layoutControlGroup4.Size = new Size(804, 456); + layoutControlGroup4.Size = new Size(811, 456); layoutControlGroup4.Text = "灏哄鍥�"; + // + // layoutControlItem4 + // + layoutControlItem4.Control = CompressorProductListBox1; + layoutControlItem4.Location = new Point(0, 0); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(160, 516); + layoutControlItem4.TextSize = new Size(0, 0); + layoutControlItem4.TextVisible = false; // // barManager1 // @@ -413,16 +432,20 @@ barDockControlRight.Manager = barManager1; barDockControlRight.Size = new Size(0, 536); // - // popupPumpPartMenu + // popupCompressorPartMenu // - popupPumpPartMenu.Manager = barManager1; - popupPumpPartMenu.Name = "popupPumpPartMenu"; + popupCompressorPartMenu.Manager = barManager1; + popupCompressorPartMenu.Name = "popupCompressorPartMenu"; // // dxErrorProvider1 // dxErrorProvider1.ContainerControl = this; // - // EditPumpPartPropDlg + // compressorPropChoiceViewModelBindingSource + // + compressorPropChoiceViewModelBindingSource.DataSource = typeof(Assets.CompressorPropChoiceViewModel); + // + // EditCompressorPartPropDlg // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; @@ -432,13 +455,12 @@ Controls.Add(barDockControlRight); Controls.Add(barDockControlBottom); Controls.Add(barDockControlTop); - Name = "EditPumpPartPropDlg"; + Name = "EditCompressorPartPropDlg"; StartPosition = FormStartPosition.CenterScreen; Text = "缂栬緫灞炴��"; ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)gridControl1).EndInit(); - ((System.ComponentModel.ISupportInitialize)propGroupChoiceViewModelBindingSource).EndInit(); ((System.ComponentModel.ISupportInitialize)gridView1).EndInit(); ((System.ComponentModel.ISupportInitialize)TextEditProductName.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)TextEditProductCode.Properties).EndInit(); @@ -448,19 +470,21 @@ ((System.ComponentModel.ISupportInitialize)r).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControAddPart).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); ((System.ComponentModel.ISupportInitialize)tabbedControlGroup1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup2).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); ((System.ComponentModel.ISupportInitialize)barManager1).EndInit(); - ((System.ComponentModel.ISupportInitialize)popupPumpPartMenu).EndInit(); + ((System.ComponentModel.ISupportInitialize)popupCompressorPartMenu).EndInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); + ((System.ComponentModel.ISupportInitialize)compressorPropChoiceViewModelBindingSource).EndInit(); ResumeLayout(false); PerformLayout(); } @@ -487,17 +511,14 @@ private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; private DevExpress.XtraLayout.EmptySpaceItem r; - private BindingSource propGroupChoiceViewModelBindingSource; - private DevExpress.XtraBars.PopupMenu popupPumpPartMenu; - private DevExpress.XtraEditors.SimpleButton BtnAddPumpPart; + private DevExpress.XtraBars.PopupMenu popupCompressorPartMenu; + private DevExpress.XtraEditors.SimpleButton BtnAddCompressorPart; private DevExpress.XtraLayout.LayoutControlItem layoutControAddPart; private DevExpress.XtraBars.BarManager barManager1; private DevExpress.XtraBars.BarDockControl barDockControlTop; private DevExpress.XtraBars.BarDockControl barDockControlBottom; private DevExpress.XtraBars.BarDockControl barDockControlLeft; private DevExpress.XtraBars.BarDockControl barDockControlRight; - private Assets.CompressorProductListBox CompressorProductListBox1; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; private DevExpress.XtraLayout.TabbedControlGroup tabbedControlGroup1; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; @@ -508,5 +529,10 @@ private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private Assets.CompressorProductListBox CompressorProductListBox1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraGrid.Columns.GridColumn colTagName; + private BindingSource compressorPropChoiceViewModelBindingSource; } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/EditExchangerPartPropDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/EditPackagePartPropDlg.cs similarity index 62% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/EditExchangerPartPropDlg.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/EditPackagePartPropDlg.cs index 0fd77c2..8effe32 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/EditExchangerPartPropDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/EditPackagePartPropDlg.cs @@ -1,4 +1,6 @@ -锘縩amespace HStation.WinFrmUI.Assets +锘縰sing HStation.WinFrmUI.Assets; + +namespace HStation.WinFrmUI { public partial class EditCompressorPartPropDlg : DevExpress.XtraEditors.XtraForm { @@ -10,28 +12,35 @@ this.CompressorProductListBox1.MouseUp += CompressorProductListBox1_MouseUp; } - private BLL.AssetsCompressorPartMain _bll = null; - private List<PropGroupChoiceViewModel> _proplist = null; + #region Private - private List<CurrentPartMainViewModel> _allBindingList = new List<CurrentPartMainViewModel>(); + private BLL.AssetsCompressorPartMain _bll; + private List<HStation.WinFrmUI.Assets.CompressorPropChoiceViewModel> _propList; - private Vmo.AssetsCompressorMainAndPartMapVmo _partmap = null; + private Vmo.AssetsCompressorMainAndPartMappingVmo _partMapping; - private Vmo.AssetsCompressorPartMainVmo _CompressorPart = null; + private Vmo.AssetsCompressorMainVmo _CompressorMain; + + private Vmo.AssetsCompressorPartMainVmo _CompressorPart; private long _catalogID; //鍒嗙被ID - private long _seriesID; //绯诲垪ID + private Vmo.AssetsCompressorSeriesVmo _series; //绯诲垪ID - private List<Vmo.AssetsCompressorPropContentVmo> _allPropList = null; + private List<Vmo.AssetsCompressorPropContentVmo> _allPropList; + + private Yw.BLL.SysPropMapping _sysPropMapping; + + #endregion Private //鍥炶皟浜嬩欢 - public event Func<Vmo.AssetsCompressorPartMainVmo, List<Vmo.AssetsCompressorPropContentVmo>, Vmo.AssetsCompressorMainAndPartMapVmo, Task<bool>> ReloadEvent; + public event Func<Vmo.AssetsCompressorPartMainVmo, List<Vmo.AssetsCompressorPropContentVmo>, Vmo.AssetsCompressorMainAndPartMappingVmo, Task<bool>> ReloadEvent; //鏁版嵁缁戝畾 public async void SetBindingData(Vmo.AssetsCompressorMainVmo AssetsCompressorMain) { this.CompressorProductListBox1.SetBindingData(AssetsCompressorMain); + _CompressorMain = AssetsCompressorMain; this.CompressorProductListBox1.SelectReloadEvent += () => { ListBoxPart_SelectedIndexChanged(); @@ -40,22 +49,26 @@ { BarBtnAddCompressorPart_ItemClick(); }; + this.CompressorProductListBox1.DeleteReloadEvent += () => + { + BarBtnDeletePart_ItemClick(); + }; _bll = new BLL.AssetsCompressorPartMain(); var allpartlist = await _bll.GetByCompressorMainID(AssetsCompressorMain.ID); //鑾峰彇鎵�鏈変骇鍝� - /* var series = await new BLL.AssetsCompressorSeries().GetByID(AssetsCompressorMain.CompressorSeriesID); //鑾峰彇绯诲垪 - _CompressorPart = new Vmo.AssetsCompressorPartMainVmo(); - _series = series.ID; - _CompressorPart.SeriesID = _series; - _catalogID = series.CatalogID; - _propList = new List<PropGroupChoiceViewModel>(); - _partMapping = new Vmo.AssetsCompressorMainAndPartMapVmo(); - _partMapping.CompressorID = AssetsCompressorMain.ID; - _partMapping.SeriesID = _series;*/ - this.propGroupChoiceViewModelBindingSource.DataSource = _proplist; - this.propGroupChoiceViewModelBindingSource.ResetBindings(false); + var series = await new BLL.AssetsCompressorSeries().GetByID(AssetsCompressorMain.SeriesID); //鑾峰彇绯诲垪 + _CompressorPart = new Vmo.AssetsCompressorPartMainVmo(); + _series = series; + _CompressorPart.SeriesID = _series.ID; + _catalogID = _series.CatalogID; + _propList = new List<HStation.WinFrmUI.Assets.CompressorPropChoiceViewModel>(); + _partMapping = new Vmo.AssetsCompressorMainAndPartMappingVmo(); + _partMapping.MainID = AssetsCompressorMain.ID; + _partMapping.SeriesID = _series.ID; + this.compressorPropChoiceViewModelBindingSource.DataSource = _propList; + this.compressorPropChoiceViewModelBindingSource.ResetBindings(false); } - //鍒嗙被閫夋嫨鍙樻崲 + //閫夋嫨鍙樻崲 private async void SetPropSelectedValue(CompressorPartViewModel partmain) { layoutControAddPart.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; @@ -64,34 +77,39 @@ this.TextEditNo.Text = partmain.NO.Trim(); this.TextEditProductCode.Text = partmain.Code.Trim(); this.TextEditProductName.Text = partmain.Name.Trim(); - _proplist.Clear(); + _propList.Clear(); var bll = new Yw.BLL.SysPropStruct(); var catlog = await bll.GetByCatalogID(_catalogID); if (catlog == null) { - this.propGroupChoiceViewModelBindingSource.ResetBindings(false); + this.compressorPropChoiceViewModelBindingSource.ResetBindings(false); return; } - _proplist.Clear(); + _propList.Clear(); foreach (var item in catlog) { foreach (var prop in item.PropList) { - _proplist.Add(new PropGroupChoiceViewModel() { PropGroupName = item.Name, PropName = prop.Name, ID = prop.ID }); + _propList.Add(new CompressorPropChoiceViewModel() + { + PropGroupName = item.Name, + PropName = prop.Name, + ID = prop.ID, + TagName = prop.Code + }); } } var propbll = new BLL.AssetsCompressorPartPropContent(); - var alllist = await propbll.GetByCompressorPartID(model.ID); - _allPropList = alllist; - foreach (var item in alllist) + _allPropList = await propbll.GetByCompressorPartID(model.ID); + foreach (var item in _allPropList) { - var selectProp = _proplist.Find(x => x.ID == item.PropID); + var selectProp = _propList.Find(x => x.ID == item.PropID); if (selectProp != null) { selectProp.Value = item.PropValue; } } - this.propGroupChoiceViewModelBindingSource.ResetBindings(false); + this.compressorPropChoiceViewModelBindingSource.ResetBindings(false); this.gridView1.ExpandAllGroups(); } @@ -115,9 +133,8 @@ updatepart.Name = TextEditProductName.Text; updatepart.NO = TextEditNo.Text; updatepart.Code = TextEditProductCode.Text; - updatepart.SeriesID = _seriesID; - var updateproplist = new List<UpdateAssetsCompressorPropContentInput>(); - foreach (var item in _proplist) + updatepart.SeriesID = _series.ID; + foreach (var item in _propList) { if (_allPropList != null) { @@ -130,10 +147,19 @@ } else { - _allPropList.Add(new Vmo.AssetsCompressorPropContentVmo() { SeriesID = _allPropList.First().SeriesID, PartID = _allPropList.First().PartID, PropID = item.ID, PropValue = item.Value }); + _allPropList.Add(new Vmo.AssetsCompressorPropContentVmo() + { + SeriesID = _allPropList.First().SeriesID, + PartID = _allPropList.First().PartID, + PropID = item.ID, + PropValue = item.Value, + TagName = item.TagName + }); } } } + var CompressorMainBll = new BLL.AssetsCompressorMain(); + await CompressorMainBll.Update(_CompressorMain); if (await _bll.UpdateEx(updatepart, _allPropList)) { vm.Reset(updatepart); @@ -151,13 +177,14 @@ //宸︿晶鏍戝彸鍑昏彍鍗曚簨浠� private void CompressorProductListBox1_MouseUp(object sender, MouseEventArgs e) { - /* if (e.Button == MouseButtons.Right) - { - Point screenPoint = Cursor.Position; - popupCompressorPartMenu.ShowPopup(screenPoint); - }*/ + if (e.Button == MouseButtons.Right) + { + Point screenPoint = Cursor.Position; + popupCompressorPartMenu.ShowPopup(screenPoint); + } } + //鏁版嵁楠岃瘉 private bool Vaild() { this.dxErrorProvider1.ClearErrors(); @@ -178,11 +205,17 @@ _CompressorPart.NO = TextEditNo.Text; _CompressorPart.Code = TextEditProductCode.Text; var AssetsCompressorPropContent = new List<Vmo.AssetsCompressorPropContentVmo>(); - foreach (var item in _proplist) + foreach (var item in _propList) { - AssetsCompressorPropContent.Add(new Vmo.AssetsCompressorPropContentVmo { PropID = item.ID, PropValue = item.Value, SeriesID = _CompressorPart.SeriesID }); + AssetsCompressorPropContent.Add(new Vmo.AssetsCompressorPropContentVmo + { + PropID = item.ID, + PropValue = item.Value, + SeriesID = _CompressorPart.SeriesID, + TagName = item.TagName + }); } - var id = await _bll.InsertEx(_CompressorPart, AssetsCompressorPropContent, _partmap); + var id = await _bll.InsertEx(_CompressorPart, AssetsCompressorPropContent, _partMapping); if (id > 0) { var Compressorpart = await _bll.GetByID(id); @@ -204,27 +237,34 @@ private async void BarBtnAddCompressorPart_ItemClick() { layoutControAddPart.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always; - TextEditProductName.Text = string.Empty; - TextEditNo.Text = string.Empty; - TextEditProductCode.Text = string.Empty; + this.TextEditProductName.Text = string.Empty; + this.TextEditNo.Text = string.Empty; + this.TextEditProductCode.Text = string.Empty; var bll = new Yw.BLL.SysPropStruct(); try { var catlog = await bll.GetByCatalogID(_catalogID); if (catlog == null) { - this.propGroupChoiceViewModelBindingSource.ResetBindings(false); + this.compressorPropChoiceViewModelBindingSource.ResetBindings(false); return; } - _proplist.Clear(); + _propList.Clear(); foreach (var item in catlog) { foreach (var prop in item.PropList) { - _proplist.Add(new PropGroupChoiceViewModel() { PropGroupName = item.Name, PropName = prop.Name, ID = prop.ID, Value = prop.DefaultValue }); + _propList.Add(new CompressorPropChoiceViewModel() + { + PropGroupName = item.Name, + PropName = prop.Name, + ID = prop.ID, + Value = prop.DefaultValue, + TagName = prop.Code + }); } } - this.propGroupChoiceViewModelBindingSource.ResetBindings(false); + this.compressorPropChoiceViewModelBindingSource.ResetBindings(false); } catch { @@ -233,13 +273,12 @@ // 灏濊瘯鏀瑰彉鐒︾偣浠ヨЕ鍙戞帶浠舵洿鏂� this.TextEditProductName.Focus(); // this.TextEditProductName.SelectAll(); - this.TextEditNo.Properties.NullText = "鍦ㄦ杈撳叆浜у搧缂栧彿"; this.TextEditProductCode.Properties.NullText = "鍦ㄦ杈撳叆浜у搧鍥惧彿"; } // 鍒犻櫎浜у搧 - private async void BarBtnDeletePart_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + private async void BarBtnDeletePart_ItemClick() { var vm = this.CompressorProductListBox1.GetCurrentVm(); if (vm == null) @@ -250,6 +289,11 @@ { this.CompressorProductListBox1._allBindingList.Remove(vm); this.CompressorProductListBox1.Refresh(); + this._propList.Clear(); + this.compressorPropChoiceViewModelBindingSource.ResetBindings(false); + this.TextEditProductName.Text = string.Empty; + this.TextEditNo.Text = string.Empty; + this.TextEditProductCode.Text = string.Empty; MessageBoxHelper.ShowSuccess("鍒犻櫎鎴愬姛!"); } else diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditExchangerPartPropDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/EditPackagePartPropDlg.resx similarity index 92% copy from WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditExchangerPartPropDlg.resx copy to WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/EditPackagePartPropDlg.resx index ba25433..71aa375 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/06-prop/EditExchangerPartPropDlg.resx +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/EditPackagePartPropDlg.resx @@ -117,16 +117,16 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="propGroupChoiceViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> + <metadata name="compressorPropChoiceViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>529, 17</value> </metadata> <metadata name="barManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>509, 17</value> + <value>239, 17</value> </metadata> - <metadata name="popupPumpPartMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>326, 17</value> + <metadata name="popupCompressorPartMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> </metadata> <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>644, 17</value> + <value>374, 17</value> </metadata> </root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/ExchangerPartViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/ExchangerPartViewModel.cs similarity index 98% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/ExchangerPartViewModel.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/ExchangerPartViewModel.cs index 484b938..4da473f 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/ExchangerPartViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/ExchangerPartViewModel.cs @@ -32,7 +32,7 @@ public long ID { get; set; } /// <summary> - /// 娉佃澶嘔D + /// 璁惧ID /// </summary> public long PartID { get; set; } diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/ExchangerProductListBox.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/ExchangerProductListBox.Designer.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/ExchangerProductListBox.Designer.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/ExchangerProductListBox.Designer.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/ExchangerProductListBox.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/ExchangerProductListBox.cs similarity index 85% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/ExchangerProductListBox.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/ExchangerProductListBox.cs index eeb3092..06fc1f8 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/ExchangerProductListBox.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/ExchangerProductListBox.cs @@ -17,25 +17,27 @@ public async void SetBindingData(Vmo.AssetsCompressorMainVmo AssetsCompressorMain) { - /*_allBindingList = new List<CurrentPartMainViewModel>(); + _allBindingList = new List<CompressorPartViewModel>(); _Bll = new BLL.AssetsCompressorPartMain(); var allpartlist = await _Bll.GetByCompressorMainID(AssetsCompressorMain.ID); //鑾峰彇鎵�鏈変骇鍝� - var series = await new BLL.AssetsCompressorSeries().GetByID(AssetsCompressorMain.CompressorSeriesID); //鑾峰彇绯诲垪 + var series = await new BLL.AssetsCompressorSeries().GetByID(AssetsCompressorMain.SeriesID); //鑾峰彇绯诲垪 if (allpartlist != null) { foreach (var item in allpartlist) { - var model = new CurrentPartMainViewModel(item); + var model = new CompressorPartViewModel(item); _allBindingList.Add(model); } } this.listBoxControl1.DataSource = _allBindingList; - this.listBoxControl1.Refresh();*/ + this.listBoxControl1.Refresh(); } public event Action AddReloadEvent = null; public event Action SelectReloadEvent = null; + + public event Action DeleteReloadEvent = null; private void BtnAddProductProp_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { @@ -60,7 +62,8 @@ //鍒犻櫎灞炴�� private async void barBtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { - var vm = this.listBoxControl1.GetCurrentViewModel(_allBindingList); + DeleteReloadEvent.Invoke(); + /*var vm = this.listBoxControl1.GetCurrentViewModel(_allBindingList); if (vm == null) { TipFormHelper.ShowWarn("璇烽�夋嫨鏁版嵁琛�!"); @@ -77,7 +80,7 @@ else { TipFormHelper.ShowError("鍒犻櫎澶辫触!"); - } + }*/ } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/ExchangerProductListBox.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/ExchangerProductListBox.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/02-main/01-EditPumpPartProp/ExchangerProductListBox.resx rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/06-prop/ExchangerProductListBox.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/ExchangerManageMainPage.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/CompressorManageMainPage.Designer.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/ExchangerManageMainPage.Designer.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/CompressorManageMainPage.Designer.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/ExchangerManageMainPage.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/CompressorManageMainPage.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/ExchangerManageMainPage.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/CompressorManageMainPage.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/ExchangerManageMainPage.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/CompressorManageMainPage.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/ExchangerManageMainPage.resx rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/11-compressor/CompressorManageMainPage.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/12-package/EditPackagePartPropDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/12-package/EditPackagePartPropDlg.cs index 640f7fa..87f5af7 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/12-package/EditPackagePartPropDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/12-package/EditPackagePartPropDlg.cs @@ -306,7 +306,7 @@ list.Add(new Yw.Vmo.SysPropMappingSetterVmo { PropID = id, UnitName = rhs.UnitName, IsNull = rhs.IsNull }); await _sysPropMapping.SetByCatalogID(_series.CatalogID, list); var model = await bll.GetByID(id); - var partMain = new PropGroupChoiceViewModel() { PropGroupName = groupName, PropName = model.Name, ID = model.ID, Value = propValue, KeyWorldType = "Prop" }; + var partMain = new ExchangerPropChoiceViewModel() { PropGroupName = groupName, PropName = model.Name, ID = model.ID, Value = propValue, KeyWorldType = "Prop" }; _propList.Add(partMain); this.propGroupChoiceViewModelBindingSource.ResetBindings(false); return true; diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/04-chart-edit/TankPerform2dEditChart.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/04-chart-edit/TankPerform2dEditChart.cs index ec247f6..8bd052e 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/04-chart-edit/TankPerform2dEditChart.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/04-chart-edit/TankPerform2dEditChart.cs @@ -336,7 +336,7 @@ { if (hitInfo.InSeriesPoint) { - //if ((int)hitInfo.Series.Tag != (int)_edit_curve_type) + //if ((int)hitInfo.Series.TagName != (int)_edit_curve_type) //{ // _pickPoint = null; // return; diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj b/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj index eb30636..0e05759 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj @@ -116,12 +116,21 @@ <Compile Update="10-exchanger\04-chart-edit\ExchangerPerform2dEditDlg.cs" /> <Compile Update="10-exchanger\05-import\01-excel\ImportExchangerPerform2dByExcelCtrl.cs" /> <Compile Update="10-exchanger\05-import\01-excel\ImportTankPerform2dByExcelDlg.cs" /> + <Compile Update="10-exchanger\06-prop\EditPackagePartPropDlg.cs"> + <SubType>Form</SubType> + </Compile> <Compile Update="11-compressor\04-chart-edit\CompressorMainPhartMinorLossPanel.cs" /> <Compile Update="11-compressor\04-chart-edit\CompressorPerform2dEditChart.cs" /> <Compile Update="11-compressor\04-chart-edit\CompressorPerform2dEditCtrl.cs" /> <Compile Update="11-compressor\04-chart-edit\CompressorPerform2dEditDlg.cs" /> <Compile Update="11-compressor\05-import\01-excel\ImportCompressorPerform2dByExcelCtrl.cs" /> <Compile Update="11-compressor\05-import\01-excel\ImportTankPerform2dByExcelDlg.cs" /> + <Compile Update="11-compressor\06-prop\EditPackagePartPropDlg.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="11-compressor\06-prop\ExchangerProductListBox.cs"> + <SubType>UserControl</SubType> + </Compile> <Compile Update="14-tank\04-chart-edit\TankPerform2dEditCtrl.cs" /> <Compile Update="14-tank\04-chart-edit\TankPerform2dEditDlg.cs" /> <Compile Update="14-tank\04-chart-edit\TankMainPhartMinorLossPanel.cs" /> @@ -181,15 +190,12 @@ <Compile Update="11-compressor\01-series\AddAssetsCompressorSeriesDlg.cs" /> <Compile Update="11-compressor\01-series\EditAssetsExchangerSeriesDlg.cs" /> <Compile Update="11-compressor\01-series\CompressorTreeListCtrl.cs" /> - <Compile Update="11-compressor\02-main\01-EditPumpPartProp\EditExchangerPartPropDlg.cs" /> - <Compile Update="11-compressor\02-main\01-EditPumpPartProp\ExchangerProductListBox.cs" /> <Compile Update="11-compressor\02-main\AddExchangerMainDlg.cs" /> <Compile Update="11-compressor\02-main\EditExchangerMainDlg.cs" /> - <Compile Update="11-compressor\ExchangerManageMainPage.cs" /> + <Compile Update="11-compressor\CompressorManageMainPage.cs" /> <Compile Update="10-exchanger\01-series\AddAssetsExchangerSeriesDlg.cs" /> <Compile Update="10-exchanger\01-series\EditAssetsExchangerSeriesDlg.cs" /> <Compile Update="10-exchanger\01-series\ExchangerTreeListCtrl.cs" /> - <Compile Update="10-exchanger\06-prop\EditExchangerPartPropDlg.cs" /> <Compile Update="10-exchanger\06-prop\ExchangerProductListBox.cs" /> <Compile Update="10-exchanger\02-main\AddExchangerMainDlg.cs" /> <Compile Update="10-exchanger\02-main\EditExchangerMainDlg.cs" /> diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user b/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user index 9a5b434..85ce16d 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user @@ -233,9 +233,6 @@ <Compile Update="10-exchanger\01-series\ExchangerTreeListCtrl.cs"> <SubType>UserControl</SubType> </Compile> - <Compile Update="10-exchanger\06-prop\EditExchangerPartPropDlg.cs"> - <SubType>Form</SubType> - </Compile> <Compile Update="10-exchanger\06-prop\ExchangerProductListBox.cs"> <SubType>UserControl</SubType> </Compile> @@ -278,12 +275,6 @@ <Compile Update="11-compressor\01-series\EditAssetsExchangerSeriesDlg.cs"> <SubType>Form</SubType> </Compile> - <Compile Update="11-compressor\02-main\01-EditPumpPartProp\EditExchangerPartPropDlg.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Update="11-compressor\02-main\01-EditPumpPartProp\ExchangerProductListBox.cs"> - <SubType>UserControl</SubType> - </Compile> <Compile Update="11-compressor\02-main\AddExchangerMainDlg.cs"> <SubType>Form</SubType> </Compile> @@ -311,7 +302,7 @@ <Compile Update="11-compressor\05-import\01-excel\ImportTankPerform2dByExcelDlg.cs"> <SubType>Form</SubType> </Compile> - <Compile Update="11-compressor\ExchangerManageMainPage.cs"> + <Compile Update="11-compressor\CompressorManageMainPage.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="12-package\01-series\AddAssetsPackageSeriesDlg.cs"> diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Assets.CompressorPropChoiceViewModel.datasource b/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Assets.CompressorPropChoiceViewModel.datasource new file mode 100644 index 0000000..a02ddb3 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Assets.CompressorPropChoiceViewModel.datasource @@ -0,0 +1,10 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<!-- + This file is automatically generated by Visual Studio. It is + used to store generic object data source configuration information. + Renaming the file extension or editing the content of this file may + cause the file to be unrecognizable by the program. +--> +<GenericObjectDataSource DisplayName="CompressorPropChoiceViewModel" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> + <TypeInfo>HStation.WinFrmUI.Assets.CompressorPropChoiceViewModel, HStation.WinFrmUI.Assets.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> +</GenericObjectDataSource> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Assets.PropGroupChoiceViewModel.datasource b/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Assets.PropGroupChoiceViewModel.datasource new file mode 100644 index 0000000..5431801 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Assets.PropGroupChoiceViewModel.datasource @@ -0,0 +1,10 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<!-- + This file is automatically generated by Visual Studio. It is + used to store generic object data source configuration information. + Renaming the file extension or editing the content of this file may + cause the file to be unrecognizable by the program. +--> +<GenericObjectDataSource DisplayName="PropGroupChoiceViewModel" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> + <TypeInfo>HStation.WinFrmUI.Assets.PropGroupChoiceViewModel, HStation.WinFrmUI.Assets.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> +</GenericObjectDataSource> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/Local_resistance.png b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/Local_resistance.png new file mode 100644 index 0000000..81192f4 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/Local_resistance.png Binary files differ diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/Pressure_conversion_formula_big1.2.png b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/Pressure_conversion_formula_big1.2.png new file mode 100644 index 0000000..d605dda --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/Pressure_conversion_formula_big1.2.png Binary files differ diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/Pressure_conversion_formula_small1.2.png b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/Pressure_conversion_formula_small1.2.png new file mode 100644 index 0000000..e63e003 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/Pressure_conversion_formula_small1.2.png Binary files differ diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/ReportViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/ReportViewModel.cs new file mode 100644 index 0000000..1f5f70a --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/ReportViewModel.cs @@ -0,0 +1,283 @@ +锘縩amespace HStation.WinFrmUI +{ + public class ReportViewModel + { + public ReportViewModel() + { } + + /// <summary> + /// 椤圭洰鍚嶇О + /// </summary> + public string ProjectName { get; set; } + + /// <summary> + /// 椤圭洰姒傝堪 + /// </summary> + public string Description { get; set; } + + /// <summary> + /// 璁惧鍩烘湰閰嶇疆 + /// </summary> + + public List<ReportEquipmentViewModel> Equipments { get; set; } + + /// <summary> + /// 娉电珯杩愯鐘跺喌 + /// </summary> + public List<ReportPumpStationViewModel> PumpStations { get; set; } + + /// <summary> + /// 杩愯鎯呭喌鍙婅兘鑰楃粺璁� + /// </summary> + public List<PowerConsumptionInfo> PowerConsumptionInfos { get; set; } + + /// <summary> + /// 闃�闂ㄥ紑搴� + /// </summary> + public List<ValveOpen> ValveOpens { get; set; } + + /// <summary> + /// 鎶�鏀瑰悗璁惧閰嶇疆鎯呭喌 + /// </summary> + public List<ReportEquipmentViewModel> AfterEquipments { get; set; } + + /// <summary> + /// 鎶�鏀瑰悗璁惧棰勮杩愯鐘跺喌 + /// </summary> + public List<ReportPumpStationViewModel> AfterPumpStations { get; set; } + + /// <summary> + /// 鎶�鏀瑰悗杩愯鎯呭喌鍙婅兘鑰楃粺璁� + /// </summary> + public List<PowerConsumptionInfo> AfterPowerConsumptionInfos { get; set; } + + /// <summary> + /// 鑺傜數璁$畻姹囨�� + /// </summary> + public List<PowerRelatedInfo> PowerRelatedInfos { get; set; } + + /// <summary> + /// 鎶�鏀硅妭鐢佃〃 + /// </summary> + public List<EquipmentPowerInfo> AfterEquipmentPowers { get; set; } + } + + /// <summary> + /// 璁惧鍩烘湰閰嶇疆 + /// </summary> + public class ReportEquipmentViewModel + { + public ReportEquipmentViewModel() + { } + + /// <summary> + /// 璁惧鍚嶇О + /// </summary> + public string EquipmentName { get; set; } + + /// <summary> + /// 璁惧浣嶅彿 + /// </summary> + public string EquipmentNumber { get; set; } + + /// <summary> + /// 璁惧鍨嬪彿 + /// </summary> + public string EquipmentMainName { get; set; } + + /// <summary> + /// 棰濆畾娴侀噺 + /// </summary> + public string RatedFlow { get; set; } + + /// <summary> + /// 棰濆畾鎵▼ + /// </summary> + public string RatedHead { get; set; } + + /// <summary> + /// 椹卞姩鏂瑰紡 + /// </summary> + public string TypeOfDrive { get; set; } + + /// <summary> + /// 棰濆畾鐢靛帇 + /// </summary> + public string RatedVoltage { get; set; } + + /// <summary> + /// 棰濆畾鐢垫祦 + /// </summary> + public string RatedCurrent { get; set; } + + /// <summary> + /// 棰濆畾鍔熺巼 + /// </summary> + public string RatedPower { get; set; } + + /// <summary> + /// 棰濆畾鍥犳暟 + /// </summary> + public string RatedFactor { get; set; } + + /// <summary> + /// 杞�� + /// </summary> + public string Speed { get; set; } + } + + /// <summary> + /// 娉电珯杩愯鐘跺喌 + /// </summary> + public class ReportPumpStationViewModel + { + /// <summary> + /// 璁惧鍚嶇О + /// </summary> + public string EquipmentName { get; set; } + + /// <summary> + /// 璁惧浣嶅彿 + /// </summary> + public string EquipmentNumber { get; set; } + + /// <summary> + /// 鍑哄彛鍘嬪姏/鏍囬珮 + /// </summary> + public string OutletPressure { get; set; } + + /// <summary> + /// 鍑哄彛闃�闂ㄥ紑搴� + /// </summary> + public string OutletValveOpening { get; set; } + + /// <summary> + /// 杩愯鐢垫祦 + /// </summary> + public string RunningCurrent { get; set; } + + /// <summary> + /// 鍔熺巼 + /// </summary> + public string Power { get; set; } + + /// <summary> + /// 鎬荤娴侀噺 + /// </summary> + public string TotalFlow { get; set; } + + /// <summary> + /// 渚涙按鍘嬪姏 + /// </summary> + public string SuppyPressure { get; set; } + + /// <summary> + /// 鍥炴按鍘嬪姏 + /// </summary> + public string ReturnPressure { get; set; } + } + + /// <summary> + /// 杩愯鎯呭喌鍙婅兘鑰楃粺璁� + /// </summary> + public class PowerConsumptionInfo + { + /// <summary> + /// 杩愯妯″紡 + /// </summary> + public string RunMode { get; set; } + + /// <summary> + /// 鎶�鏀瑰墠瀹炶�楀姛鐜囷紝鍗曚綅涓簁W锛� + /// </summary> + public string PreTechPowerConsumption { get; set; } + + /// <summary> + /// 骞磋繍琛屾椂闂达紝鍗曚綅涓哄皬鏃讹紝 + /// </summary> + public string AnnualRunningHours { get; set; } + + /// <summary> + /// 骞磋�楃數閲忥紝鍗曚綅涓轰竾kW路h锛� + /// </summary> + public string AnnualPowerConsumption { get; set; } + } + + /// <summary> + /// 闃�闂ㄥ紑搴� + /// </summary> + public class ValveOpen + { + /// <summary> + /// 寮�搴� + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 绯绘暟 + /// </summary> + public string MinorLoss { get; set; } + } + + /// <summary> + /// 鑺傜數璁$畻姹囨�� + /// </summary> + public class PowerRelatedInfo + { + /// <summary> + /// 杩愯妯″紡 + /// </summary> + public string RunMode { get; set; } + + /// <summary> + /// 鎶�鏀瑰墠瀹炶�楀姛鐜� + /// </summary> + public string PreTechPowerConsumption { get; set; } + + /// <summary> + /// 鎶�鏀瑰悗璁捐鍔熺巼 + /// </summary> + public string PostTechDesignedPower { get; set; } + + /// <summary> + /// 灏忔椂鑺傜數閲� + /// </summary> + public string HourlyPowerSaving { get; set; } + + /// <summary> + /// 鑺傜數鐜� + /// </summary> + public string PowerSavingRate { get; set; } + + /// <summary> + /// 杩愯鏃堕棿 + /// </summary> + public string RunningTime { get; set; } + } + + /// <summary> + /// 鎶�鏀硅妭鐢佃〃 + /// </summary> + public class EquipmentPowerInfo + { + /// <summary> + /// 璁惧鍚嶇О + /// </summary> + public string EquipmentName { get; set; } + + /// <summary> + /// 鎶�鏀瑰墠骞磋�楃數閲忥紙涓囧害/骞达級 + /// </summary> + public string PowerConsumptionBeforeTech { get; set; } + + /// <summary> + /// 鑺傜數鐜囷紙%锛� + /// </summary> + public string PowerSavingRate { get; set; } + + /// <summary> + /// 鏀瑰悗骞磋妭鐢甸噺锛堜竾搴�/骞达級 + /// </summary> + public string AnnualPowerSavingAfterTech { get; set; } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/SimulationWordReport.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/SimulationWordReport.cs index 08c9934..eb55041 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/SimulationWordReport.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/SimulationWordReport.cs @@ -20,7 +20,7 @@ private string _run_mode = "*******************************************************************"; //杩愯鏃堕棿璁$畻鏂瑰紡 浜岋級杩愯鎯呭喌涓庤兘鑰楀垎鏋愪腑 鈥滃勾骞冲潎杩愯鏃堕棿鎸夛細鈥濆悗 - private string _avg_runtime_mode = "*******************************************************************"; + private string _avg_runtime_mode = "**************************"; //鎸塤Company_1鍏徃寰幆姘寸郴缁熷钩鍧囪繍琛�***灏忔椂 鍥涳級椤圭洰鑺傜數鏁堢泭鍒嗘瀽涓� private string _Company_1 = "****************"; @@ -61,9 +61,9 @@ /// </summary> /// <param name="strFilePath"></param> 鏂囦欢璺緞 /// <returns></returns> - public bool Create(string strFilePath) + public bool Create(string strFilePath, ReportViewModel reportViewModel) { - MemoryStream stream = Create4Stream(); + MemoryStream stream = Create4Stream(reportViewModel); if (stream != null) { var data_bytes = stream.ToArray(); @@ -79,10 +79,10 @@ return true; } - protected MemoryStream Create4Stream() + protected MemoryStream Create4Stream(ReportViewModel reportViewModel) { Document doc = new Document(); - CreatePage(doc); + CreatePage(doc, reportViewModel); doc.RemoveChild(doc.FirstSection);//鍒犻櫎绗竴椤电┖鐧� @@ -96,7 +96,6 @@ protected void SetWordHander(Aspose.Words.Document doc) { DocumentBuilder builder = new Aspose.Words.DocumentBuilder(doc); - builder.MoveToHeaderFooter(HeaderFooterType.HeaderPrimary); SimulationWordReportHelper Text_center_10_Gray = new SimulationWordReportHelper(builder) { fontalignment = ParagraphAlignment.Right, fontsize = 10, fontcolor = Color.Gray }; Text_center_10_Gray.structureText(string.Format("{0}{1}", _title, "椤圭洰鑺傝兘鏂规鎶ュ憡")); @@ -117,7 +116,8 @@ builder.MoveToDocumentStart(); } - private void CreatePage(Document doc) + //姝f枃 + private void CreatePage(Document doc, ReportViewModel reportViewModel) { Aspose.Words.Document src = new Aspose.Words.Document(); Aspose.Words.DocumentBuilder builder = new Aspose.Words.DocumentBuilder(src); @@ -140,22 +140,21 @@ SimulationWordReportHelper Cell_h_merging_end = new SimulationWordReportHelper(builder) { horizontalMerge = Aspose.Words.Tables.CellMerge.Previous }; Text_center_25_black.structureText(string.Format("{0}{1}", _title, "椤圭洰鑺傝兘鏂规鎶ュ憡")); - Text_left_15_black.structureText("涓�锛塡t绯荤粺姒傝堪"); - builder.Writeln(""); - Text_left_12_black.structureText(string.Format(" {0}", _Instructions)); - builder.Writeln(""); - - Text_left_12_black.structureText(" 1.1銆佽澶囧熀鏈厤缃�"); + Text_left_15_black.structureText("涓�銆佺郴缁熸杩�"); + Text_left_15_black.AddBlankLine(); + Text_left_15_black.AddBlankLine(); + Text_left_12_black.structureText(string.Format("{0}", _Instructions)); + Text_left_12_black.structureText("1.1銆佽澶囧熀鏈厤缃�"); #region 璁惧埆鍩烘湰閰嶇疆琛� var basic_config_table = builder.StartTable(); Cell.SetFont(9); - Cell_v_merging_start.structureCell("绯荤粺鍚嶇О"); + Cell_v_merging_start.structureCell("璁惧鍚嶇О"); Cell_v_merging_start.structureCell("璁惧浣嶅彿"); Cell_v_merging_start.structureCell("璁惧鍨嬪彿"); - Cell.structureCell("璁惧鍨嬪彿"); Cell.structureCell("棰濆畾娴侀噺"); + Cell.structureCell("棰濆畾鎵▼"); Cell_v_merging_start.structureCell("椹卞姩鏂瑰紡"); Cell.structureCell("棰濆畾鐢靛帇"); Cell.structureCell("棰濆畾鐢垫祦"); @@ -167,8 +166,8 @@ Cell_v_merging_end.structureCell(""); Cell_v_merging_end.structureCell(""); Cell_v_merging_end.structureCell(""); + Cell.structureCell("Q(m鲁/ h)"); Cell.structureCell("H(m)"); - Cell.structureCell("Q(m鲁/h)"); Cell_v_merging_end.structureCell(""); Cell.structureCell("U(kV)"); Cell.structureCell("I(A)"); @@ -176,61 +175,39 @@ Cell.structureCell("cos蠁"); Cell.structureCell("r/m "); builder.EndRow(); - - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - builder.EndRow(); - - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - builder.EndRow(); - - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - builder.EndRow(); - + if (reportViewModel.Equipments != null) + { + foreach (var item in reportViewModel.Equipments) + { + Cell.structureCell(item.EquipmentName); + Cell.structureCell(item.EquipmentNumber); + Cell.structureCell(item.EquipmentMainName); + Cell.structureCell(item.RatedFlow); + Cell.structureCell(item.RatedHead); + Cell.structureCell(item.TypeOfDrive); + Cell.structureCell("鐢垫満椹卞姩"); + Cell.structureCell(item.RatedCurrent); + Cell.structureCell(item.RatedPower); + Cell.structureCell(item.RatedFactor); + Cell.structureCell(item.Speed); + builder.EndRow(); + } + } builder.EndTable(); basic_config_table.AllowAutoFit = false; Processing_pagination(src, builder, basic_config_table); #endregion 璁惧埆鍩烘湰閰嶇疆琛� - Text_left_12_black.structureText(" 1.2銆佽繍琛屽疄闄呮儏鍐�"); - Text_left_12_black.structureText(" 1.2.1 寰幆姘存车绔欒繍琛岀姸鍐�"); + Text_left_12_black.structureLeft20Text("1.2銆佽繍琛屽疄闄呮儏鍐�"); + Text_left_12_black.structureLeft20Text("1.2.1 寰幆姘存车绔欒繍琛岀姸鍐�"); #region 寰幆姘存车绔欒繍琛岀姸鍐佃〃 var pumpingStation_run_table = builder.StartTable(); Cell.SetFont(9); - Cell_v_merging_start.structureCell("绯荤粺鍚嶇О"); - Cell_v_merging_start.structureCell("璁惧埆浣嶅彿"); + Cell_v_merging_start.structureCell("璁惧鍚嶇О"); + Cell_v_merging_start.structureCell("璁惧浣嶅彿"); Cell_h_merging_start.structureCell("娉�"); Cell_h_merging_end.structureCell(""); Cell_h_merging_start.structureCell("鐢垫満"); @@ -247,8 +224,8 @@ Cell.structureCell("杩愯鐢垫祦"); Cell.structureCell("鍔熺巼"); Cell.structureCell("鎬荤娴侀噺"); - Cell.structureCell("渚涙按鍘嬪姏鏍囬珮"); - Cell.structureCell("鍥炲姏鍘嬪姏鏍囬珮"); + Cell.structureCell("渚涙按鍘嬪姏/鏍囬珮"); + Cell.structureCell("鍥炴按鍘嬪姏/鏍囬珮"); builder.EndRow(); Cell_v_merging_end.structureCell(""); @@ -261,51 +238,36 @@ Cell.structureCell("MPa/m"); Cell.structureCell("MPa/m"); builder.EndRow(); + if (reportViewModel.PumpStations != null) + { + foreach (var item in reportViewModel.PumpStations) + { + Cell.structureCell(item.EquipmentName); + Cell.structureCell(item.EquipmentNumber); + Cell.structureCell(item.OutletPressure); + Cell.structureCell(item.OutletValveOpening); + Cell.structureCell(item.RunningCurrent); + Cell.structureCell(item.Power); + Cell.structureCell(item.TotalFlow); + Cell.structureCell(item.SuppyPressure); + Cell.structureCell(item.ReturnPressure); + builder.EndRow(); + } + } - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - builder.EndRow(); - - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - builder.EndRow(); - - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); builder.EndTable(); pumpingStation_run_table.AllowAutoFit = false; Processing_pagination(src, builder, pumpingStation_run_table); #endregion 寰幆姘存车绔欒繍琛岀姸鍐佃〃 - Text_left_12_black.structureText(" 1.2.2 鍐峰嵈濉旇繍琛岀姸鍐�"); + Text_left_12_black.structureLeft20Text("1.2.2 鍐峰嵈濉旇繍琛岀姸鍐�"); #region 鍐峰嵈濉旇繍琛岀姸鍐佃〃 var coolingtower_run_table = builder.StartTable(); Cell.SetFont(9); - Cell_v_merging_start.structureCell("绯荤粺鍚嶇О"); + Cell_v_merging_start.structureCell("璁惧鍚嶇О"); Cell_v_merging_start.structureCell("璁惧浣嶅彿"); Cell.structureCell("涓婂绠″緞"); Cell.structureCell("涓婂闃�寮�搴�"); @@ -364,13 +326,13 @@ #endregion 鍐峰嵈濉旇繍琛岀姸鍐佃〃 - Text_left_12_black.structureText(" 1.2.3 鏈鎹㈢儹鍣ㄨ繍琛岀姸鍐�"); + Text_left_12_black.structureLeft20Text("1.2.3 鏈鎹㈢儹鍣ㄨ繍琛岀姸鍐�"); #region 鏈鎹㈢儹鍣ㄨ繍琛岀姸鍐佃〃 var end_heatExchanger_run_table = builder.StartTable(); Cell.SetFont(9); - Cell_v_merging_start.structureCell("绯荤粺鍚嶇О"); + Cell_v_merging_start.structureCell("璁惧鍚嶇О"); Cell_v_merging_start.structureCell("璁惧浣嶅彿"); Cell.structureCell("渚涘洖姘寸寰�"); Cell.structureCell("渚涙按闂稿紑搴�"); @@ -473,11 +435,11 @@ #endregion 鏈鎹㈢儹鍣ㄨ繍琛岀姸鍐佃〃 Text_left_15_black.structureText("浜岋級\t杩愯鎯呭喌涓庤兘鑰楀垎鏋�"); - Text_left_12_black.structureText(" 2.1銆佽繍琛屾ā寮忓強杩愯鏃堕棿"); - Text_left_12_black.structureText(string.Format(" 鍏ㄥ勾锛歿0}", _run_mode)); - Text_left_12_black.structureText(string.Format(" 骞村钩鍧囪繍琛屾椂闂存寜锛歿0}", _avg_runtime_mode)); - Text_left_12_black.structureText(" 2.2銆佽繍琛屾儏鍐靛強鑳借�楃粺璁�"); - Text_left_12_black.structureText(" 鏍规嵁瀹炴祴鍙傛暟銆佹祦浣撹緭閫佸伐绋嬪澶嶆牳锛屾湰寰幆姘寸郴缁熺洰鍓嶅悇绉嶈繍琛屾柟寮忕殑瀹為檯鑳借�楁儏鍐靛涓嬭〃锛�"); + Text_left_12_black.structureLeft20Text("2.1銆佽繍琛屾ā寮忓強杩愯鏃堕棿"); + Text_left_12_black.structureLeft20Text(string.Format("鍏ㄥ勾:{0}", _run_mode)); + Text_left_12_black.structureLeft20Text(string.Format("骞村钩鍧囪繍琛屾椂闂�:鎸墈0}", _avg_runtime_mode)); + Text_left_12_black.structureLeft20Text("2.2銆佽繍琛屾儏鍐靛強鑳借�楃粺璁�"); + Text_left_12_black.structureLeft20Text("鏍规嵁瀹炴祴鍙傛暟銆佹祦浣撹緭閫佸伐绋嬪澶嶆牳,鏈惊鐜按绯荤粺鐩墠鍚勭杩愯鏂瑰紡鐨勫疄闄呰兘鑰楁儏鍐靛涓嬭〃锛�"); #region 瀹為檯鑳借�楁儏鍐佃〃 @@ -495,23 +457,17 @@ Cell.structureCell("骞磋�楃數閲忥紙涓噆W.h)"); builder.EndRow(); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - builder.EndRow(); - - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - builder.EndRow(); - - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - builder.EndRow(); + if (reportViewModel.PowerConsumptionInfos != null) + { + foreach (var item in reportViewModel.PowerConsumptionInfos) + { + Cell.structureCell(item.RunMode); + Cell.structureCell(item.PreTechPowerConsumption); + Cell.structureCell(item.AnnualRunningHours); + Cell.structureCell(item.AnnualPowerConsumption); + builder.EndRow(); + } + } Cell.structureCell("鍚堣"); Cell.structureCell(""); @@ -523,87 +479,109 @@ #endregion 瀹為檯鑳借�楁儏鍐佃〃 - Text_left_12_black.structureText(" 2.3銆侀珮鑳借�楀垎鏋�"); - Text_left_12_black.structureText(" 閫氳繃瀵圭郴缁熻繍琛屽伐鍐佃繘琛屾娴嬪垎鏋愶紝璁や负璇ョ郴缁熷瓨鍦� 鈥滀綆鏁堢巼銆侀珮鑳借�椻�濈幇璞°�備富瑕佽〃鐜板湪浠ヤ笅鏂归潰锛�"); - Text_left_12_black.structureText(" 1锛夋按娉电壒鎬т笌绠$綉鐗规�т笉鐩稿尮閰嶏紝閫犳垚姘存车鍋忕璁捐宸ュ喌杩愯锛屽叾瀹為檯杩愯鏁堢巼涓嬮檷锛岄�犳垚杈冨鐨勬棤鏁堣兘鑰楋紝澶勪簬涓嶇粡娴庤繍琛岀姸鎬侊紱鑰屽綋鍓嶅惊鐜按宸ュ喌鍙堝苟闈炴槸绯荤粺鐨勬渶浣崇姸鎬侊紝浼樺寲绠$綉闃绘姉鏁村悎杩愯鍙傛暟锛屽皢浣挎湰绯荤粺鍏锋湁杈冨ぇ鐨勮妭鑳界┖闂淬��"); - Text_left_12_black.structureText(" 2锛夋按娉垫�ц兘鏇茬嚎鍜岀缃戠壒鎬ф洸绾夸笉鐩稿尮閰嶏紝鍦ㄦ按绯荤粺鍦ㄨ緭閫佽繃绋嬩腑瀛樺湪闂榾璋冭妭闃诲姏锛屽鍔犱簡杈撻�佽繃绋嬩腑鐨勬棤鏁堣兘鑰楋紝闄嶄綆姘寸郴缁熺殑杈撻�佹晥鐜囷紱闇�瑕侀噸鏂板绯荤粺杩涜寤烘ā鍒嗘瀽锛岄檷浣庣郴缁熼樆鍔涳紝浼樺寲姘存车鎵▼銆�"); - Text_left_12_black.structureText(" 3锛夌己涔忔妧鏈墜娈靛鎹㈢儹璁惧杩涜閲忓寲璋冭妭锛屾祦閲忚繃澶у瓨鍦ㄦ氮璐广�傞�氳繃璋冭瘯骞堕厤缃紭鍖栵紝瀵规崲鐑櫒瀹氶噺鍒嗘瀽锛屽埗瀹氭崲鐑櫒杩愯鍚堢悊鏂规锛屾敼鎹㈢儹鍣ㄤ负瀹氶噺鎺у埗锛屾渶缁堟秷闄ゆ棤鏁堟祦閲忥紝浣跨郴缁熷鍦ㄤ紭鑹姸鎬佷笅杩愯銆�"); + Text_left_12_black.structureLeft20Text("2.3銆侀珮鑳借�楀垎鏋�"); + Text_left_12_black.structureLeft20Text("閫氳繃瀵圭郴缁熻繍琛屽伐鍐佃繘琛屾娴嬪垎鏋愶紝璁や负璇ョ郴缁熷瓨鍦� 鈥滀綆鏁堢巼銆侀珮鑳借�椻�濈幇璞°�備富瑕佽〃鐜板湪浠ヤ笅鏂归潰锛�"); + Text_left_12_black.structureLeft20Text("1锛夋按娉电壒鎬т笌绠$綉鐗规�т笉鐩稿尮閰嶏紝閫犳垚姘存车鍋忕璁捐宸ュ喌杩愯锛屽叾瀹為檯杩愯鏁堢巼涓嬮檷锛岄�犳垚杈冨鐨勬棤鏁堣兘鑰楋紝澶勪簬涓嶇粡娴庤繍琛岀姸鎬侊紱鑰屽綋鍓嶅惊鐜按宸ュ喌鍙堝苟闈炴槸绯荤粺鐨勬渶浣崇姸鎬侊紝浼樺寲绠$綉闃绘姉鏁村悎杩愯鍙傛暟锛屽皢浣挎湰绯荤粺鍏锋湁杈冨ぇ鐨勮妭鑳界┖闂淬��"); + Text_left_12_black.structureLeft20Text("2锛夋按娉垫�ц兘鏇茬嚎鍜岀缃戠壒鎬ф洸绾夸笉鐩稿尮閰嶏紝鍦ㄦ按绯荤粺鍦ㄨ緭閫佽繃绋嬩腑瀛樺湪闂榾璋冭妭闃诲姏锛屽鍔犱簡杈撻�佽繃绋嬩腑鐨勬棤鏁堣兘鑰楋紝闄嶄綆姘寸郴缁熺殑杈撻�佹晥鐜囷紱闇�瑕侀噸鏂板绯荤粺杩涜寤烘ā鍒嗘瀽锛岄檷浣庣郴缁熼樆鍔涳紝浼樺寲姘存车鎵▼銆�"); + Text_left_12_black.structureLeft20Text("3锛夌己涔忔妧鏈墜娈靛鎹㈢儹璁惧杩涜閲忓寲璋冭妭锛屾祦閲忚繃澶у瓨鍦ㄦ氮璐广�傞�氳繃璋冭瘯骞堕厤缃紭鍖栵紝瀵规崲鐑櫒瀹氶噺鍒嗘瀽锛屽埗瀹氭崲鐑櫒杩愯鍚堢悊鏂规锛屾敼鎹㈢儹鍣ㄤ负瀹氶噺鎺у埗锛屾渶缁堟秷闄ゆ棤鏁堟祦閲忥紝浣跨郴缁熷鍦ㄤ紭鑹姸鎬佷笅杩愯銆�"); Text_left_15_black.structureText("涓夛級\t鑺傝兘鎶�鏀规柟妗堜笌璁捐鎸囨爣"); - Text_left_12_black.structureText(" 3.1銆佽璁′緷鎹�"); - Text_left_12_black.structureText(" 3.1.1 寰幆姘存车杩愯鍔熺巼锛氭牴鎹笁鐩稿紓姝ョ數鍔ㄦ満杩愯鍔熺巼璁$畻鍏紡P=鈭�3脳U脳I脳cos蠁锛屼篃鍙互鎸夌収杩愯涓�娈垫椂闂村唴鐢靛害琛ㄦ湁鍔熷姛鐜囩粺璁″緱鍑猴紱"); - Text_left_12_black.structureText(" 3.1.2 姘存车鎬诲帇鍔涳紙鎵▼锛夎绠楀叕寮忥細"); - Text_left_12_black.structureText(" H=锛坧鍑猴紞p杩涳級脳102锛嬶紙鍑哄彛琛ㄩ珮锛嶈繘鍙f恫浣嶉珮锛夛紝鍐嶈�冭檻杩涘嚭鍙f祦閫熷彉鍖栫殑鍔ㄨ兘鎹熻�椼��"); - Text_left_12_black.structureText(" 3.1.3 閫氳繃姘存车鎬ц兘鏇茬嚎妯℃嫙锛屾按娉佃繍琛屽湪涓�瀹氱殑宸ュ喌涓嬶紝鍏舵祦閲廞銆佹壃绋婬銆佸姛鐜嘝銆佹晥鐜囄风浉瀵瑰簲锛涘疄闄呮�ц兘涓庢爣鍑嗘�ц兘涓�鑸樊寮傦紙涓昏涓烘晥鐜囄锋寚鏍囷級"); - Text_left_12_black.structureText(" 3.1.4 绠¤矾绯荤粺鍘嬪姏闄嶆崲绠楀熀鏈叕寮忥紙i浠h〃鍗曚綅绫抽暱搴︾閬撲笂娌跨▼闃诲姏绯绘暟锛�"); + Text_left_12_black.structureLeft20Text("3.1銆佽璁′緷鎹�"); + Text_left_12_black.structureLeft20Text("3.1.1 寰幆姘存车杩愯鍔熺巼锛氭牴鎹笁鐩稿紓姝ョ數鍔ㄦ満杩愯鍔熺巼璁$畻鍏紡P=鈭�3脳U脳I脳cos蠁锛屼篃鍙互鎸夌収杩愯涓�娈垫椂闂村唴鐢靛害琛ㄦ湁鍔熷姛鐜囩粺璁″緱鍑猴紱"); + Text_left_12_black.structureLeft20Text("3.1.2 姘存车鎬诲帇鍔涳紙鎵▼锛夎绠楀叕寮忥細"); + Text_left_12_black.structureLeft20Text("H=锛坧鍑猴紞p杩涳級脳102锛嬶紙鍑哄彛琛ㄩ珮锛嶈繘鍙f恫浣嶉珮锛夛紝鍐嶈�冭檻杩涘嚭鍙f祦閫熷彉鍖栫殑鍔ㄨ兘鎹熻�椼��"); + Text_left_12_black.structureLeft20Text("3.1.3 閫氳繃姘存车鎬ц兘鏇茬嚎妯℃嫙锛屾按娉佃繍琛屽湪涓�瀹氱殑宸ュ喌涓嬶紝鍏舵祦閲廞銆佹壃绋婬銆佸姛鐜嘝銆佹晥鐜囄风浉瀵瑰簲锛涘疄闄呮�ц兘涓庢爣鍑嗘�ц兘涓�鑸樊寮傦紙涓昏涓烘晥鐜囄锋寚鏍囷級"); + Text_left_12_black.structureLeft20Text("3.1.4 绠¤矾绯荤粺鍘嬪姏闄嶆崲绠楀熀鏈叕寮忥紙i浠h〃鍗曚綅绫抽暱搴︾閬撲笂娌跨▼闃诲姏绯绘暟锛�"); + // 鎻掑叆鍥剧墖 - builder.Write(" "); - Text_left_12_black.structureTextAndImage("assets\\Pressure_conversion_formula_big1.2.png", 30, 150); - builder.Write(" "); - Text_left_12_black.structureTextAndImage("assets\\Pressure_conversion_formula_small1.2.png", 35, 220); - Text_left_12_black.structureText(" 3.1.5 灞�閮ㄩ樆鍔涜绠楀叕寮�"); - builder.Write(" "); - Text_left_12_black.structureTextAndImage("assets\\Local_resistance.png", 35, 60); - Text_left_12_black.structureText(" 3.1.6 闃�闂ㄥ紑搴︿笌灞�閮ㄩ樆鍔涚郴鏁板叧绯伙紙鍙傝�冿級"); + // builder.Write(" "); + + Text_left_12_black.structureTextAndImage("00-core\\Pressure_conversion_formula_big1.2.png", 30, 150); + // builder.Write(" "); + Text_left_12_black.structureTextAndImage("00-core\\Pressure_conversion_formula_small1.2.png", 35, 220); + Text_left_12_black.structureLeft20Text("3.1.5 灞�閮ㄩ樆鍔涜绠楀叕寮�"); + // builder.Write(" "); + Text_left_12_black.structureTextAndImage("00-core\\Local_resistance.png", 35, 60); + Text_left_12_black.structureLeft20Text("3.1.6 闃�闂ㄥ紑搴︿笌灞�閮ㄩ樆鍔涚郴鏁板叧绯伙紙鍙傝�冿級"); #region 闃�闂ㄥ紑搴︿笌灞�閮ㄩ樆鍔涚郴鏁板叧绯昏〃 var Opening_resistance_table = builder.StartTable(); Cell.SetFont(9); Cell.structureCell("寮�搴ξ�"); - Cell.structureCell("90"); - Cell.structureCell("80"); - Cell.structureCell("70"); - Cell.structureCell("60"); - Cell.structureCell("55"); - Cell.structureCell("50"); - Cell.structureCell("45"); - Cell.structureCell("40"); - Cell.structureCell("35"); - Cell.structureCell("30"); - Cell.structureCell("25"); - Cell.structureCell("20"); - Cell.structureCell("15"); - Cell.structureCell("10"); - builder.EndRow(); - Cell.structureCell("尉"); - Cell.structureCell("0.22"); - Cell.structureCell("0.45"); - Cell.structureCell("1.18"); - Cell.structureCell("3.25"); - Cell.structureCell("5.50"); - Cell.structureCell("9.27"); - Cell.structureCell("15.0"); - Cell.structureCell("26.8"); - Cell.structureCell("45.0"); - Cell.structureCell("79.2"); - Cell.structureCell("152"); - Cell.structureCell("332"); - Cell.structureCell("945"); - Cell.structureCell("3620"); + if (reportViewModel.ValveOpens != null) + { + foreach (var item in reportViewModel.ValveOpens) + { + Cell.structureCell(item.Name); + } + builder.EndRow(); + Cell.structureCell("尉"); + foreach (var item in reportViewModel.ValveOpens) + { + Cell.structureCell(item.MinorLoss); + } + builder.EndRow(); + } + else + { + Cell.structureCell("寮�搴ξ�"); + Cell.structureCell("90"); + Cell.structureCell("80"); + Cell.structureCell("70"); + Cell.structureCell("60"); + Cell.structureCell("55"); + Cell.structureCell("50"); + Cell.structureCell("45"); + Cell.structureCell("40"); + Cell.structureCell("35"); + Cell.structureCell("30"); + Cell.structureCell("25"); + Cell.structureCell("20"); + Cell.structureCell("15"); + Cell.structureCell("10"); + builder.EndRow(); + + Cell.structureCell("尉"); + Cell.structureCell("0.22"); + Cell.structureCell("0.45"); + Cell.structureCell("1.18"); + Cell.structureCell("3.25"); + Cell.structureCell("5.50"); + Cell.structureCell("9.27"); + Cell.structureCell("15.0"); + Cell.structureCell("26.8"); + Cell.structureCell("45.0"); + Cell.structureCell("79.2"); + Cell.structureCell("152"); + Cell.structureCell("332"); + Cell.structureCell("945"); + Cell.structureCell("3620"); + } builder.EndTable(); Opening_resistance_table.AllowAutoFit = false; Processing_pagination(src, builder, Opening_resistance_table); #endregion 闃�闂ㄥ紑搴︿笌灞�閮ㄩ樆鍔涚郴鏁板叧绯昏〃 - Text_left_12_black.structureText(" 3.2銆佽璁¤繃绋�"); - Text_left_12_black.structureText(" 绉戠淮鍏徃閲囩敤娴佷綋杈撻�丟o.Well鎶�鏈妫�娴嬫暟鎹繘琛岀郴缁熷垎鏋愩�佺爺绌讹紝缁撳悎鐢熶骇宸ヨ壓鐗瑰緛锛岃璁℃湰寰幆姘寸郴缁熻繃绋嬭兘閲忎紭鍖栬В鍐虫柟妗堛��"); - Text_left_12_black.structureText(" 1锛夐�氳繃鍒嗘瀽绯荤粺瑁呯疆鐑礋鑽蜂互鍙婂伐鑹虹壒鐐癸紝鎸夌粡娴庝緵鍥炴按娓╁樊鍘熷垯鍙婁緵姘村帇鍔涗笌璁捐鍘嬪姏姣旇緝锛屽垽鏂祦閲忕殑鍚堢悊鎬э紝骞剁‘瀹氬悎鐞嗘祦閲忥紝鍋氬埌鈥滆缃晶鍚堢悊鐢ㄦ按銆佹车绔欎晶楂樻晥渚涙按锛岄檷浣庢按閫佽兘鑰楁寚鏍囷紱"); - Text_left_12_black.structureText(" 2锛夊鎹㈢儹鍣ㄥ強鍐峰嵈濉旂殑鐑伐鎬ц兘杩涜璇勪及锛岄拡瀵规�ч�夋嫨鎻愰珮鍐峰嵈鏁堟灉鐨勬敼閫犳柟妗堬紝浠ョ‘淇濈粡娴庝緵鍥炴按娓╁樊瀹炵幇鐨勫彲琛屾�э紱"); - Text_left_12_black.structureText(" 3锛夎繍鐢ㄨ绠楁満妯℃嫙鎶�鏈垎鏋愮缃戞按鍔涜妭鐐瑰钩琛★紝寰楀埌鍙疄鐜扮殑鏈�浼樼缃戞�ц兘鏇茬嚎锛屽嵆鐩稿簲娴侀噺涓嬫墍瀵瑰簲瀹為檯闇�瑕佺殑鏈�灏忛樆鍔涳紝闄嶄綆绯荤粺绠$綉闃绘姉锛屾彁楂樼缃戣繍琛屾晥鐜囷紱"); - Text_left_12_black.structureText(" 4锛夐�氳繃瀵规车绔欏師鏈夊悇绉嶈繍琛屾ā寮忕殑宸ュ喌鍒嗘瀽锛屽垽鏂數鏈哄強姘存车鐨勫疄闄呰繍琛屾晥鐜囨槸鍚﹂珮鏁堬紝骞剁粨鍚堣缃晶鎵�闇�鐨勬妧鏈弬鏁拌姹傦紝鎻愬嚭鏈�浼樼殑娉电粍鎼厤杩愯妯″紡鍙婅繍琛屽弬鏁帮紝纭畾楂樻晥鑺傝兘娉靛弬鏁拌璁″�硷紝鍋氬ソ娉电珯浼樺寲璁捐锛�"); - Text_left_12_black.structureText(" 5锛夊�熷姪涓夊厓娴佺悊璁猴紝閲囩敤鍥藉鏈�鍏堣繘鐨勨�淐FD鈥濅豢鐪熸ā鎷熸妧鏈紝閫氳繃绮剧‘妯℃嫙锛岃璁″嚭鏈�浼樺寲鐨勬按鍔涙ā鍨嬶紝纭繚ECOWELL楂樻晥娉垫�ц兘鍙潬銆佽繍琛岀ǔ瀹氾紝骞剁‘淇濆湪鍚勭杩愯妯″紡涓嬪潎澶勪簬楂樻晥杩愯銆�"); + Text_left_12_black.structureLeft20Text("3.2銆佽璁¤繃绋�"); + Text_left_12_black.structureLeft20Text("绉戠淮鍏徃閲囩敤娴佷綋杈撻�丟o.Well鎶�鏈妫�娴嬫暟鎹繘琛岀郴缁熷垎鏋愩�佺爺绌讹紝缁撳悎鐢熶骇宸ヨ壓鐗瑰緛锛岃璁℃湰寰幆姘寸郴缁熻繃绋嬭兘閲忎紭鍖栬В鍐虫柟妗堛��"); + Text_left_12_black.structureLeft20Text("1锛夐�氳繃鍒嗘瀽绯荤粺瑁呯疆鐑礋鑽蜂互鍙婂伐鑹虹壒鐐癸紝鎸夌粡娴庝緵鍥炴按娓╁樊鍘熷垯鍙婁緵姘村帇鍔涗笌璁捐鍘嬪姏姣旇緝锛屽垽鏂祦閲忕殑鍚堢悊鎬э紝骞剁‘瀹氬悎鐞嗘祦閲忥紝鍋氬埌鈥滆缃晶鍚堢悊鐢ㄦ按銆佹车绔欎晶楂樻晥渚涙按锛岄檷浣庢按閫佽兘鑰楁寚鏍囷紱"); + Text_left_12_black.structureLeft20Text("2锛夊鎹㈢儹鍣ㄥ強鍐峰嵈濉旂殑鐑伐鎬ц兘杩涜璇勪及锛岄拡瀵规�ч�夋嫨鎻愰珮鍐峰嵈鏁堟灉鐨勬敼閫犳柟妗堬紝浠ョ‘淇濈粡娴庝緵鍥炴按娓╁樊瀹炵幇鐨勫彲琛屾�э紱"); + Text_left_12_black.structureLeft20Text("3锛夎繍鐢ㄨ绠楁満妯℃嫙鎶�鏈垎鏋愮缃戞按鍔涜妭鐐瑰钩琛★紝寰楀埌鍙疄鐜扮殑鏈�浼樼缃戞�ц兘鏇茬嚎锛屽嵆鐩稿簲娴侀噺涓嬫墍瀵瑰簲瀹為檯闇�瑕佺殑鏈�灏忛樆鍔涳紝闄嶄綆绯荤粺绠$綉闃绘姉锛屾彁楂樼缃戣繍琛屾晥鐜囷紱"); + Text_left_12_black.structureLeft20Text("4锛夐�氳繃瀵规车绔欏師鏈夊悇绉嶈繍琛屾ā寮忕殑宸ュ喌鍒嗘瀽锛屽垽鏂數鏈哄強姘存车鐨勫疄闄呰繍琛屾晥鐜囨槸鍚﹂珮鏁堬紝骞剁粨鍚堣缃晶鎵�闇�鐨勬妧鏈弬鏁拌姹傦紝鎻愬嚭鏈�浼樼殑娉电粍鎼厤杩愯妯″紡鍙婅繍琛屽弬鏁帮紝纭畾楂樻晥鑺傝兘娉靛弬鏁拌璁″�硷紝鍋氬ソ娉电珯浼樺寲璁捐锛�"); + Text_left_12_black.structureLeft20Text("5锛夊�熷姪涓夊厓娴佺悊璁猴紝閲囩敤鍥藉鏈�鍏堣繘鐨勨�淐FD鈥濅豢鐪熸ā鎷熸妧鏈紝閫氳繃绮剧‘妯℃嫙锛岃璁″嚭鏈�浼樺寲鐨勬按鍔涙ā鍨嬶紝纭繚ECOWELL楂樻晥娉垫�ц兘鍙潬銆佽繍琛岀ǔ瀹氾紝骞剁‘淇濆湪鍚勭杩愯妯″紡涓嬪潎澶勪簬楂樻晥杩愯銆�"); - Text_left_12_black.structureText(" 3.3銆佹车绔欓儴鍒嗚妭鑳借璁℃寚鏍囦笌鎶�鏀规柟妗�"); - Text_left_12_black.structureText(" 3.3.1 鎶�鏀瑰悗璁惧閰嶇疆鎯呭喌"); + Text_left_12_black.structureLeft20Text("3.3銆佹车绔欓儴鍒嗚妭鑳借璁℃寚鏍囦笌鎶�鏀规柟妗�"); + Text_left_12_black.structureLeft20Text("3.3.1 鎶�鏀瑰悗璁惧閰嶇疆鎯呭喌"); + Text_left_12_black.AddBlankLine(); #region 璁惧閰嶇疆鎯呭喌琛� var Device_configuration_table = builder.StartTable(); Cell.SetFont(9); - Cell_v_merging_start.structureCell("绯荤粺鍚嶇О"); + Cell_v_merging_start.structureCell("璁惧鍚嶇О"); Cell_v_merging_start.structureCell("璁惧浣嶅彿"); Cell_v_merging_start.structureCell("璁惧鍨嬪彿"); Cell_v_merging_start.structureCell("鍙版暟"); @@ -630,61 +608,37 @@ Cell.structureCell("cos蠁"); Cell.structureCell("r/m"); builder.EndRow(); - - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - builder.EndRow(); - - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - builder.EndRow(); - - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - builder.EndRow(); + if (reportViewModel.AfterEquipments != null) + { + foreach (var item in reportViewModel.AfterEquipments) + { + Cell.structureCell(item.EquipmentName); + Cell.structureCell(item.EquipmentNumber); + Cell.structureCell(item.EquipmentMainName); + Cell.structureCell(item.RatedFlow); + Cell.structureCell(item.RatedHead); + Cell.structureCell(item.TypeOfDrive); + Cell.structureCell("鐢垫満椹卞姩"); + Cell.structureCell(item.RatedCurrent); + Cell.structureCell(item.RatedPower); + Cell.structureCell(item.RatedFactor); + Cell.structureCell(item.Speed); + builder.EndRow(); + } + } builder.EndTable(); Device_configuration_table.AllowAutoFit = false; Processing_pagination(src, builder, Device_configuration_table); #endregion 璁惧閰嶇疆鎯呭喌琛� - Text_left_12_black.structureText(" 3.3.2 鎶�鏀瑰悗璁惧棰勮杩愯鐘跺喌"); + Text_left_12_black.structureLeft20Text("3.3.2 鎶�鏀瑰悗璁惧棰勮杩愯鐘跺喌"); #region 棰勮杩愯鐘跺喌琛� var estimated_running_table = builder.StartTable(); Cell.SetFont(9); - Cell_v_merging_start.structureCell("绯荤粺鍚嶇О"); + Cell_v_merging_start.structureCell("璁惧鍚嶇О"); Cell_v_merging_start.structureCell("璁惧浣嶅彿"); Cell_h_merging_start.structureCell("娉�"); Cell_h_merging_end.structureCell(""); @@ -716,39 +670,22 @@ Cell.structureCell("MPa/m"); Cell.structureCell("MPa/m"); builder.EndRow(); - - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - builder.EndRow(); - - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - builder.EndRow(); - - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - builder.EndRow(); + if (reportViewModel.AfterPumpStations != null) + { + foreach (var item in reportViewModel.AfterPumpStations) + { + Cell.structureCell(item.EquipmentName); + Cell.structureCell(item.EquipmentNumber); + Cell.structureCell(item.OutletPressure); + Cell.structureCell(item.OutletValveOpening); + Cell.structureCell(item.RunningCurrent); + Cell.structureCell(item.Power); + Cell.structureCell(item.TotalFlow); + Cell.structureCell(item.SuppyPressure); + Cell.structureCell(item.ReturnPressure); + builder.EndRow(); + } + } builder.EndTable(); //estimated_running_table.AllowAutoFit = false; //builder.ParagraphFormat.KeepWithNext = true; @@ -756,13 +693,13 @@ #endregion 棰勮杩愯鐘跺喌琛� - Text_left_12_black.structureText(" 3.3.3 鏈鎹㈢儹鍣ㄩ璁¤繍琛岀姸鍐�"); + Text_left_12_black.structureLeft20Text("3.3.3 鏈鎹㈢儹鍣ㄩ璁¤繍琛岀姸鍐�"); #region 鏈鎹㈢儹鍣ㄩ璁¤繍琛岀姸鍐佃〃 var estimatedendRun_table = builder.StartTable(); Cell.SetFont(9); - Cell_v_merging_start.structureCell("绯荤粺鍚嶇О"); + Cell_v_merging_start.structureCell("璁惧鍚嶇О"); Cell_v_merging_start.structureCell("璁惧浣嶅彿"); Cell.structureCell("渚涘洖姘寸寰�"); Cell.structureCell("渚涙按闂稿紑搴�"); @@ -864,7 +801,7 @@ #endregion 鏈鎹㈢儹鍣ㄩ璁¤繍琛岀姸鍐佃〃 - Text_left_12_black.structureText(" 3.3.2 鎶�鏀瑰悗鍚勮繍琛屾ā寮忎笅璁惧棰勮鑺傜數鎯呭喌"); + Text_left_12_black.structureLeft20Text("3.3.2 鎶�鏀瑰悗鍚勮繍琛屾ā寮忎笅璁惧棰勮鑺傜數鎯呭喌"); #region 璁惧棰勮鑺傜數鎯呭喌琛� @@ -882,23 +819,17 @@ Cell.structureCell("鏀瑰悗骞磋�楃數閲忥紙涓噆W.h)"); builder.EndRow(); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - builder.EndRow(); - - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - builder.EndRow(); - - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - builder.EndRow(); + if (reportViewModel.AfterPowerConsumptionInfos != null) + { + foreach (var item in reportViewModel.AfterPowerConsumptionInfos) + { + Cell.structureCell(item.RunMode); + Cell.structureCell(item.PreTechPowerConsumption); + Cell.structureCell(item.AnnualRunningHours); + Cell.structureCell(item.AnnualPowerConsumption); + builder.EndRow(); + } + } Cell.structureCell("鍚堣"); Cell.structureCell(""); @@ -910,18 +841,18 @@ #endregion 璁惧棰勮鑺傜數鎯呭喌琛� - Text_left_12_black.structureText(" 3.4銆佹妧鏀硅鏄�"); - Text_left_12_black.structureText(" 閽堝鍓嶈堪鐨勭郴缁熷瓨鍦ㄧ殑闂鍒嗘瀽锛岀洰鍓嶇郴缁熷湪浼樺寲杩愯鏂归潰杩樻湁杈冨ぇ鐨勬彁鍗囩┖闂达紝瀛樺湪杈冨ぇ鐨勮妭鑳芥綔鍔涳紝浠庢暣浣撲笂鎻愬嚭浠ヤ笅瑙e喅鏂规锛�"); - Text_left_12_black.structureText(" a銆佷紭鍖栨按娉靛尮閰嶅疄鐜拌妭鑳斤紱"); - Text_left_12_black.structureText(" b銆佹敼鍠勬按娉垫皵铓�瀹炵幇鑺傝兘锛�"); - Text_left_12_black.structureText(" c銆佹彁楂樻按娉佃繍琛屾晥鐜囪妭鑳斤紱"); - Text_left_12_black.structureText(" d銆佸疄鐜板悎鐞嗕緵姘达紝璋冩暣姘村姏骞宠 锛屼紭鍖栨瘝绠′緵銆佸洖姘村帇鍔涳紝闄嶄綆闃诲姏瀹炵幇鑺傝兘锛�"); + Text_left_12_black.structureLeft20Text("3.4銆佹妧鏀硅鏄�"); + Text_left_12_black.structureLeft20Text("閽堝鍓嶈堪鐨勭郴缁熷瓨鍦ㄧ殑闂鍒嗘瀽锛岀洰鍓嶇郴缁熷湪浼樺寲杩愯鏂归潰杩樻湁杈冨ぇ鐨勬彁鍗囩┖闂达紝瀛樺湪杈冨ぇ鐨勮妭鑳芥綔鍔涳紝浠庢暣浣撲笂鎻愬嚭浠ヤ笅瑙e喅鏂规锛�"); + Text_left_12_black.structureLeft20Text("a銆佷紭鍖栨按娉靛尮閰嶅疄鐜拌妭鑳斤紱"); + Text_left_12_black.structureLeft20Text("b銆佹敼鍠勬按娉垫皵铓�瀹炵幇鑺傝兘锛�"); + Text_left_12_black.structureLeft20Text("c銆佹彁楂樻按娉佃繍琛屾晥鐜囪妭鑳斤紱"); + Text_left_12_black.structureLeft20Text("d銆佸疄鐜板悎鐞嗕緵姘达紝璋冩暣姘村姏骞宠 锛屼紭鍖栨瘝绠′緵銆佸洖姘村帇鍔涳紝闄嶄綆闃诲姏瀹炵幇鑺傝兘锛�"); Text_left_15_black.structureText("鍥涳級\t椤圭洰鑺傜數鏁堢泭鍒嗘瀽"); - Text_left_12_black.structureText(" 4.1銆佹瘡骞磋妭鐢甸噺"); - Text_left_12_black.structureText(string.Format(" 鎸墈0}鍏徃寰幆姘寸郴缁熷勾骞冲潎杩愯{1}灏忔椂璁★紝鍒欑郴缁熷勾鑺傜數閲忥細", _Company_1, _Avg_Hour)); - Text_left_12_black.structureText(string.Format(" 绯荤粺骞磋妭鐢甸噺锛漿0}锛漿1}锛堜竾搴︼級", _Electricity, _Electricity_kWh)); - Text_left_12_black.structureText(" 4.2銆佽妭鐢佃绠楁眹鎬诲涓嬭〃"); + Text_left_12_black.structureLeft20Text("4.1銆佹瘡骞磋妭鐢甸噺"); + Text_left_12_black.structureLeft20Text(string.Format("鎸墈0}鍏徃寰幆姘寸郴缁熷勾骞冲潎杩愯{1}灏忔椂璁★紝鍒欑郴缁熷勾鑺傜數閲忥細", _Company_1, _Avg_Hour)); + Text_left_12_black.structureLeft20Text(string.Format("绯荤粺骞磋妭鐢甸噺锛漿0}锛漿1}锛堜竾搴︼級", _Electricity, _Electricity_kWh)); + Text_left_12_black.structureLeft20Text("4.2銆佽妭鐢佃绠楁眹鎬诲涓嬭〃"); #region 鑺傜數璁$畻姹囨�昏〃 @@ -943,13 +874,19 @@ Cell.structureCell("(h)"); builder.EndRow(); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - builder.EndRow(); + if (reportViewModel.PowerRelatedInfos != null) + { + foreach (var item in reportViewModel.PowerRelatedInfos) + { + Cell.structureCell(item.RunMode); + Cell.structureCell(item.PreTechPowerConsumption); + Cell.structureCell(item.PostTechDesignedPower); + Cell.structureCell(item.HourlyPowerSaving); + Cell.structureCell(item.PowerSavingRate); + Cell.structureCell(item.RunningTime); + builder.EndRow(); + } + } Cell_h_merging_start.structureCell("鍚堣骞磋妭鐢甸噺(涓囧害)"); Cell_h_merging_end.structureCell(""); @@ -963,41 +900,34 @@ #endregion 鑺傜數璁$畻姹囨�昏〃 - Text_left_15_black.structureText("浜旓級\t缁艰堪"); - Text_left_12_black.structureText(string.Format(" 鏈鏄湪绉戠淮鍏徃鎶�鏈汉鍛樹簬{0}瀵箋1}姘寸郴缁熻繘琛岃缁嗚皟鏌ャ�佹娴嬪熀纭�涓婏紝閲囩敤娴佷綋杈撻�丟o路well鎶�鏈妫�娴嬭祫鏂欒繘琛岀郴缁熷垎鏋愩�佺爺绌讹紝骞剁粨鍚堣绯荤粺杩愯鐨勮礋鑽锋儏鍐碉紝绮惧績璁捐鐨勮妭鑳芥妧鏀规柟妗堛��", _Time, _System)); - Text_left_12_black.structureText(string.Format(" 閫氳繃鎶�鏀硅妭鐢垫晥鏋滃涓嬶紙鎸夊勾杩愯(0)灏忔椂璁★級锛�", _Hour)); + Text_left_15_black.structureLeft20Text("浜旓級\t缁艰堪"); + Text_left_12_black.structureLeft20Text(string.Format("鏈鏄湪绉戠淮鍏徃鎶�鏈汉鍛樹簬{0}瀵箋1}姘寸郴缁熻繘琛岃缁嗚皟鏌ャ�佹娴嬪熀纭�涓婏紝閲囩敤娴佷綋杈撻�丟o路well鎶�鏈妫�娴嬭祫鏂欒繘琛岀郴缁熷垎鏋愩�佺爺绌讹紝骞剁粨鍚堣绯荤粺杩愯鐨勮礋鑽锋儏鍐碉紝绮惧績璁捐鐨勮妭鑳芥妧鏀规柟妗堛��", _Time, _System)); + Text_left_12_black.structureLeft20Text(string.Format("閫氳繃鎶�鏀硅妭鐢垫晥鏋滃涓嬶紙鎸夊勾杩愯(0)灏忔椂璁★級锛�", _Hour)); #region 璁惧棰勮鑺傜數鎯呭喌琛� var power_saving_effect_table = builder.StartTable(); Cell.SetFont(9); Cell.structureCell("搴忓彿"); - Cell.structureCell("绯荤粺鍚嶇О"); + Cell.structureCell("璁惧鍚嶇О"); Cell.structureCell("鎶�鏀瑰墠骞磋�楃數閲�(涓囧害/骞�)"); Cell.structureCell("鑺傜數鐜嘰r\n(%)"); Cell.structureCell("鏀瑰悗骞磋妭鐢甸噺\r\n(涓囧害/骞�)"); builder.EndRow(); - Cell.structureCell("1"); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - builder.EndRow(); - - Cell.structureCell("2"); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - builder.EndRow(); - - Cell.structureCell("3"); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - Cell.structureCell(""); - builder.EndRow(); + if (reportViewModel.AfterEquipmentPowers != null) + { + int i = 0; + foreach (var item in reportViewModel.AfterEquipmentPowers) + { + Cell.structureCell((i++).ToString()); + Cell.structureCell(item.EquipmentName); + Cell.structureCell(item.PowerConsumptionBeforeTech); + Cell.structureCell(item.PowerSavingRate); + Cell.structureCell(item.AnnualPowerSavingAfterTech); + builder.EndRow(); + } + } Cell.structureCell(""); Cell.structureCell("鍚堣"); @@ -1011,11 +941,11 @@ #endregion 璁惧棰勮鑺傜數鎯呭喌琛� - Text_left_12_black.structureText(" 蹇呴』閮戦噸鎸囧嚭锛屾湰妗堝睘娴佷綋杈撻�丟o路well鎶�鏈璁℃垚鏋滐紝浠呬綔涓烘湰绯荤粺鑺傝兘鎶�鏀规姇璧勫喅绛栧拰瀹炴柦鐨勪緷鎹��"); - Text_left_12_black.structureText(string.Format(" 鍦ㄦ锛岄潪甯告劅璋0}鍏徃鍚勯儴闂ㄩ瀵煎鑺傝兘宸ヤ綔鐨勯噸瑙嗗拰鏀寔锛岄潪甯告劅璋1}鍏徃鎶�鏈汉鍛樺妫�娴嬪伐浣滅殑澶у姏閰嶅悎锛屽苟鎻愪緵瀹濊吹璧勬枡鍙婄郴缁熸儏鍐点��", _Company_2, _Company_3)); + Text_left_12_black.structureLeft20Text("蹇呴』閮戦噸鎸囧嚭锛屾湰妗堝睘娴佷綋杈撻�丟o路well鎶�鏈璁℃垚鏋滐紝浠呬綔涓烘湰绯荤粺鑺傝兘鎶�鏀规姇璧勫喅绛栧拰瀹炴柦鐨勪緷鎹��"); + Text_left_12_black.structureLeft20Text(string.Format("鍦ㄦ锛岄潪甯告劅璋0}鍏徃鍚勯儴闂ㄩ瀵煎鑺傝兘宸ヤ綔鐨勯噸瑙嗗拰鏀寔锛岄潪甯告劅璋1}鍏徃鎶�鏈汉鍛樺妫�娴嬪伐浣滅殑澶у姏閰嶅悎锛屽苟鎻愪緵瀹濊吹璧勬枡鍙婄郴缁熸儏鍐点��", _Company_2, _Company_3)); Text_reight_10_black.structureText("娴欐睙绉戠淮鑺傝兘鎶�鏈偂浠芥湁闄愬叕鍙�"); - Text_reight_10_black.structureText(string.Format(" {0}骞磠1}鏈�", _Year, _month)); + Text_reight_10_black.structureLeft20Text(string.Format("{0}骞磠1}鏈�", _Year, _month)); doc.AppendDocument(src, Aspose.Words.ImportFormatMode.KeepSourceFormatting); } diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/SimulationWordReportHelper.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/SimulationWordReportHelper.cs index b0e612d..f8b4131 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/SimulationWordReportHelper.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/SimulationWordReportHelper.cs @@ -257,11 +257,34 @@ /// 鏋勫缓鏂囧瓧 /// </summary> /// <param name="content"></param> + public void structureLeft20Text(string content) + { + _builder.ParagraphFormat.Alignment = _fontalignment; + _builder.SetBuilderFont(_font, _fontSize, _fontcolor, _isBlod); + _builder.ParagraphFormat.SpaceBefore = 5; + _builder.ParagraphFormat.FirstLineIndent = 30; + _builder.Writeln(content); + } + + /// <summary> + /// 娣诲姞绌鸿 + /// </summary> + /// <param name="content"></param> + public void AddBlankLine() + { + _builder.Writeln(); + } + + /// <summary> + /// 鏋勫缓鏂囧瓧 + /// </summary> + /// <param name="content"></param> public void structureText(string content) { _builder.ParagraphFormat.Alignment = _fontalignment; _builder.SetBuilderFont(_font, _fontSize, _fontcolor, _isBlod); _builder.ParagraphFormat.SpaceBefore = 5; + _builder.ParagraphFormat.LeftIndent = 0; _builder.Writeln(content); } @@ -303,6 +326,8 @@ /// </summary> public void structureCell(string content) { + _builder.ParagraphFormat.FirstLineIndent = 0; + _builder.ParagraphFormat.LeftIndent = 2; var cell = _builder.InsertCell(); //_builder.InsertParagraph(); // 娣诲姞涓�涓柊娈佃惤 //_builder.ParagraphFormat.Alignment = ParagraphAlignment.Center; // 璁剧疆娈佃惤鍨傜洿灞呬腑 @@ -330,6 +355,12 @@ //builder.CellFormat.Shading.BackgroundPatternColor = System.Drawing.Color.FromArgb(red, green, blue);//璁剧疆鍗曞厓鏍艰儗鏅壊 //builder.Underline = isUnderline; + if (content == null) + { + _builder.Write(""); // 鍦ㄦ柊娈佃惤涓啓鍏ュ唴瀹� + return; + } + _builder.Write(content); // 鍦ㄦ柊娈佃惤涓啓鍏ュ唴瀹� //cell.FirstParagraph.Remove(); } diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/test.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/test.cs index 6f0da56..0fc5013 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/test.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/test.cs @@ -10,7 +10,14 @@ private void simpleButton1_Click(object sender, EventArgs e) { SimulationWordReport word = new SimulationWordReport(); - word.Create("word.doc"); + var test1 = new ReportViewModel(); + test1.ValveOpens = new List<ValveOpen>(); + test1.ValveOpens.Add(new ValveOpen { Name = "娴嬭瘯1", MinorLoss = "20" }); + test1.ValveOpens.Add(new ValveOpen { Name = "娴嬭瘯2", MinorLoss = "20" }); + test1.ValveOpens.Add(new ValveOpen { Name = "娴嬭瘯3", MinorLoss = "20" }); + test1.ValveOpens.Add(new ValveOpen { Name = "娴嬭瘯4", MinorLoss = "20" }); + + word.Create("word.doc", test1); } } } \ No newline at end of file -- Gitblit v1.9.3