C# Linq Sum from a listObject

we can easily find out the sum from a list of collection. if the list is used in data grid or any other control as a data source we can easily find out the sum of any item field from the list using LINQ.

  var totalQty = ViewData.Requisition.DC_RequisitionItemList.Sum(item => item.ItemTotalValue);  
  ViewData.TotalQty = totalQty;  


Popular posts from this blog

WPF Crystal Report Viewer Using SAP

ASP.NET MVC razor SAP Crystal report