| | |
| | | using HStation.Vmo; |
| | | using System.Reflection; |
| | | |
| | | namespace HStation.WinFrmUI |
| | | namespace HStation.WinFrmUI |
| | | { |
| | | public partial class XhsProjectSimulationInfoPage : DocumentPage |
| | | { |
| | |
| | | { |
| | | InitializeComponent(); |
| | | this.PageTitle.Caption = "项目概况"; |
| | | this.PageTitle.HeaderSvgImage = this.svgImg32[0]; |
| | | //this.PageTitle.HeaderSvgImage = this.svgImg32[0]; |
| | | } |
| | | |
| | | private XhsProjectVmo _project = null;//项目 |
| | |
| | | /// <summary> |
| | | /// 绑定数据 |
| | | /// </summary> |
| | | public async Task SetBindingData |
| | | ( |
| | | XhsProjectVmo project, |
| | | XhsProjectSiteVmo projectSite, |
| | | Yw.Model.HydroModelInfo hydroInfo |
| | | ) |
| | | public void SetBindingData(XhsProjectVmo project, XhsProjectSiteVmo projectSite, Yw.Model.HydroModelInfo hydroInfo) |
| | | { |
| | | if (project == null) |
| | | { |
| | |
| | | _project = project; |
| | | _projectSite = projectSite; |
| | | _hydroInfo = hydroInfo; |
| | | if (_projectSite == null) |
| | | { |
| | | _projectSite = await BLLFactory<HStation.BLL.XhsProjectSite>.Instance.GetDefaultByProjectID(_project.ID); |
| | | } |
| | | if (_hydroInfo == null) |
| | | { |
| | | var hydroRelation = await BLLFactory<Yw.BLL.HydroModelRelation>.Instance |
| | | .GetDefaultByObjectTypeAndObjectIDOfPurpose(HStation.Xhs.DataType.XhsProjectSite, _projectSite.ID, HStation.Xhs.Purpose.Simulation); |
| | | _hydroInfo = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.GetByID(hydroRelation.ModelID); |
| | | } |
| | | this.PageTitle.Caption = $"项目概况"; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 初始化数据 |
| | |
| | | public override void InitialDataSource() |
| | | { |
| | | base.InitialDataSource(); |
| | | if (_project == null) |
| | | { |
| | | return; |
| | | } |
| | | this.PageTitle.Caption = $"{_project.Name}\r\n项目概况"; |
| | | } |
| | | |
| | | private async void widgetView1_QueryControl(object sender, DevExpress.XtraBars.Docking2010.Views.QueryControlEventArgs e) |
| | |
| | | break; |
| | | case "parter-list-info": |
| | | { |
| | | var ctrl = new Yw.WinFrmUI.HydroParterListCtrl(); |
| | | var ctrl = new XhsProjectSimulationHydroInfoCtrl(); |
| | | e.Control = ctrl; |
| | | ctrl.SetBindingData(_hydroInfo); |
| | | await ctrl.SetBindingData(_project, _projectSite, _hydroInfo); |
| | | } |
| | | break; |
| | | default: break; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | } |