| | |
| | | using DevExpress.Utils.Extensions; |
| | | using DevExpress.Utils.Svg; |
| | | using DevExpress.XtraCharts; |
| | | using Yw.DAL.Basic; |
| | | using Yw.Vmo; |
| | | |
| | |
| | | this.ShowProjectSiteInfoEvent?.Invoke(_project, _projectSite, hydroInfo, this.svgImg32[0]); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 保存 |
| | | /// </summary> |
| | | public async Task<Yw.Model.HydroModelInfo> SaveModel(XhsSchemeVmo scheme, Yw.Model.HydroModelInfo hydroInfo) |
| | | { |
| | | if (hydroInfo == null) |
| | | { |
| | | return default; |
| | | } |
| | | var id = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.Save(hydroInfo); |
| | | if (id < 1) |
| | | { |
| | | return default; |
| | | } |
| | | var db = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.GetByID(id); |
| | | if (scheme == null) |
| | | { |
| | | _hydroInfo = db; |
| | | return _hydroInfo; |
| | | } |
| | | if (_allSchemeHydroInfoDict == null || _allSchemeHydroInfoDict.Count < 1) |
| | | { |
| | | return default; |
| | | } |
| | | var schemeKey = _allSchemeHydroInfoDict.Keys.FirstOrDefault(x => x.ID == scheme.ID); |
| | | if (schemeKey == null) |
| | | { |
| | | return default; |
| | | } |
| | | _allSchemeHydroInfoDict[schemeKey] = db; |
| | | return db; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 刷新 |
| | | /// </summary> |
| | | public async Task<Yw.Model.HydroModelInfo> RefreshModel(XhsSchemeVmo scheme) |
| | | { |
| | | return await GetHydroInfo(scheme, false); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | //项目站概况 |
| | |
| | | this.CreateProjectSiteSchemeEvent?.Invoke(_project, _projectSite, hydroInfo, this.svgImg32[3]); |
| | | } |
| | | |
| | | private void accordionControl1_MouseClick(object sender, MouseEventArgs e) |
| | | { |
| | | if (e.Button == MouseButtons.Right) |
| | | { |
| | | this.popupMenu1.ShowPopup(MousePosition); |
| | | } |
| | | } |
| | | |
| | | private void barBtnCollpseAll_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | this.accordionControl1.CollapseAll(); |
| | | } |
| | | |
| | | |
| | | private void barBtnExpandAll_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | this.accordionControl1.ExpandAll(); |
| | | } |
| | | } |
| | | } |