| | |
| | | /// </summary> |
| | | private void SaveModelTemplate() |
| | | { |
| | | if ( _vm.Facility == null) |
| | | if (_vm.Facility == null) |
| | | { |
| | | TipFormHelper.ShowWarn("请选择模板"); |
| | | return; |
| | |
| | | SaveView(); |
| | | SetZoom(); |
| | | |
| | | _vm.Facility.ModelInfo = Yw.JsonHelper.Object2Json(_vm.Template); |
| | | _vm.Template.network.CalcLinkMinorLoss(); |
| | | _vm.Facility.ModelInfo = Yw.JsonHelper.Object2Json(_vm.Template); |
| | | |
| | | this._mapView.toolStripButton_save_ButtonClick(1, new EventArgs()); |
| | | |
| | | } |
| | |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | _vm.Facility.ModelInfo = Yw.JsonHelper.Object2Json(_vm.Template); |
| | | |
| | | SaveModelTemplate(); |
| | | return true; |
| | | } |
| | | |
| | |
| | | |
| | | facility.ModelInfo = Yw.JsonHelper.Object2Json(_vm.Template); |
| | | facility.ModelPath = fullPath; |
| | | |
| | | SaveModelTemplate(); |
| | | if (!await BLLFactory<BLL.Facility>.Instance.Update(facility)) |
| | | { |
| | | TipFormHelper.ShowError("新增模型信息失败!"); |