diff --git a/Sln.Wcs.Model/Domain/BaseLocationInfo.cs b/Sln.Wcs.Model/Domain/BaseLocationInfo.cs index d8d8b22..83194e7 100644 --- a/Sln.Wcs.Model/Domain/BaseLocationInfo.cs +++ b/Sln.Wcs.Model/Domain/BaseLocationInfo.cs @@ -1,4 +1,4 @@ -using SqlSugar; +using SqlSugar; using System; using System.Collections.Generic; using System.Linq; @@ -194,5 +194,11 @@ namespace Sln.Wcs.Model.Domain /// [SugarColumn(ColumnName = "updated_time")] public DateTime? updatedTime { get; set; } + + /// + /// 序号(用于列表显示,不参与数据库操作) + /// + [SugarColumn(IsIgnore = true)] + public int RowIndex { get; set; } } } diff --git a/Sln.Wcs.UI/Controls/CustomMessageBox.xaml.cs b/Sln.Wcs.UI/Controls/CustomMessageBox.xaml.cs index 7c706b4..6550828 100644 --- a/Sln.Wcs.UI/Controls/CustomMessageBox.xaml.cs +++ b/Sln.Wcs.UI/Controls/CustomMessageBox.xaml.cs @@ -24,8 +24,17 @@ namespace Sln.Wcs.UI.Controls { window.PanelOneButton.Visibility = Visibility.Visible; window.PanelTwoButtons.Visibility = Visibility.Collapsed; - window.TxtIcon.Text = "✓"; - window.TxtIcon.Foreground = new System.Windows.Media.SolidColorBrush((System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#4CAF50")); + + if (title.Contains("错误") || title.Contains("失败") || title.Contains("警告")) + { + window.TxtIcon.Text = "✕"; + window.TxtIcon.Foreground = new System.Windows.Media.SolidColorBrush((System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#F44336")); + } + else + { + window.TxtIcon.Text = "✓"; + window.TxtIcon.Foreground = new System.Windows.Media.SolidColorBrush((System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#4CAF50")); + } } else if (button == MessageBoxButton.YesNo) { diff --git a/Sln.Wcs.UI/MainWindow.xaml.cs b/Sln.Wcs.UI/MainWindow.xaml.cs index b828713..bfb5df1 100644 --- a/Sln.Wcs.UI/MainWindow.xaml.cs +++ b/Sln.Wcs.UI/MainWindow.xaml.cs @@ -1,6 +1,7 @@ using Sln.Wcs.UI.Attribute; using Sln.Wcs.UI.Page.BasicInfo; using Sln.Wcs.UI.Page.BasicInfo.DeviceInfo; +using Sln.Wcs.UI.Page.BasicInfo.LocationInfo; using Sln.Wcs.UI.Page.BasicInfo.MaterialInfo; using Sln.Wcs.UI.Page.BasicInfo.StoreInfo; using Sln.Wcs.UI.Page.Home; @@ -22,6 +23,7 @@ namespace Sln.Wcs.UI private DeviceInfoPage _deviceInfoPage; private MaterialInfoPage _materialInfoPage; private StoreInfoPage _storeInfoPage; + private LocationInfoPage _locationInfoPage; public MainWindow() { @@ -31,6 +33,7 @@ namespace Sln.Wcs.UI _deviceInfoPage = new DeviceInfoPage(); _materialInfoPage = new MaterialInfoPage(); _storeInfoPage = new StoreInfoPage(); + _locationInfoPage = new LocationInfoPage(); MainContent.Content = _homePage; BtnBasicInfo.Checked += BtnBasicInfo_Checked; @@ -106,7 +109,7 @@ namespace Sln.Wcs.UI private void BtnLocationInfo_Click(object sender, RoutedEventArgs e) { BtnBasicInfo.IsChecked = false; - MainContent.Content = _basicInfoPage; + MainContent.Content = _locationInfoPage; } private void BtnExit_Click(object sender, RoutedEventArgs e) diff --git a/Sln.Wcs.UI/Page/BasicInfo/LocationInfo/LocationAddWindow.xaml b/Sln.Wcs.UI/Page/BasicInfo/LocationInfo/LocationAddWindow.xaml new file mode 100644 index 0000000..2bc5cfb --- /dev/null +++ b/Sln.Wcs.UI/Page/BasicInfo/LocationInfo/LocationAddWindow.xaml @@ -0,0 +1,393 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +