Not sure if it matters, but the anesthetic record data and time populate a listBox, and the user can add/delete to this list and switch between records. I notice that the data on the form only partially load, and some tabs are completely greyed out, so somehow the primary key (anestheticRecordNum) is not being passed to the these other tabs and forms.
Cheers,
Bill Starck, DDS Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA
The .SelectMany() method in the CRUD classes that Open Dental uses physically cannot return null and will return an empty list instead. What does your CRUD.SelectMany() method look like?
The best thing about a boolean is even if you are wrong, you are only off by a bit.
internal static List<AnesthVSData> SelectMany(string command){
if(RemotingClient.MiddleTierRole == MiddleTierRole.ClientMT) {
throw new ApplicationException("Not allowed to send sql directly. Rewrite the calling class to not use this query:\r\n"+command);
}
DataTable table = DataCore.GetTable(command);
List<AnesthVSData> list=TableToList(table);
return list;
}
Cheers,
Bill Starck, DDS Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA
internal static List<AnesthVSData> SelectMany(string command){
if(RemotingClient.MiddleTierRole == MiddleTierRole.ClientMT) {
throw new ApplicationException("Not allowed to send sql directly. Rewrite the calling class to not use this query:\r\n"+command);
}
DataTable table = DataCore.GetTable(command);
List<AnesthVSData> list=TableToList(table);
return list;
}
And if .TableToList() cannot return null then it isn't this code at fault.
The best thing about a boolean is even if you are wrong, you are only off by a bit.