Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Header with filtered detail records.
 

Pages: 1
LLBLGen Pro Runtime Framework
Header with filtered detail records.
Page:1/1 

  Print all messages in this thread  
Poster Message
bonder
User



Location:

Joined on:
23-Sep-2003 05:05:17
Posted:
36 posts
# Posted on: 03-Oct-2003 05:09:18.  
Hi Otis!

I have three entities in my system. Actually, I have many entities, but I only want to speak about three of them right now! Regular Smiley

They are Client, Credit, and Debit. For legal reasons I have to have physical separation of credits and debits into separate tables.

Anyway, I need to have the ability to figure the Client Account Balance for any given point in time, like so:

Code:

Client myClient = new ClientEntity(1);
DateTime monthEnd = new DateTime(9,30,2003); // Sep 30 2003
decimal balance = myClient.GetAccountBalance(monthEnd);


So balance should be equal to all of the credits with a transaction date of 9/30/2003 or earlier, less all debits with a transaction date of 9/30/2003 or earlier.

I think I need to use a TypedList for this. Am I right? I am going to get into the coding right now, but wanted to dash off a question so we could capture your best thinking in permanent form in this forum! Regular Smiley

--Bruce
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37644 posts
# Posted on: 03-Oct-2003 10:41:33.  
You can use the two class scenario and add the GetAccountBalance() method to the ClientEntity() class. This class is generated once, when you use the Full/Safe configuration (recommended) and is never overwritten.

That GetAccountBalance then indeed can consult a typed list with the columns you need from debit and credit and use a filter to get the rows you need for the client and the month. Regular Smiley


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
bonder
User



Location:

Joined on:
23-Sep-2003 05:05:17
Posted:
36 posts
# Posted on: 06-Oct-2003 04:16:53.  
Otis wrote:
You can use the two class scenario and add the GetAccountBalance() method to the ClientEntity() class. This class is generated once, when you use the Full/Safe configuration (recommended) and is never overwritten.

That GetAccountBalance then indeed can consult a typed list with the columns you need from debit and credit and use a filter to get the rows you need for the client and the month. Regular Smiley


Cool, so I'm not far off! Cool

--Bruce
  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.