C#

Grouping and sum with Datatable Using IEnumerable

Use for Groupping and sum with datatble Pass Datatable as dttemp var query = from r in dttemp.AsEnumerable() group r by new { StyleDetail_COLOR_NAME = r.Field<string>(“StyleDetail_COLOR_NAME”), StyleDetail_QLY_NAME = r.Field<string>(“StyleDetail_QLY_NAME”), StyleDetail_SHAPENAME = r.Field<string>(“StyleDetail_SHAPENAME”), StyleDetail_SHAPENO = r.Field<int>(“StyleDetail_SHAPENO”), StyleDetail_QLY_ID = r.Field<int>(“StyleDetail_QLY_ID”), StyleDetail_COLOR_ID = r.Field<int>(“StyleDetail_COLOR_ID”) } into groupedTable select new { StyleDetail_SHAPENO = groupedTable.Key.StyleDetail_SHAPENO, StyleDetail_QLY_ID = groupedTable.Key.StyleDetail_QLY_ID, StyleDetail_COLOR_ID =Continue Reading “Grouping and sum with Datatable Using IEnumerable”