diff --git a/Admin.Core.Repository/BASE/BaseRepository.cs b/Admin.Core.Repository/BASE/BaseRepository.cs index 56917d10..3030a8be 100644 --- a/Admin.Core.Repository/BASE/BaseRepository.cs +++ b/Admin.Core.Repository/BASE/BaseRepository.cs @@ -61,6 +61,7 @@ namespace Admin.Core.Repository { try { + if (_db.CopyNew().Ado.IsValidConnection()) { @@ -75,7 +76,7 @@ namespace Admin.Core.Repository } catch (Exception ex) { - + Console.WriteLine(_db+":"+ex.ToString()); Console.WriteLine(ex.ToString()); return false; } diff --git a/Aucma.Core.BoxFoam/ViewModels/FoamMonitorPageViewModel.cs b/Aucma.Core.BoxFoam/ViewModels/FoamMonitorPageViewModel.cs index 89d9dc47..ece0ce51 100644 --- a/Aucma.Core.BoxFoam/ViewModels/FoamMonitorPageViewModel.cs +++ b/Aucma.Core.BoxFoam/ViewModels/FoamMonitorPageViewModel.cs @@ -22,6 +22,7 @@ using Admin.Core.Model; using System.Threading; using Aucma.Core.HwPLc; using Admin.Core.Model.ViewModels; +using System.Windows; namespace Aucma.Core.BoxFoam.ViewModels { @@ -84,17 +85,20 @@ namespace Aucma.Core.BoxFoam.ViewModels { try { - if (ProductionHourList!=null && ProductionHourList.Count>0) + Application.Current.Dispatcher.Invoke(() => { - ProductionHourList.Clear(); - } - ProductionHourList = new List(); + + List xList = new List(); List listTime = _baseBomInfoServices.getWorkTime().Result; foreach (WorkTime time in listTime) { - ProductionHourList.Add(time.hourTime); + xList.Add(time.hourTime); } - + //if (ProductionHourList != null && ProductionHourList.Count > 0) + //{ + // ProductionHourList.Clear(); + //} + ProductionHourList = xList; // 货道列表 List list = _boxFoamDataServices.QueryAsync(x => x.ProductLineCode.Equals("CX_02") && x.StationCode == "1005").Result; @@ -176,9 +180,9 @@ namespace Aucma.Core.BoxFoam.ViewModels #endregion } + }); + - - } catch (Exception ex) { diff --git a/Aucma.Core.BoxFoam/Views/FoamMonitorPageView.xaml b/Aucma.Core.BoxFoam/Views/FoamMonitorPageView.xaml index ca1c2df6..64ccd279 100644 --- a/Aucma.Core.BoxFoam/Views/FoamMonitorPageView.xaml +++ b/Aucma.Core.BoxFoam/Views/FoamMonitorPageView.xaml @@ -410,8 +410,8 @@ - - + + @@ -419,7 +419,7 @@ - + @@ -444,7 +444,7 @@ - +