This forum is for programmers who have questions about the source code.
-
dcrider
- Posts: 67
- Joined: Sun Sep 29, 2019 11:03 am
-
Contact:
Post
by dcrider » Wed May 26, 2021 4:28 pm
Would it be possible for
OpenDental.FormPayPlan.FillCharges() to be changed from private to public? One of our plugins overrides the default
FormPayPlanChargeEdit with a custom one and I've noticed that I need to call
FillCharges() in order for the UI to update after a change.
I currently use the following code, but I would like to be able to just call
_FormPayPlan.FillCharges();
Code: Select all
_FormPayPlan.GetType()
.GetMethod("FillCharges", BindingFlags.NonPublic | BindingFlags.Instance)
.Invoke(_FormPayPlan, new object[] { });
-
dcrider
- Posts: 67
- Joined: Sun Sep 29, 2019 11:03 am
-
Contact:
Post
by dcrider » Wed May 26, 2021 4:39 pm
I would also like OpenDental.ControlAccount.ToolBarMain_ButtonClick to become public as that's the best way I've found to start the payment process using your existing code.
Basically, we have a process to walk our patients through financing options and at the end they can make a payment. So on our form we have a "Make a Payment" button that programmatically clicks your Payment button through the method above.
-
jordansparks
- Site Admin
- Posts: 5769
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
-
Contact:
Post
by jordansparks » Wed May 26, 2021 10:43 pm
Wow, you're really getting deep into it. Our policy in cases like this is usually to just leave it alone and you can use reflection to do it, just like you are.
-
dcrider
- Posts: 67
- Joined: Sun Sep 29, 2019 11:03 am
-
Contact:
Post
by dcrider » Thu May 27, 2021 7:48 am
I figured it would be a long shot, but thank you for the response.
That's pretty surface-level for most of our plugins. We really like being able to customize every bit of the workflow with plugins. We have over two dozen centers across 4 States, so deep customization is important to us.