2 super super simple (stand-alone) C# functions with all psuedocode steps given below -- 2

Job ID: 31131209

Budget: $10 – $30 USD

NOTE: Do not bid over $25


Write functions to handle users who open the conference screen at the same time.

Create a table (in PostgresSQL) CONCURRENCE with an entity class called EntityConcurrence to facilitate coding against the DB.
fields:
CON_CODE
CON_TABLE
CON_OPERATION
CON_KEY
USER_CODE
TIME

And a table USERS_DATA:
USER
USERNAME
USER_CODE

First Function:

Write a method (called TFormExportSalesMovement.btnConferenceClick), where:

1. Check if there exists a CONCURRENCE with CON_OPERATION = 'SALE CONFERENCE' with CON_KEY = ‘SALE_CODE’
2. If there isn't one keep going with the process in step 6
3. If there is ask the user: 'There is a conference not finished by USER [USER_NAME] at TIME. Do you want to invalidate it and continue with yours?'
4. If the user clicks No, then stop this process
5. If the user clicks in Yes:
6. Erase the CONCURRENCE with CON_OPERATION =: 'SALE CONFERENCE' and with CON_KEY =: SALE_CODE
7. Create a CONCURRENCE with
CON_CODE = CON_CODE (new key)
CON_TABLE = 'SALE'
CON_KEY = ‘SALE_CODE’
CON_OPERATION = 'SALE CONFERENCE'
USER_CODE = CurrentUser
DATE = CurrentDate&Time
8. Pass the CON_CODE to a global variable called FormConf.CON_CODE

Second function:

To run if the cancel button is clicked (called TFormMovProductConference.btnCancelClick):
1. Delete the CONCURRENCE entry (with CON_CODE).


Third Function:

To run if the save button is clicked (called TFormMovProductConference.btnRecordClick):

1.If a user has opened a conference concurrently (public CON_CODE not equal query(DB)), give the notice 'Conference invalidated. USER [USER_NAME] at DATE, TIME. Close the screen and start again.'
2. Else, if the current user's CONCURRENCE entry no longer exists, stop the process and give a notice to the user ‘Conference invalidated. Close the screen and start again.’
3. Else, delete the current user's CONCURRENCE entry.

Write a few simple tests by setting a current user in your environment and adding another user to the DB.
Related categories: C# Programming PostgreSQL