pry 1 year ago
parent
commit
83f26da5e4
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      BPASmartClient.JXJFoodSmallStation/View/NewLocalRecipeView.xaml
  2. +1
    -1
      BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs

+ 1
- 1
BPASmartClient.JXJFoodSmallStation/View/NewLocalRecipeView.xaml View File

@@ -357,7 +357,7 @@
Grid.Column="5" Grid.Column="5"
Height="25" Height="25"
Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}" Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
CommandParameter="{Binding RawMaterialLocation}"
CommandParameter="{Binding RawMaterialName}"
Content="删除" Content="删除"
FontSize="16" FontSize="16"
Style="{StaticResource ControlButtonStyle}" /> Style="{StaticResource ControlButtonStyle}" />


+ 1
- 1
BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs View File

@@ -67,7 +67,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel


RemoveCommand = new RelayCommand<object>((o) => RemoveCommand = new RelayCommand<object>((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); if (res != null) AllRawMaterial.Remove(res);
//NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"{o.ToString()}:原料删除成功!"); //NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"{o.ToString()}:原料删除成功!");
}); });


Loading…
Cancel
Save