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 »

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 »

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: 5776
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: HookAddCode request - AppointmentL.GetSearchResults

Post by jordansparks »

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 »

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: 5776
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: HookAddCode request - AppointmentL.GetSearchResults

Post by jordansparks »

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 »

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 »

Works like a charm! :)

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