diff --git a/BPASmartClient.JXJFoodSmallStation/View/NewLocalRecipeView.xaml b/BPASmartClient.JXJFoodSmallStation/View/NewLocalRecipeView.xaml index 425e7e73..fef16aea 100644 --- a/BPASmartClient.JXJFoodSmallStation/View/NewLocalRecipeView.xaml +++ b/BPASmartClient.JXJFoodSmallStation/View/NewLocalRecipeView.xaml @@ -357,7 +357,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 939a5a9e..9d03c596 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs @@ -67,7 +67,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel 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()}:原料删除成功!"); });