This forum is for programmers who have questions about the source code.
-
wjstarck
- Posts: 942
- Joined: Tue Jul 31, 2007 7:18 am
- Location: Keller, TX
-
Contact:
Post
by wjstarck » Tue Jul 23, 2019 9:55 am
I used to do this in my plugin by looping through the controls from FormOpendental like so but this no longer works.
Code: Select all
public static void RefreshModuleData(FormOpenDental sender) { //Performs dynamic appointmentbook refresh
foreach (Control control in sender.Controls) {
if (control.Name == "ContrAppt") {
ContrAppt ContrAppt2 = new ContrAppt();
ContrAppt2 = (ContrAppt)control;
ContrAppt2.RefreshPeriod();
}
}
}
How can I refresh the Apptbook programmatically?
Cheers,
Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA
-
cmcgehee
- Posts: 711
- Joined: Tue Aug 25, 2015 5:06 pm
- Location: Salem, Oregon
Post
by cmcgehee » Tue Jul 23, 2019 11:30 am
We've been rewriting the appointment module to improve its performance. There is now a class named ContrApptJ which is the new appointment module. There is a preference 'ApptModuleUses2019Overhaul'; if true, ContrApptJ will be used. If false, ContrAppt will be used. I believe you'll have to look for either ContrApptJ or ContrAppt and call RefreshPeriod. You may need to check that preference to decide which one to refresh.
-
wjstarck
- Posts: 942
- Joined: Tue Jul 31, 2007 7:18 am
- Location: Keller, TX
-
Contact:
Post
by wjstarck » Tue Jul 23, 2019 11:55 am
Thanks Chris.
I'm confused though. I'm looping through all the controls from sender (FormOpenDental) from my plugin's ContrApptA. I don't see ContrAppt (or ContrApptJ) in the list of controls. Shouldn't ContrAppt and/or ContrApptJ be in the list of controls from FormOpenDental?
Cheers,
Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA
-
cmcgehee
- Posts: 711
- Joined: Tue Aug 25, 2015 5:06 pm
- Location: Salem, Oregon
Post
by cmcgehee » Tue Jul 23, 2019 12:11 pm
This might be due to the patient dashboard we added in 19.1. Instead of adding the module controls directly to FormOpenDental, we now add them to FormOpenDental.splitContainerNoFlickerDashboard.Panel1.
-
wjstarck
- Posts: 942
- Joined: Tue Jul 31, 2007 7:18 am
- Location: Keller, TX
-
Contact:
Post
by wjstarck » Tue Jul 23, 2019 12:58 pm
OK I'll look there thanks
Cheers,
Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA
-
wjstarck
- Posts: 942
- Joined: Tue Jul 31, 2007 7:18 am
- Location: Keller, TX
-
Contact:
Post
by wjstarck » Wed Jul 24, 2019 3:57 pm
Got it, but could you make the RefreshPeriod() method public on ContrApptJ so I can access it?
Thanks
Cheers,
Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA
-
cmcgehee
- Posts: 711
- Joined: Tue Aug 25, 2015 5:06 pm
- Location: Salem, Oregon
Post
by cmcgehee » Thu Jul 25, 2019 8:14 am
Could you use reflection to invoke it?
-
wjstarck
- Posts: 942
- Joined: Tue Jul 31, 2007 7:18 am
- Location: Keller, TX
-
Contact:
Post
by wjstarck » Thu Jul 25, 2019 2:06 pm
Will give that a try.
Thanks Chris
Cheers,
Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA