|
|
@@ -116,6 +116,7 @@ namespace qdr.app.studiou.orders2printpack
|
|
|
// Create result DataTable with appropriate columns
|
|
|
DataTable result = new DataTable();
|
|
|
result.Columns.Add("order_no", typeof(string));
|
|
|
+ result.Columns.Add("email", typeof(string));
|
|
|
result.Columns.Add("prod_cat", typeof(string));
|
|
|
result.Columns.Add("prod_var_type", typeof(string));
|
|
|
result.Columns.Add("qty", typeof(string));
|
|
|
@@ -125,12 +126,14 @@ namespace qdr.app.studiou.orders2printpack
|
|
|
.GroupBy(row => new
|
|
|
{
|
|
|
OrderNo = row.Field<string>("order_no"),
|
|
|
+ Email = row.Field<string>("email"),
|
|
|
ProdCat = row.Field<string>("prod_cat"),
|
|
|
ProdVarType = row.Field<string>("prod_var_type")
|
|
|
})
|
|
|
.Select(group => new
|
|
|
{
|
|
|
group.Key.OrderNo,
|
|
|
+ group.Key.Email,
|
|
|
group.Key.ProdCat,
|
|
|
group.Key.ProdVarType,
|
|
|
TotalQty = group.Sum(row => int.Parse(row.Field<string>("qty"))).ToString()
|
|
|
@@ -145,6 +148,7 @@ namespace qdr.app.studiou.orders2printpack
|
|
|
{
|
|
|
result.Rows.Add(
|
|
|
item.OrderNo,
|
|
|
+ item.Email,
|
|
|
item.ProdCat,
|
|
|
item.ProdVarType,
|
|
|
int.Parse(item.TotalQty)
|