by Mike.Sheen » Sun Jul 31, 2016 1:42 pm
Hi Indika,
Sure, you can use the same technique:
- Code: Select all
public void SetupBeforeHandlers(JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm JiwaForm, JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
{
var batchForm = (JiwaFinancials.Jiwa.JiwaSalesUI.BatchPrinting.MainForm)JiwaForm;
batchForm.GoUltraButton.Click += GoUltraButton_Click;
}
and then in the click handler:
- Code: Select all
private void GoUltraButton_Click(object sender, System.EventArgs e)
{
var button = (Infragistics.Win.Misc.UltraButton)sender;
var batchForm = (JiwaFinancials.Jiwa.JiwaSalesUI.BatchPrinting.MainForm)button.FindForm();
// batchForm.BatchPrint.Candidates is the list of candidate items - you can examine or remove from this list and the child actions also - each candidate represents an invoice - it has an Actions property which is a collection of Action - an action is and email or a report print.
}
Alternatively you can hook into the Candidates.Adding or Actions.Adding event and decide to cancel the add instead of removing them after they've been added. Whichever works best for you.
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