StrataFrame Forum

Multiple Company Scenario Help

http://forum.strataframe.net/Topic13291.aspx

By Guillermo Vilas - 1/8/2008

Hello Everyone

I'm working on a project that needs to support the ability to connect and switch between companies. The problem raised when running the Strataframe application the first thing that the user sees is the login Form. I tried manipulating the config file so the main application reads the connection string from there, but what happens if the client needs to switch to another company. Another approach I think of is by using the Strataframe native Connection Wizard but I don't figure out how to customize it to just populate the names of the companies available to connect. I was studying in deep the logic in the Small Business Accounting to recreate the company switching scenario. Any help be accepted.



Also I will like to add that I made a entire library that support Janus Winforms v.3 Controls if any one interested.
By Mike Rogers - 1/8/2008

Hi Guillermo

I would be very interested in your library that supports the Janus Winforms v.3 Controls.

Thanks

By Trent L. Taylor - 1/8/2008

Another approach I think of is by using the Strataframe native Connection Wizard but I don't figure out how to customize it to just populate the names of the companies available to connect. I was studying in deep the logic in the Small Business Accounting to recreate the company switching scenario. Any help be accepted.

Guillermo,

I think that you are trying to make things a little too compicated.  First, you do not have to SF login form if you do not want to.  You have complete control and access of the login mechanisms of the SF Role-Based Security.  Secondly, you do you have to use the config file or the connection string wizard.  We use neither of these in our medical software and instead have taken a different approach where the connection is auto-detected through UDP (we have a server that listens for broadcasts).  This approach, however, is only used when installed in a single site.  We have another approach for dealing with multiple companies logging in.  We actually manipulate this at the login screen.  We have a combo that allows the end-user to choose which division or company which then in turns determines how the connection string will be pulled.

StrataFrame has the ability to work in virtually any scenerio in this case, it is more a function of how you choose to design your application.  I hope that maybe some of these ideas may give you an idea of an approach you may take with your application. Smile

By Guillermo Vilas - 1/9/2008

Mike Rogers (01/08/2008)
Hi Guillermo

I would be very interested in your library that supports the Janus Winforms v.3 Controls.

Thanks

Hi Mike

I'm attaching the source code of the wrapper, I must say that the Janus Grid Control is still a work in progress, since I'm making some mayors changes to it. You will need to add the references for both the StrataFrame and Janus Library. i'll be open to any suggestions.

By Guillermo Vilas - 1/9/2008

 We have a combo that allows the end-user to choose which division or company which then in turns determines how the connection string will be pulled.

Thanks for your help Trent

Thats means that I can call the 'DataLayer.DataSource.Add' Method from the custom login form overwriting the one added in AppMain class?

By StrataFrame Team - 1/9/2008

Thats means that I can call the 'DataLayer.DataSource.Add' Method from the custom login form overwriting the one added in AppMain class?

Yes, you can call that method from anywhere within your application to change the connection string at any time.  Just remember to remove the data source you're replacing before you add the new one. 

DataBasics.DataSources.Remove(String.Empty)
DataBasics.DataSources.Add(New SqlDataSourceItem(String.Empty, "new connection string"))

By Guillermo Vilas - 1/11/2008

Thank for your help Ben

I'll submit a screenshot of the solution to contribute as soon I finish it.