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
Aha, you don't want to add a new NavigatedEventArgs to the handler, you want to add a new method delegate to the handler... like this:

using MicroFour.StrataFrame.Business;

namespace SomeNamespace
{
   
    public class SomeClassHandlingTheNavigatedEvent
    {
         private void AddHandlerToBusinessObject(BusinessLayer bo)
         {
             bo.Navigated += new BusinessLayer.NavigatedEventHandler(this.MyNavigatedHandlingMethod);
         }

         private void MyNavigatedHandlingMethod(NavigatedEventArgs e)
         {
             //-- Do whatever you want with the e.[properties]
             //   as they will contain the indexes and such
         }
    }
}

The difference here is that you use the constructor of the event handler and pass the name of the method you want to execute.  Then, when the business object wants to fire it's Navigated event, it will call your method.

Also, if you've dropped a business object on a form, you can easily add a new event handler by going to the property sheet for the business object and clicking the events tab (the little lightning bolt at the top of the property sheet).  Scroll down to the Navigated event and double-click it.  The designer will add the handler and take you to the code file to the method that it created for you.

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