金川 未选择物料报错bug
This commit is contained in:
@ -18,7 +18,7 @@ namespace 货架标准上位机.ViewModels
|
|||||||
public class OutInventoryAddMatViewModel : BindableBase
|
public class OutInventoryAddMatViewModel : BindableBase
|
||||||
{
|
{
|
||||||
#region Property
|
#region Property
|
||||||
private ObservableCollection<MatInventorySummaryModel> dataGridItemSource;
|
private ObservableCollection<MatInventorySummaryModel> dataGridItemSource = new ObservableCollection<MatInventorySummaryModel>();
|
||||||
public ObservableCollection<MatInventorySummaryModel> DataGridItemSource
|
public ObservableCollection<MatInventorySummaryModel> DataGridItemSource
|
||||||
{
|
{
|
||||||
get { return dataGridItemSource; }
|
get { return dataGridItemSource; }
|
||||||
|
@ -40,7 +40,11 @@ namespace 货架标准上位机
|
|||||||
|
|
||||||
private void comfirmClick(object sender, RoutedEventArgs e)
|
private void comfirmClick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
//
|
if (viewModel.DataGridItemSource == null)
|
||||||
|
{
|
||||||
|
HandyControl.Controls.MessageBox.Show("请搜索后选择物料!若不需要添加请点击【取消】按钮!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
var item = viewModel.DataGridItemSource.Where(t => t.isSelected).FirstOrDefault();
|
var item = viewModel.DataGridItemSource.Where(t => t.isSelected).FirstOrDefault();
|
||||||
if (item == null)
|
if (item == null)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user