Creating some more advanced Maintain Table Screens: Difference between revisions
No edit summary |
No edit summary |
||
Line 21: | Line 21: | ||
==Solution== | ==Solution== | ||
Follow the steps on the [[How-To: Creating a Maintain Table screen]] wiki page for each of the screens. | Follow the steps on the [[How-To: Creating a Maintain Table screen]] wiki page for each of the screens. | ||
'''Please note that there is no example screen provided which you could take and copy (as is the case with the Project for the creation of simpler Maintain Table screens).''' | |||
For this reason you need to have a look around for yourselves among the existing Maintain Table screens and choose the one that is most similar to the one screen you will be working on. (Refer to the section 'Choosing a similar, existing Maintain Tables screen' in the [[How-To: Creating a Maintain Table screen#Step_1:_Choosing_a_similar.2C_existing_Maintain_Tables_screen|How-To wiki page]]!) | |||
===Finding DB Tables Definitions=== | ===Finding DB Tables Definitions=== | ||
Line 28: | Line 31: | ||
== Scope: Maintain Table Screens List == | == Scope: Maintain Table Screens List == | ||
The screens below are for different Modules of openPETRA. | The screens below are for different Modules of openPETRA. | ||
''Be sure to create the screens in the correct C# Project (and directory):'' | |||
* Partner Module screens go in Project Ict.Petra.Client.MPartner.Gui.Setup | |||
* Personnel Module screens go in Project Ict.Petra.Client.MPersonnel.Gui.Setup | |||
* Finance Module screens go in Project Ict.Petra.Client.MFinance.Gui.Setup | |||
Note: The column 'Complexity' is not of importance to you, but it is important for the openPETRA team who needs to see those screens in the context of the other Maintain Table screens (there are 115 of them...). | Note: The column 'Complexity' is not of importance to you, but it is important for the openPETRA team who needs to see those screens in the context of the other Maintain Table screens (there are 115 of them...). | ||
===Partner Module=== | ===Partner Module=== | ||
Line 39: | Line 48: | ||
| Mailings || 2 || p_mailing || N/A (*1) || (*2) (*8) (*A3) (*A4) | | Mailings || 2 || p_mailing || N/A (*1) || (*2) (*8) (*A3) (*A4) | ||
|} | |} | ||
For the Mailings screen, don't put the DB fields a_motivation_group_code_c and a_motivation_detail_code_c on the screen. | |||
===Personnel Module=== | |||
{| style="width:100%" border="1" | |||
! Screen Name || Complexity || Database Table || CacheableDataTable || Comment | |||
|- | |||
| ApplicationTypes || 2 || pt_application_type || N/A (*1) || (*3) (*6) (*9) (*10) (*A13) | |||
|- | |||
| ApplicationForms || 2 || pt_app_form_types || N/A (*1) || (*3) (*6) (*9) (*10) (*A14) | |||
|- | |||
| EventRole || 2 || pt_congress_code || EventRoleList || (*3) (*6) (*10) (*A15) (*A16) | |||
|- | |||
| DocumentTypes || 2 || pm_document_type || N/A (*1) || (*3) (*5) (*10) | |||
|} | |||
===Finance Module=== | ===Finance Module ''(More difficult!)''=== | ||
{| style="width:100%" border="1" | {| style="width:100%" border="1" | ||
! Screen Name || Complexity || Database Table || CacheableDataTable || Comment | ! Screen Name || Complexity || Database Table || CacheableDataTable || Comment | ||
Line 53: | Line 74: | ||
These two screens go in the 'Finance Module Setup' area of the Finance Module menu. Please put the screen 'Corporate Exchange Rate' under the 'GL Setup' heading and the screen 'Method of Giving' under the 'Gift Setup' heading. | These two screens go in the 'Finance Module Setup' area of the Finance Module menu. Please put the screen 'Corporate Exchange Rate' under the 'GL Setup' heading and the screen 'Method of Giving' under the 'Gift Setup' heading. | ||
Revision as of 07:12, 18 December 2010
Objective / Overview
openPETRA contains many screens which set up data that is used all over the application and which can be customised to address the specific situation of an office or organisation. These screens are called 'Maintain Table Screens' and the objective of this Project is to create such screens. A Maintain Table screen allows CRUD (Create, Read, Update, Delete [1]) operations for a specific system table/lookup table of openPETRA.
The creation of Maintain Table Screens involves quite a few manual steps, but there is hardly any source code that needs to be written because the openPETRA WinForms Generator generates >95% of the code!
Example:
There is another Project which involves the creation of simpler Maintain Table screens.
Desired Outcome
Adding a few Maintain Table screens to openPETRA and in the course of doing that
- learning about the client-side project structure
- learning about our screen definition files (YAML files)
- getting to know the openPETRA database structure documentation
- getting to know the WinForms Generator
Solution
Follow the steps on the How-To: Creating a Maintain Table screen wiki page for each of the screens.
Please note that there is no example screen provided which you could take and copy (as is the case with the Project for the creation of simpler Maintain Table screens). For this reason you need to have a look around for yourselves among the existing Maintain Table screens and choose the one that is most similar to the one screen you will be working on. (Refer to the section 'Choosing a similar, existing Maintain Tables screen' in the How-To wiki page!)
Finding DB Tables Definitions
The definitions for the openPETRA DB Tables which are used in the screens can be found here.
Scope: Maintain Table Screens List
The screens below are for different Modules of openPETRA.
Be sure to create the screens in the correct C# Project (and directory):
- Partner Module screens go in Project Ict.Petra.Client.MPartner.Gui.Setup
- Personnel Module screens go in Project Ict.Petra.Client.MPersonnel.Gui.Setup
- Finance Module screens go in Project Ict.Petra.Client.MFinance.Gui.Setup
Note: The column 'Complexity' is not of importance to you, but it is important for the openPETRA team who needs to see those screens in the context of the other Maintain Table screens (there are 115 of them...).
Partner Module
Screen Name | Complexity | Database Table | CacheableDataTable | Comment |
---|---|---|---|---|
Publication Cost | 2 | p_publication_cost | PublicationCostList | (*2) (*7) (*A1) (*A2) |
Mailings | 2 | p_mailing | N/A (*1) | (*2) (*8) (*A3) (*A4) |
For the Mailings screen, don't put the DB fields a_motivation_group_code_c and a_motivation_detail_code_c on the screen.
Personnel Module
Screen Name | Complexity | Database Table | CacheableDataTable | Comment |
---|---|---|---|---|
ApplicationTypes | 2 | pt_application_type | N/A (*1) | (*3) (*6) (*9) (*10) (*A13) |
ApplicationForms | 2 | pt_app_form_types | N/A (*1) | (*3) (*6) (*9) (*10) (*A14) |
EventRole | 2 | pt_congress_code | EventRoleList | (*3) (*6) (*10) (*A15) (*A16) |
DocumentTypes | 2 | pm_document_type | N/A (*1) | (*3) (*5) (*10) |
Finance Module (More difficult!)
Screen Name | Complexity | Database Table | CacheableDataTable | Comment |
---|---|---|---|---|
Corporate Exchange Rate | 3 | a_corporate_exchange_rate | N/A (*1) | (*4) (*A5) (*A6) (*A7) (*A8) |
Method of Giving | 2 | a_method_of_giving | MethodOfGivingList | (*4) (*A9) |
These two screens go in the 'Finance Module Setup' area of the Finance Module menu. Please put the screen 'Corporate Exchange Rate' under the 'GL Setup' heading and the screen 'Method of Giving' under the 'Gift Setup' heading.
Key to Comments
- TODO
Dealing With Errors When Saving Data
If you find that you get an error message when trying to save changed data in any Maintain Table Screen, have a look in the Client Log file to see the actual exception (at the very end of the file). The most common cause of getting a problem at that point is that a certain field that is specified in the DB is not on the screen, and that DB field has the Constraint 'NOT NULL'. This will prevent saving, as openPETRA doesn't assign anything, not even NULL automatically to such fields, since they are not on the screen. The solution for that is to have a Method called 'GetDetailDataFromControlsManual
' in the ManualCode.cs file. You can find an example implementation for it in the file U:\openpetraorg\csharp\ICT\Petra\Client\lib\MPersonnel\gui\setup\AbilityAreaSetup.ManualCode.cs.
If this is not applicable or still doesn't solve the problem of not being able to save changed data, ask ChristianK, who should be able to help you.
Approval of Functionality and Program Code
TODO