Basic FK data populate on Maintenance Forms


Author
Message
Alex M. Lana
Alex M. Lana
StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)StrataFrame Novice (66 reputation)
Group: Forum Members
Posts: 20, Visits: 264
Greetings,

Maybe this is a simple and basic question, but as we're new to SF, here it goes.



ProdutcTable (ProductBO)

- ProdCod (PK)

- VendorCod (FK) --> VendorTable (VendorBO)



Have a Maintenance Form with ProductBO(form bind) and VendorBO,

have also a Dialog to browse Vendors binded to VendorBO.



My question is how can I fill the VendorBO "on Navigate" so the info binded to it will follow it's parent FK.

The form contains no grids. Just binded fields.

I need the form to understand the relation and fetch the FKs data on ProductBO Navigate.



Thanks,



Alex



Reply
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yep, that is the correct way to attach to an event in C#.  The AddHandler and RemoveHandler keywords are not available in C#, so the overload of the +/- operators is used to add/remove method calls to delegate variables (events).  So, to add the event:

obj.EventName += new EventHandlerType(EventHandlerMethodName);

and to remove the event handler, it's the - operator.  I honestly can't remember whether you have to save off the created delegate in a variable to remove it or if you can just use the line above and swap the + for a -... not sure.

Also note that C# does not have the Handles keyword or WithEvents keyword like VB does, so when you double-click a button in the designer and it creates the Click handler method for you, it is explicitly adding the line above for the event handler within the .designer.cs file for the form.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Alex M. Lana - 18 Years Ago
Ivan George Borges - 18 Years Ago
Ivan George Borges - 18 Years Ago
Alex M. Lana - 18 Years Ago
Greg McGuffey - 18 Years Ago
Ivan George Borges - 18 Years Ago
Peter Denton - 18 Years Ago
Greg McGuffey - 18 Years Ago
Alex M. Lana - 18 Years Ago
StrataFrame Team - 18 Years Ago
Alex M. Lana - 18 Years Ago
StrataFrame Team - 18 Years Ago
Alex M. Lana - 18 Years Ago
             Glad you got it working.
StrataFrame Team - 18 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search