private void SaveProjectClicked() { try { bool isActive = regionManager.Regions[RegionNames.ContentRegion].ActiveViews.Select(a => a.ToString()?.Split('.').Last()).Contains("MasterDesigner"); if (isActive) { Project = Project.GetProjectInstance; DoSavePipingTempNodeOutStructure(); ProjectInfoBLL objProjectInfoBll = new ProjectInfoBLL(); bool status = objProjectInfoBll.UpdateProject(Project); System.Windows.Application.Current.Properties["ProjectId"] = Project.projectID; JCHMessageBox.Show(Langauge.Current.GetMessage("SAVED_SUCCESSFULLY")); } else { JCHMessageBox.Show(Langauge.Current.GetMessage("ALERT_SAVE_PROJECT")); } } catch (Exception ex) { int?id = Project.GetProjectInstance?.projectID; Logger.LogProjectError(id, ex); } }
private void OnSaveClickedCommand() { _eventAggregator.GetEvent <ProjectSettingsSave>().Publish(); var proj = JCHVRF.Model.Project.GetProjectInstance; if (proj.IsBothMode == true) { proj.IsCoolingModeEffective = true; proj.IsHeatingModeEffective = true; } ProjectInfoBLL objPrjbll = new ProjectInfoBLL(); if (objPrjbll.UpdateProject(proj)) { JCHMessageBox.Show(Langauge.Current.GetMessage("SUCCESSFULLY_UPDATE"));//"Successfully Updated!"); RefreshDashBoard(); } //bug 3825 var currentSystem = WorkFlowContext.CurrentSystem as JCHVRF.Model.NextGen.SystemVRF; _eventAggregator.GetEvent <SystemDetailsSubscriber>().Publish(currentSystem); //bug 3825 UtilTrace.SaveHistoryTraces(); }