Hook request: FormPatientEdit.cs

This forum is for programmers who have questions about the source code.
Post Reply
User avatar
mopensoft
Posts: 146
Joined: Tue Dec 04, 2012 3:33 pm
Location: Melbourne, Australia
Contact:

Hook request: FormPatientEdit.cs

Post by mopensoft » Sun Oct 11, 2015 2:26 pm

Hi

I would like to add 2 hooks into FormPatientEdit.cs:
1. At the end of FormPatientEdit_Load method as follow:

Code: Select all

Plugins.HookAddCode(this, "FormPatientEdit.Load_end", PatCur);
2. At the begining of butOK_Click method as follow to verify the user input:

Code: Select all

            bool inputCheck = true;
            object[] parameters = new object[] { inputCheck, PatCur };
            Plugins.HookAddCode(this, "FormPatientEdit.butOK_click_Start", parameters);
            if ((bool) parameters[0] == false)
                return;
    
Thanks

allends
Posts: 235
Joined: Fri Aug 23, 2013 11:29 am

Re: Hook request: FormPatientEdit.cs

Post by allends » Tue Oct 13, 2015 11:02 am

These have been added to the program and will be available with version 15.3.22.

I have changed the second hook slightly to better match our patterns:

Code: Select all

         bool isValid=true;
			object[] parameters=new object[] { isValid,PatCur };
			Plugins.HookAddCode(this,"FormPatientEdit.butOK_Click_beginning",parameters);
			if((bool)parameters[0]==false) {//Didn't pass plug-in validation
				return;
			}
Allen
Open Dental Software
http://www.opendental.com

User avatar
mopensoft
Posts: 146
Joined: Tue Dec 04, 2012 3:33 pm
Location: Melbourne, Australia
Contact:

Re: Hook request: FormPatientEdit.cs

Post by mopensoft » Tue Oct 13, 2015 10:20 pm

Thanks Allen

Post Reply