Best Practices for BO Design


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
The MyBO.vb file specifically for you to add all of your custom code.  Just do not change the MyBO.Designer.vb file as this will be overwritten the next time the partial class is built through the BO Mapper.
Ben Kim
Ben Kim
StrataFrame User (133 reputation)StrataFrame User (133 reputation)StrataFrame User (133 reputation)StrataFrame User (133 reputation)StrataFrame User (133 reputation)StrataFrame User (133 reputation)StrataFrame User (133 reputation)StrataFrame User (133 reputation)StrataFrame User (133 reputation)
Group: Forum Members
Posts: 99, Visits: 253
I wasn't sure that was allowed within the BO "Class" itself w00t.  I will give it a shot.  Thanks guys!
StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yes, as Ben said, you can create a second business object to gather the comparison record that you need.  A Get would also retrieve the data, but it is only going to return a DataTable (no strong-typing).  As for moving the record pointer, if you do, it doesn't matter... the internal method iterating through the rows for the CheckRulesOnCurrentRow event uses the MoveAbsolute() method internally, so you can be assured that on the next raising of the CheckRulesOnCurrentRow event, the CurrentRowIndex will be in the correct place.
Ben Hayat
Ben Hayat
Advanced StrataFrame User (570 reputation)Advanced StrataFrame User (570 reputation)Advanced StrataFrame User (570 reputation)Advanced StrataFrame User (570 reputation)Advanced StrataFrame User (570 reputation)Advanced StrataFrame User (570 reputation)Advanced StrataFrame User (570 reputation)Advanced StrataFrame User (570 reputation)Advanced StrataFrame User (570 reputation)
Group: Forum Members
Posts: 374, Visits: 1.2K
Why don't you use a second BO for the second record? This way your first one stays in place!


..ßen
Edited 17 Years Ago by BenStrata
Ben Kim
Ben Kim
StrataFrame User (133 reputation)StrataFrame User (133 reputation)StrataFrame User (133 reputation)StrataFrame User (133 reputation)StrataFrame User (133 reputation)StrataFrame User (133 reputation)StrataFrame User (133 reputation)StrataFrame User (133 reputation)StrataFrame User (133 reputation)
Group: Forum Members
Posts: 99, Visits: 253
Hello,

I have created a BO that needs to look to another record in the same table for additional information.  This table contains a list names.  However, each record can point to an alias record.  The information I need is basic for the "main" record (Name, SSN, Birthdate, etc.).  I assume that the best place to handle this lookup is in the CheckRulesOnCurrentRow.  However I do not want to move any pointers or make a mess out of the existing dataset.  Can I use a "Get" method to obtain this information and how would one do the following:

Current Record ID: 96
First Name: John
Last Name: Doe
BirthDate: 1/15/1968
Alias ID: 52
etc.

Alias Record ID: 52
First Name: The "Man"
Last Name: NULL
BirthDate: 3/2/1970

How would I do the assignments after looking up?

NamesBO.GetByAliasID(NamesBO.AliasID)
Me.AliasFirstName = ?  <--- what goes here?
Me.AliasLastName = ?

The alias first name, last name, DOB, SSN, etc. need to be populated to custom properties for the UI designer to use.

Or can I create a new BO within the base BO to obtain this information?

Thank you for your help!

Ben

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search