runtime business object creation


Author
Message
Fabian R Silva, -
Fabian R Silva, -
StrataFrame User (317 reputation)StrataFrame User (317 reputation)StrataFrame User (317 reputation)StrataFrame User (317 reputation)StrataFrame User (317 reputation)StrataFrame User (317 reputation)StrataFrame User (317 reputation)StrataFrame User (317 reputation)StrataFrame User (317 reputation)
Group: StrataFrame Users
Posts: 153, Visits: 1.2K
Hi guys, I try to make a generic ABM, on it I dropped a "copy" button and it must copy the current record of the primary business object on a private business object



example: I'm retrieving on the ABM a product's table, my currentrowindex is 23 and I like to copy this on a temporary business object with only this record, I not sure how to declare the private variable



private _boCopy as XXXXXX



XXXXX mean that I known what is the primary object (the form property say it) but I don't known how to say something like

dim _boCopy as (the type of Myform.PrimaryBusinessObject)



Thanks and sorry for me newbie questions w00t
Reply
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
You will want to use the base class which would be BusinessLayer:

Dim _CopyBO As MicroFour.StrataFrame.Business.BusinessLayer

This will allow any BO to be passed into that variable while giving you the ability to reference all of the base classes.  If you want to have the type of BO passed in then you will want to take a more technical approach using Generics.  This is a more length explanation as Generics are a wonderful tool but they require more explanation.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Fabian R Silva, - - 18 Years Ago
Fabian R Silva, - - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Fabian R Silva, - - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Fabian R Silva, - - 18 Years Ago
StrataFrame Team - 18 Years Ago
                         How To obtain the current record from the PrimaryBusinessObject of a...
Fabian R Silva, - - 18 Years Ago
                             I say "Victory" too fast

when I set
Private _CopyBO As...
Fabian R Silva, - - 18 Years Ago
                                 Have you built the partial class for the BO you are working with?
Trent L. Taylor - 18 Years Ago
                                     Yes, I build all the project to test it, I tested with some BOs and...
Fabian R Silva, - - 18 Years Ago
                                         Yes, this message is because the partial class has not been built....
Trent L. Taylor - 18 Years Ago
                                             [quote][b]Trent L. Taylor (09/28/2007)[/b][hr]Yes, this message is...
Fabian R Silva, - - 18 Years Ago
                                                 Solution to this topic (I think :crazy:)

[quote]dim _copybo...
Fabian R Silva, - - 18 Years Ago
                                                     Fabian,

I think that the code posted won't have just one...
Greg McGuffey - 18 Years Ago
                                                         Yep, Greg is correct... if you filter out all but 1 row, and you want...
StrataFrame Team - 18 Years Ago
                                                             Hello guys, that's right, some cut & paste to show the example and I...
Fabian R Silva, - - 18 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search