HookAddCode request - AppointmentL.GetSearchResults

This forum is for programmers who have questions about the source code.
Post Reply
alkhaef
Posts: 105
Joined: Fri Jul 02, 2010 10:37 am
Location: Los Angeles, CA

HookAddCode request - AppointmentL.GetSearchResults

Post by alkhaef » Thu Sep 02, 2010 12:13 pm

Hello... Can I get a HookAddCode called AppointmentL.GetSearchResults_postfilter where the HOOK HERE comment is?

So far I think the parameters I need are ALresults, providers[p], apt

Code: Select all

						if(beforeTime!=TimeSpan.Zero && timeFound>beforeTime) {
							aptIsMatch=false;
							continue;
						}
						//match found
						ALresults.Add(dayEvaluating+timeFound);
//LINE 129
//HOOK HERE
					}//for p	
					if(aptIsMatch){
						break;
					}
Thanks!
Al
Help! I've OD'ed on OD! :)

alkhaef
Posts: 105
Joined: Fri Jul 02, 2010 10:37 am
Location: Los Angeles, CA

Re: HookAddCode request - AppointmentL.GetSearchResults

Post by alkhaef » Wed Sep 08, 2010 4:23 pm

Hi.

I've hand-hacked my local copy and it looks like the hook as described with that parameter set would work for me. Will this hook go in?

Thanks,
Al
Help! I've OD'ed on OD! :)

User avatar
jordansparks
Site Admin
Posts: 5770
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: HookAddCode request - AppointmentL.GetSearchResults

Post by jordansparks » Thu Sep 09, 2010 8:33 pm

Michael will try to get it tomorrow.
Jordan Sparks, DMD
http://www.opendental.com

michael
Posts: 38
Joined: Wed Aug 04, 2010 8:49 am

Re: HookAddCode request - AppointmentL.GetSearchResults

Post by michael » Fri Sep 10, 2010 7:37 am

It looks like this won't happen right away as GetSearchResults is a staic method, and our policy is to send the object as the sender parameter in the HookAddCode function, but with a static method the object does not necessarily exist, so you cannot pass this as the sender object.

Would it work to add your code to ContrAppt.cs at line 4490 in the head (might be a little different for you) right after GetSearchResults is called?

User avatar
jordansparks
Site Admin
Posts: 5770
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: HookAddCode request - AppointmentL.GetSearchResults

Post by jordansparks » Fri Sep 10, 2010 7:57 am

I think you should pass in null.
Jordan Sparks, DMD
http://www.opendental.com

michael
Posts: 38
Joined: Wed Aug 04, 2010 8:49 am

Re: HookAddCode request - AppointmentL.GetSearchResults

Post by michael » Fri Sep 10, 2010 8:38 am

Right. Done. The hook "AppointmentL.GetSearchResults_postfilter" is in place and ready for use in version 7.2.39.

alkhaef
Posts: 105
Joined: Fri Jul 02, 2010 10:37 am
Location: Los Angeles, CA

Re: HookAddCode request - AppointmentL.GetSearchResults

Post by alkhaef » Tue Sep 14, 2010 4:08 pm

Works like a charm! :)

Thanks,
Al
Help! I've OD'ed on OD! :)

Post Reply