Differences in 7.182  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Differences in 7.182

Postby SBarnes » Mon Jul 03, 2017 10:30 am

Hi Mike,

in previous versions of Jiwa you could use code like the below to check if you were inside the user interface, given the MDI Parent on the instance is null how can you do this now?

Code: Select all
if (JiwaFinancials.Jiwa.JiwaApplication.Manager.Instance.MDIParentForm != null )
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1620
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Differences in 7.182

Postby Mike.Sheen » Mon Jul 03, 2017 11:45 am

SBarnes wrote:Hi Mike,

in previous versions of Jiwa you could use code like the below to check if you were inside the user interface, given the MDI Parent on the instance is null how can you do this now?

Code: Select all
if (JiwaFinancials.Jiwa.JiwaApplication.Manager.Instance.MDIParentForm != null )


All our forms, business logic, entities, collection items and collections now have a Manager property - just use that.

Code: Select all
if (????.Manager.MDIParentForm != null )
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Re: Differences in 7.182

Postby SBarnes » Mon Jul 03, 2017 2:25 pm

Hi Mike,

Sweet that worked.

I have also discovered that if you still use Manager.Instance you have to do Manager.Instance.Logon as well and pull the details off something else's manager.database for the server etc.

But the interesting thing I found when you create two managers and log them both in at the same time on the demo database the second one fails with an error about no available valid licenses , should that be happening?
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1620
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Differences in 7.182

Postby Mike.Sheen » Sun Jul 16, 2017 12:52 pm

SBarnes wrote:But the interesting thing I found when you create two managers and log them both in at the same time on the demo database the second one fails with an error about no available valid licenses , should that be happening?


I'm going to say yes. I'm also assuming these two managers are logging on as the same user? if they're different users, then that's definitely expected.

In order for it to count two logons with the same username in the same process, we would need to be able to query the sys.processes table in the master database to get the client process id of the connection - which isn't possible with Azure SQL databases - so we're stuck with not knowing if a connection is made in the same process or not.

What is the use case for connecting multiple times as the same user in an application?
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Re: Differences in 7.182  Topic is solved

Postby SBarnes » Sun Jul 16, 2017 1:12 pm

Hi Mike,

No use case just testing some stuff in converting a plugin to the new methodology and yes both were using the admin user.

Thanks
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1620
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 9 guests