Page 1 of 1

Hook Request

Posted: Tue Nov 13, 2012 9:11 am
by FernandoJB
Hi, i need a Hook to be added in :

OpenDentBusiness\Data Interface\Appointments.cs

Code: Select all

///<summary>The newStatus will be a DefNum or 0.</summary>
public static void SetConfirmed(long aptNum,long newStatus) {
	if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
		Meth.GetVoid(MethodBase.GetCurrentMethod(),aptNum,newStatus);
		return;
	}
	string command="UPDATE appointment SET Confirmed="+POut.Long(newStatus);
	if(PrefC.GetLong(PrefName.AppointmentTimeArrivedTrigger)==newStatus){
		command+=",DateTimeArrived="+DbHelper.Now();
	}
	else if(PrefC.GetLong(PrefName.AppointmentTimeSeatedTrigger)==newStatus){
		command+=",DateTimeSeated="+DbHelper.Now();
	}
	else if(PrefC.GetLong(PrefName.AppointmentTimeDismissedTrigger)==newStatus){
		command+=",DateTimeDismissed="+DbHelper.Now();
	}
	command+=" WHERE AptNum="+POut.Long(aptNum);
	Db.NonQ(command);
	###### HOOK HERE #########
	Plugins.HookAddCode(null, "Appointments.SetConfirmed", aptNum, newStatus ); 
	##########################
}
Thanks !!!

Re: Hook Request

Posted: Mon Nov 26, 2012 3:28 pm
by michael
Hook:

Code: Select all

Plugins.HookAddCode(null, "Appointments.SetConfirmed_end", aptNum, newStatus);
was added to version 12.4.21 (beta).

Re: Hook Request

Posted: Mon Nov 26, 2012 6:42 pm
by FernandoJB
Thanks !