|
|
|
@ -42,6 +42,21 @@ namespace Aucma.Core.ProductOffLine.ViewModels
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
var countByProductModel = list.GroupBy(x => x.ProductModel).Select(group => new
|
|
|
|
|
{
|
|
|
|
|
ProductCode = group.First().ProductCode,
|
|
|
|
|
ProductRemark = group.First().ProductRemark,
|
|
|
|
|
ProductModel = group.Key,
|
|
|
|
|
Count = group.Count()
|
|
|
|
|
}).ToList();
|
|
|
|
|
foreach (var item in countByProductModel)
|
|
|
|
|
{
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
TotalItem.Add(new TempInfo() { No = TotalItem.Count + 1,ProductCode = item.ProductCode, ProductModel = item.ProductModel,ProductRemark = item.ProductRemark, Count = item.Count });
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -58,6 +73,18 @@ namespace Aucma.Core.ProductOffLine.ViewModels
|
|
|
|
|
OnPropertyChanged();//属性通知
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 按照型号统计
|
|
|
|
|
private ObservableCollection<TempInfo> totalItem = new ObservableCollection<TempInfo>() { };
|
|
|
|
|
public ObservableCollection<TempInfo> TotalItem
|
|
|
|
|
{
|
|
|
|
|
get { return totalItem; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
totalItem = value;
|
|
|
|
|
OnPropertyChanged();//属性通知
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 查询
|
|
|
|
|