| | |
| | | namespace HStation.WinFrmUI |
| | | using HStation.Assets; |
| | | |
| | | namespace HStation.WinFrmUI |
| | | { |
| | | public partial class test : DocumentPage |
| | | { |
| | |
| | | InitializeComponent(); |
| | | } |
| | | |
| | | private void simpleButton1_Click(object sender, EventArgs e) |
| | | private async void simpleButton1_Click(object sender, EventArgs e) |
| | | { |
| | | var allList = await new BLL.AssetsPumpMain().GetByIDEx(1845041966958645248); |
| | | foreach (var item in allList.PropContent) |
| | | { |
| | | if (item.TagName == PumpDataType.RatedCurrent) |
| | | { |
| | | var value = item.PropValue; |
| | | } |
| | | } |
| | | SimulationWordReport word = new SimulationWordReport(); |
| | | var test1 = new ReportViewModel(); |
| | | test1.Description = "制氮循环水模拟测试"; |
| | | 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" }); |
| | | test1.PumpStations = new List<ReportPumpStationViewModel>(); |
| | | test1.PumpStations.Add(new ReportPumpStationViewModel { EquipmentName = "测试1", OutletPressure = "23" }); |
| | | test1.PumpStations.Add(new ReportPumpStationViewModel { EquipmentName = "测试2", OutletPressure = "23" }); |
| | | test1.PumpStations.Add(new ReportPumpStationViewModel { EquipmentName = "测试3", OutletPressure = "23" }); |
| | | |
| | | test1.ProjectName = "项目1"; |
| | | test1.Equipments = new List<ReportEquipmentViewModel>(); |
| | | test1.Equipments.Add(new ReportEquipmentViewModel { Speed = "2", RatedCurrent = "3" }); |
| | | test1.Equipments.Add(new ReportEquipmentViewModel { Speed = "2", RatedCurrent = "3" }); |
| | | test1.Equipments.Add(new ReportEquipmentViewModel { Speed = "2", RatedCurrent = "3" }); |
| | | test1.Equipments.Add(new ReportEquipmentViewModel { Speed = "2", RatedCurrent = "3" }); |
| | | |
| | | test1.AfterEquipmentPowers = new List<EquipmentPowerInfo>(); |
| | | test1.AfterEquipmentPowers.Add(new EquipmentPowerInfo { AnnualPowerSavingAfterTech = "2", PowerSavingRate = "323" }); |
| | | test1.AfterEquipmentPowers.Add(new EquipmentPowerInfo { AnnualPowerSavingAfterTech = "2", PowerSavingRate = "323" }); |
| | | test1.AfterEquipmentPowers.Add(new EquipmentPowerInfo { AnnualPowerSavingAfterTech = "2", PowerSavingRate = "323" }); |
| | | |
| | | test1.AfterPumpStations = new List<ReportPumpStationViewModel>(); |
| | | test1.AfterPumpStations.Add(new ReportPumpStationViewModel { EquipmentName = "1", SuppyPressure = "2" }); |
| | | test1.AfterPumpStations.Add(new ReportPumpStationViewModel { EquipmentName = "1", SuppyPressure = "2" }); |
| | | test1.AfterPumpStations.Add(new ReportPumpStationViewModel { EquipmentName = "1", SuppyPressure = "2" }); |
| | | test1.AfterPumpStations.Add(new ReportPumpStationViewModel { EquipmentName = "1", SuppyPressure = "2" }); |
| | | |
| | | test1.AfterEquipments = new List<ReportEquipmentViewModel>(); |
| | | test1.AfterEquipments.Add(new ReportEquipmentViewModel { EquipmentName = "2", Speed = "2" }); |
| | | test1.AfterEquipments.Add(new ReportEquipmentViewModel { EquipmentName = "2", Speed = "2" }); |
| | | test1.AfterEquipments.Add(new ReportEquipmentViewModel { EquipmentName = "2", Speed = "2" }); |
| | | |
| | | test1.PowerConsumptionInfos = new List<PowerConsumptionInfo>(); |
| | | test1.PowerConsumptionInfos.Add(new PowerConsumptionInfo { AnnualPowerConsumption = "2", PreTechPowerConsumption = "2" }); |
| | | test1.PowerConsumptionInfos.Add(new PowerConsumptionInfo { AnnualPowerConsumption = "2", PreTechPowerConsumption = "2" }); |
| | | test1.PowerConsumptionInfos.Add(new PowerConsumptionInfo { AnnualPowerConsumption = "2", PreTechPowerConsumption = "2", AnnualRunningHours = "333" }); |
| | | |
| | | test1.AfterPowerConsumptionInfos = new List<PowerConsumptionInfo>(); |
| | | test1.AfterPowerConsumptionInfos.Add(new PowerConsumptionInfo { AnnualPowerConsumption = "3", PreTechPowerConsumption = "323" }); |
| | | test1.AfterPowerConsumptionInfos.Add(new PowerConsumptionInfo { AnnualPowerConsumption = "3", PreTechPowerConsumption = "323" }); |
| | | test1.AfterPowerConsumptionInfos.Add(new PowerConsumptionInfo { AnnualPowerConsumption = "3", PreTechPowerConsumption = "323" }); |
| | | |
| | | word.Create("word.doc", test1); |
| | | } |