https://stackoverflow.com/questions/342 ... ing-change
I am doing something like this:
toothChart.SetToothNumberingNomenclature((ToothNumberingNomenclature)PrefC.GetInt(PrefName.UseInternationalToothNumbers));
which works.. until I go to a higher version of OD... (it returns 0 from another preference) the UseInternationalToothNumbers which is say preference number 650 in the database, changes later to another number, and in the source code since the enum list is being added, but alphabetized in the source code, causing the numbers to change.. and not link correctly if that sounds right. But.. alphabetized code looks better...
Anyways... not sure if I should just ignore the preference number and just hard code it based off of the OD version number.. or... query the database.. which is probably like.. a worse idea.
Just thought I would throw this out there.
(Feature Request?)
Maybe in prefs.cs in OD business...
instead of:
UseInternationalToothNumbers,
adding integers to the strings so you can alphabetize the list AND not change the integers the enum is assigned to?
UseInternationalToothNumbers = 823,
This was going forward.. as you guys add more preferences.. the integers won't change... as UseInterNationalToothNumbers.. used to be some other number?
Preferences in Open Dental Business. (feature request?)
- Justin Shafer
- Posts: 596
- Joined: Sat Jul 28, 2007 7:34 pm
- Location: Fort Worth, TX.
Preferences in Open Dental Business. (feature request?)
Justin Shafer
Onsite Dental Systems
817-909-4222
justin@onsitedentalsystems.com
http://www.onsitedentalsystems.com
http://iocsnapshot.com
http://justinshafer.blogspot.com
Onsite Dental Systems
817-909-4222
justin@onsitedentalsystems.com
http://www.onsitedentalsystems.com
http://iocsnapshot.com
http://justinshafer.blogspot.com
- Justin Shafer
- Posts: 596
- Joined: Sat Jul 28, 2007 7:34 pm
- Location: Fort Worth, TX.
Re: Preferences in Open Dental Business. (feature request?)
I think I should just set my own preference in my form.
Justin Shafer
Onsite Dental Systems
817-909-4222
justin@onsitedentalsystems.com
http://www.onsitedentalsystems.com
http://iocsnapshot.com
http://justinshafer.blogspot.com
Onsite Dental Systems
817-909-4222
justin@onsitedentalsystems.com
http://www.onsitedentalsystems.com
http://iocsnapshot.com
http://justinshafer.blogspot.com
Re: Preferences in Open Dental Business. (feature request?)
Justin,
OpenDental does not use enum values to reference the preference enum, we use the enum names.
https://www.opendental.com/OpenDentalDo ... preference
The PrefName column in that table is what the program uses as its "Primary" key.
The code that you posted
Without your code in front of me I can't say exactly what the problem is, but I can tell that you are not using PrefC.Get... methods.
Long story short, if you are using our PrefC.Get... methods then you won't have any issues with getting data that is from a different pref.
OpenDental does not use enum values to reference the preference enum, we use the enum names.
https://www.opendental.com/OpenDentalDo ... preference
The PrefName column in that table is what the program uses as its "Primary" key.
The code that you posted
will not get a value from a preference that is not UseInternationalToothNumbers.toothChart.SetToothNumberingNomenclature((ToothNumberingNomenclature)PrefC.GetInt(PrefName.UseInternationalToothNumbers));
Without your code in front of me I can't say exactly what the problem is, but I can tell that you are not using PrefC.Get... methods.
Long story short, if you are using our PrefC.Get... methods then you won't have any issues with getting data that is from a different pref.