You are approaching this from the wrong angle if you attach to click event of the ultra toolbars manager which has a signature of
- Code: Select all
public virtual void UltraToolbarsManager_ToolClick(object sender, ToolClickEventArgs e)
You then need to check for ID_RecordPrint this is the snippet from Jiwa that does that
- Code: Select all
if ((e.Tool.Owner != null) && (e.Tool.Owner is PopupMenuTool))
{
if (((PopupMenuTool) e.Tool.Owner).Key == "ID_RecordPrint")
{
this.PrintRecord(this.ReportDefinitionCollection[e.Tool.Key]);
}
once you get there you just go after the form with something like this, which is for doing it in the sales order screen
- Code: Select all
Infragistics.Win.UltraWinToolbars.UltraToolbarsManager toolbar = (Infragistics.Win.UltraWinToolbars.UltraToolbarsManager)sender;
JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm salesform = (JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm)toolbar.DockWithinContainer;
The once you have the form you can get the object off it like sales order to do your notes.
You could even keep it generic if you wanted to by using the form as JiwaFinancials.Jiwa.JiwaApplication.Maintenance.UserInterface and using its BusinessLogic property and working with the interface JiwaFinancials.Jiwa.JiwaApplication.IJiwaNotes if the businesslogic property was of that type of interface