Saturday, October 20, 2012

C# LINQ Update using multiple where

We can use LINQ update using more than one where.

  // Upadate PR_RECIVEDINVOICEs status  
         var users = from u in dataContextObj.PR_RECIVEDINVOICEs  
               where u.RecivedInvoice_PublisherInvoice == receiveBook.InvoiceNo && u.Status=="Order"  
               select u;  
         users.ToList().ForEach(u => u.Status = "Book Receive");  

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...