This forum is for programmers who have questions about the source code.
-
pid_user
- Posts: 67
- Joined: Thu Jun 04, 2015 9:31 am
Post
by pid_user » Mon Jan 18, 2016 2:08 am
Please do help add HookAddCode as shown below on FormSmsTextMessaging at the end of FormSmsTextMessaging_Load
Code: Select all
private void FormSmsTextMessaging_Load(object sender,EventArgs e) {
gridMessages.ContextMenu=contextMenuMessages;
if(!PrefC.GetBool(PrefName.EasyNoClinics)) {//Using clinics
labelClinic.Visible=true;
comboClinic.Visible=true;
comboClinic.Items.Clear();
_listClinics=Clinics.GetForUserod(Security.CurUser);
for(int i=0;i<_listClinics.Count;i++) {
comboClinic.Items.Add(_listClinics[i].Description);
comboClinic.SetSelected(i,true);
}
}
textDateFrom.Text=DateTimeOD.Today.AddDays(-7).ToShortDateString();
textDateTo.Text=DateTimeOD.Today.ToShortDateString();
checkSent.Checked=IsSent;
checkRead.Checked=IsReceived;
FillGridTextMessages();
Plugins.HookAddCode(this,"FormSmsTextMessaging.Load_end");
}
-
jsalmon
- Posts: 1596
- Joined: Tue Nov 30, 2010 12:33 pm
-
Contact:
Post
by jsalmon » Mon Jan 18, 2016 10:18 am
Hook added and will be released with v15.4.21
The best thing about a boolean is even if you are wrong, you are only off by a bit.
Jason Salmon
Open Dental Software
http://www.opendental.com
-
pid_user
- Posts: 67
- Joined: Thu Jun 04, 2015 9:31 am
Post
by pid_user » Mon Jan 18, 2016 5:49 pm
jsalmon wrote:Hook added and will be released with v15.4.21
THANK YOU!
-
pid_user
- Posts: 67
- Joined: Thu Jun 04, 2015 9:31 am
Post
by pid_user » Mon Feb 15, 2016 9:45 pm
Please do help add HookMethod in FormSmsTextMessaging in butReply_Click method
try {
if (Plugins.HookMethod(this, "FormTxtMsgEdit.SendText_Start2", patNum, mobileNumber, textReply.Text, YN.Yes))
{
goto customsmscall;
}
SmsToMobiles.SendSmsSingle(patNum,mobileNumber,textReply.Text,clinicNum);
}
catch(Exception ex) {
MessageBox.Show(ex.Message);
return;
}
customsmscall:
textReply.Text="";
FillGridMessageThread(patNum);
}
-
allends
- Posts: 240
- Joined: Fri Aug 23, 2013 11:29 am
Post
by allends » Tue Feb 16, 2016 10:37 am
This has been added to 15.4.31.
I changed a few names to better follow our patterns.
try {
if(Plugins.HookMethod(this,"FormSmsTextMessaging.butReply_Click_sendSmsSingle",patNum,mobileNumber,textReply.Text,YN.Yes))
{
goto HookSkipSmsCall;
}
SmsToMobiles.SendSmsSingle(patNum,mobileNumber,textReply.Text,clinicNum);
}
catch(Exception ex) {
MessageBox.Show(ex.Message);
return;
}
HookSkipSmsCall: { }
-
pid_user
- Posts: 67
- Joined: Thu Jun 04, 2015 9:31 am
Post
by pid_user » Tue Feb 16, 2016 11:53 am
[quote="adearmondsattler"]This has been added to 15.4.31.
I changed a few names to better follow our patterns.
[quote]
THANK YOU!
-
nathansparks
- Posts: 172
- Joined: Mon Aug 04, 2008 12:39 pm
Post
by nathansparks » Fri Feb 19, 2016 9:40 am
I would caution that this may not the best place for a hook. If you are not using the Open Dental built in texting, this form is not the right place to be putting your text messages. You should hook in to the patient level send text button perhaps, but this form is specific to Open Dental two way texting service. If a customer is using some other texting service, this window should probably not be used. Our staff will not know that it is not Open Dental texting and possibly give bad advice. You could make something similar, but in future versions it probably will not show if Open Dental texting is not turned on. There will be functionality that will be specific to our services and we would not expect you to be putting incoming text messages into the table or using that form for displaying the text messages.