Hook request

This forum is for programmers who have questions about the source code.
Post Reply
User avatar
wjstarck
Posts: 936
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Hook request

Post by wjstarck » Thu Mar 31, 2011 6:05 am

After line 3821 at the bottom of method butDelete_Click on FormProcEdit:

Code: Select all

try {
	Procedures.Delete(ProcCur.ProcNum);//also deletes the claimProcs and adjustments. Might throw exception.
	Recalls.Synch(ProcCur.PatNum);//needs to be moved into Procedures.Delete
	SecurityLogs.MakeLogEntry(Permissions.ProcComplEdit,ProcCur.PatNum,
		"Delete for: "
		+PatCur.GetNameLF()+", "+ProcedureCodes.GetProcCode(ProcCur.CodeNum).ProcCode+", "
		+ProcCur.ProcFee.ToString("c"));
		DialogResult=DialogResult.OK;
		Plugins.HookAddCode(this, "FormProcEdit.butDelete_Click_end", ProcCur);	<-----
Also, any status on these 2 requests:

viewtopic.php?f=3&t=3417
viewtopic.php?f=3&t=3424 ?

I really don't need any of these backported - 7.9 and above will do just fine.
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

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

Re: Hook request

Post by michael » Thu Mar 31, 2011 10:51 am

If I counted correctly it looks like there are all together 7 hook requests. These will be added soon. I'll let you know when they are.

User avatar
wjstarck
Posts: 936
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: Hook request

Post by wjstarck » Thu Mar 31, 2011 12:18 pm

That sounds right. Thanks.
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

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

Re: Hook request

Post by michael » Thu Mar 31, 2011 12:41 pm

Eight hooks were added.

1. Plugins.HookAddCode(this,"FormProcEdit.butSetComplete_Click_end",ProcCur,ProcOld,textNotes); (ln 3301)
2. Plugins.HookAddCode(this,"ContrChart.menuItemSetComplete_Click_procLoop",procCur,procOld); (ln 7360)
3. Plugins.HookAddCode(null,"Procedures.SetCompleteInAppt_procLoop",ProcList,oldProc); (ln 1323)
4. Plugins.HookAddCode(null,"SheetPrinting.pd_PrintPage_drawFieldLoop",field); (ln 223)
5. Plugins.HookAddCode(this,"FormProcEdit.butDelete_Click_end",ProcCur); (ln 3823)
6. Plugins.HookAddCode(this, "ContrChart.gridProg_CellDoubleClick_proc", proc, FormP); (ln 5048)
7. Plugins.HookAddCode(this, "ContrChart.gridProg_CellDoubleClick_proc2", proc, FormP); (ln 5052)
8. Plugins.HookAddCode(this,"FormProcEdit.butOK_Click_end",ProcCur); (ln 4421)

Notice some of these items had their names changed from the suggested hook name away from just "_end" or "_begin"/"_begin2" to better describe their location in the code. Specifically to describe if it was in a certain loop, or to describe what kind of item was double clicked on from the grid (determined at that point by the logic in the containing procedure).

[Edit: Note these hooks were only added to the head and will be released when 7.9 goes beta.]

Post Reply