How to return data retrieved by a Linq Query to Presentation Layer

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I want to return a result based on Linq query to Presentation Layer.
1.on button Click => cBaL.getPendingInvoices(); [cBaL is Business Access Layer Object]
2. in BAL Class <span style="font-size:0.75em; line-height:1.5
<pre class="prettyprint public void getPendingInvoices()
{
cDAl.getPendingInvoices(); //cDAL is Data access layer object
}[/code]
3. in DAL Class
<pre class="prettyprint public void getPendingInvoices()
{
GetPendingInvoicesDataContext getContext = new GetPendingInvoicesDataContext();

var pendinginvoices = from pi in getContext.PendingInvoices
where pi.PaymentRecd == false
select pi;
}[/code]

Now, how could i bind this result returned by query in DAL Class to GridView in Presentation Layer.
Also, Change the Header Name of Grid View through query.


View the full article
 
Back
Top