|
||||||||||||
|
New Database Table Pattern This is one of many Patterns. If you add a new table to the database, you'll have to add a new class in OpenDentBusiness\TableTypes. You must use this pattern:
Once the file is complete, it MUST BE APPROVED by a senior programmer before continuing. Some explanations and things to watch out for: Serialization Issues After approval, run the Crud Generator project to create the crud file. It will notify you that the table is not present in the database. Click OK to continue. The new crud file will be in the OpenDentBusiness.Crud folder, but it will need to be added to the project manually before it will be visible in the Solution Explorer. There will also be a new DataInterface file that has been created that needs to be added to the project. Find the new query at the bottom of ConvertDatabase.cs, and move it into the conversion script. Run it to create the table in your test database. If you later need a new DataInterface (s class) method, then you can use the Crud project in snippet generator mode. This is handy when converting over from the old patterns. For the UI part of the new table, good patterns would be FormPharmacies and FormPharmacyEdit. Better UI patterns will be documented later. Moving an Existing Table to Crud We are gradually moving all tables over to the crud framework. Using the example, add Serializable, Tablebase, and IsPriKey to an existing table file. Run the Crud Generator project. It will not complain about a missing database table. Add the new crud file to the project and to SVN. Alter the existing OpenDentBusiness.DataInterface file to take advantage of the crud file as much as possible, using the snippet generator as the basis for new methods. Any unusual situations should be reviewed by a senior programmer.
|
||||||||||||
Open Dental Software 1-503-363-5432
|