Creating some more advanced Maintain Table Screens: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
(Created page with '==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 …')
 
Line 25: Line 25:
== 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.
Note: The column 'Complexity' is not of importance to you, but for the openPETRA team who needs to see the screens in the context of the other Maintain Table screens (there are 115 of them...).


===Partner Module===
===Partner Module===
Line 30: Line 32:
! Screen Name || Complexity || Database Table || CacheableDataTable || Comment
! Screen Name || Complexity || Database Table || CacheableDataTable || Comment
|-
|-
| AbilityLevel || 2 || pt_ability_level || AbilityLevelList || (*1) (*3) (*5)
| Publication Cost || 2 || p_publication_cost || PublicationCostList || (*2) (*7) (*A1) (*A2)
|-
|-
| ProfessionalAreas || 2 || pt_qualification_area || QualificationAreaList || (*1) (*3) (*A1)
| Mailings || 2 || p_mailing || N/A (*1) || (*2) (*8) (*A3) (*A4)
|}
|}


Line 38: Line 40:


===Finance Module===
===Finance Module===
TODO
{| style="width:100%" border="1"
{| style="width:100%" border="1"
! Screen Name || Complexity || Database Table || CacheableDataTable || Comment
! Screen Name || Complexity || Database Table || CacheableDataTable || Comment
|-
|-
| AbilityLevel || 2 || pt_ability_level || AbilityLevelList || (*1) (*3) (*5)
|-
| ProfessionalAreas || 2 || pt_qualification_area || QualificationAreaList || (*1) (*3) (*A1)
|}
|}


Line 49: Line 50:


===Personnel Module===
===Personnel Module===
TODO
{| style="width:100%" border="1"
{| style="width:100%" border="1"
! Screen Name || Complexity || Database Table || CacheableDataTable || Comment
! Screen Name || Complexity || Database Table || CacheableDataTable || Comment
|-
|-
| AbilityLevel || 2 || pt_ability_level || AbilityLevelList || (*1) (*3) (*5)
|-
| ProfessionalAreas || 2 || pt_qualification_area || QualificationAreaList || (*1) (*3) (*A1)
|}
|}




===Key to Comments===
===Key to Comments===
*  
* TODO


==Dealing With Errors When Saving Data==
==Dealing With Errors When Saving Data==

Revision as of 10:30, 17 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:

More complex Maintain Table Screen

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.


Scope: Maintain Table Screens List

The screens below are for different Modules of openPETRA.

Note: The column 'Complexity' is not of importance to you, but for the openPETRA team who needs to see the 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.

Finance Module

TODO

Screen Name Complexity Database Table CacheableDataTable Comment

All these screens go in the 'Finance Module Setup' area of the Finance Module menu. Please rename the section heading 'Setup Currencies' in that menu to 'General' and put all three screens under that heading.

Personnel Module

TODO

Screen Name Complexity Database Table CacheableDataTable Comment


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