Tuesday, January 22, 2013

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;  


Thanks.

C# print file on LAN Printer

If you want to print any file on network printer then you can try with this code block // Change Default Printer System.Ma...