From a1c3bd29e9f123722222afd0ec52e61aaed3887c Mon Sep 17 00:00:00 2001 From: ZhaoGang <15196688790@163.com> Date: Tue, 30 May 2023 18:47:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A0=E9=99=A4=E6=9D=A1?= =?UTF-8?q?=E7=9B=AE=E6=9F=A5=E6=89=BE=E7=94=B1=E6=A0=B9=E6=8D=AE=E5=8E=9F?= =?UTF-8?q?=E6=96=99=E4=BD=8D=E7=BD=AE=E6=9F=A5=E6=89=BE=E5=8F=98=E4=B8=BA?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E5=8E=9F=E6=96=99=E5=90=8D=E7=A7=B0=E6=9F=A5?= =?UTF-8?q?=E6=89=BE=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BPASmartClient.JXJFoodSmallStation/View/NewLocalRecipeView.xaml | 2 +- .../ViewModel/NewLocalRecipeViewModel.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BPASmartClient.JXJFoodSmallStation/View/NewLocalRecipeView.xaml b/BPASmartClient.JXJFoodSmallStation/View/NewLocalRecipeView.xaml index 3bcbb335..d66b1d55 100644 --- a/BPASmartClient.JXJFoodSmallStation/View/NewLocalRecipeView.xaml +++ b/BPASmartClient.JXJFoodSmallStation/View/NewLocalRecipeView.xaml @@ -358,7 +358,7 @@ Grid.Column="5" Height="25" Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}" - CommandParameter="{Binding RawMaterialLocation}" + CommandParameter="{Binding RawMaterialName}" Content="删除" FontSize="16" Style="{StaticResource ControlButtonStyle}" /> diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs index e7ef7ead..f29ec619 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs @@ -54,7 +54,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel }), "LocalRecipeEdit", true); RemoveCommand = new RelayCommand((o) => { - var res = AllRawMaterial.FirstOrDefault(p => p.RawMaterialLocation == (int)o); + var res = AllRawMaterial.FirstOrDefault(p => p.RawMaterialName == o.ToString()); if (res != null) AllRawMaterial.Remove(res); //NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"{o.ToString()}:原料删除成功!"); });