This code is not deprecated and won't be for I think its 12 months and therefore any code using this should compile and run under 7.1 so long as its in the user interface but should be upgraded at some point not only due to the deprecation but for scalability.
However in terms of upgrading code that can depend on the context, for example each form has its own manager so from the form plugin you can do the following
- Code: Select all
public void Setup(JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm JiwaForm, JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
{
JiwaForm.Manager
}
Each Business Logic Object has a manager so the following is also valid
- Code: Select all
public void Setup(JiwaFinancials.Jiwa.JiwaApplication.IJiwaBusinessLogic JiwaBusinessLogic, JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
{
JiwaBusinessLogic.Manager
}
Each Plugin has its own manager so the following is also valid
- Code: Select all
public void Setup(JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
{
Plugin.Manager
}
Each Jiwa Grid etc has its own manager so this is also valid
- Code: Select all
public void FormatCell(JiwaFinancials.Jiwa.JiwaApplication.IJiwaBusinessLogic BusinessLogicHost, JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaGrid GridObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm FormObject, int Col, int Row, JiwaFinancials.Jiwa.JiwaApplication.IJiwaLineCustomFieldValues HostItem, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomField CustomField, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomFieldValue CustomFieldValue)
{
BusinessLogicHost.Manager
GridObject.Manager
}
Instantiating a business logic object once you have a manager is as simple as
- Code: Select all
JiwaFinancials.Jiwa.JiwaInventory.Inventory result = Manager.BusinessLogicFactory.CreateBusinessLogic<JiwaFinancials.Jiwa.JiwaInventory.Inventory>(null);
Instantiating a form uses
- Code: Select all
Manager.FormFactory.CreateForm
and instantiating a dialog something like
- Code: Select all
_myForm = salesform.Manager.DialogFactory.CreateDialog<AttkeyOrderConsolidation.frmBackOrderListing>(salesform);
I would also suggest you read the following article that Mike has generously spent time putting together in case you need to instantiate your own Manager and any manager has the login details for the current database in which code is running
https://docs.jiwa.com.au/display/J7UG/How+to+convert+plugins+or+code+to+be+compatible+with+7.00.177.00+or+laterI hope this explains enough