Dim query = From Trans In MainDS.Transaction.AsEnumerable() _
Where Trans.CustomerID = _ResultRow("CustomerID") _
And (Trans.Debit - Trans.Paid) > 0 _
Order By Trans.SaleDate _
Select New With _
{
.Time = Trans.SaleDate, _
.SaleType = Trans.TransactionType, _
.TransctionNumber = Trans.TransactionNo, _
.Debit = IIf(Trans.Debit != DbNull.Value, Trans.Debit, 0), _
.Credit = IIf(Trans.Credit != DbNull.Value, Trans.Credit, 0) _
}
|