Adding Delete Functionality to a Screen or Control: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
No edit summary
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Links ==
[[Testing Schedule for Delete Functionality]]
== Overview ==
== Overview ==
Nearly all the code to delete a specific record from a table can be auto-generated by Open Petra's code generation applications.  A small amount of code is generated on the client and a larger amount is generated in the server.  You can activate all this code by adding a few simple lines to the YAML file that defines the behaviour of the screen or user control.  When you do this you will get
Nearly all the code to delete a specific record from a table can be auto-generated by Open Petra's code generation applications.  A small amount of code is generated on the client and a larger amount is generated in the server.  You can activate all this code by adding a few simple lines to the YAML file that defines the behaviour of the screen or user control.  When you do this you will get
Line 37: Line 40:
This has a panel containing the two buttons docked to the right.  Each button specifies the associated action and, in order to make the buttons have the same size, they are both stretched horizontally.
This has a panel containing the two buttons docked to the right.  Each button specifies the associated action and, in order to make the buttons have the same size, they are both stretched horizontally.


It is as simple as that!  '''The only rules are that the button must be named btnDelete and the action must be called actDelete.'''  The label does not have to be ''Delete''.  The ActionClick does not have to be ''DeleteRecord'' but there is normally no reason to change these internal names.
It is as simple as that!  '''The only rules are that the button must be named btnDelete and the action must be called actDelete.'''  The label does not have to be ''Delete''.  The ActionClick should normally be ''DeleteRecord''.  If ActionClick is ''DeleteRecord'' then the event handler will be coded into the -generated.cs file.  If you choose a different name you will have to code the handler into the Manual.cs file.  You might choose to do this if you are going to code the entire deletion procedure manually, but if you want to make use of Pre/PostDeleteManual or DeleteRowManual it makes little sense to not use ''DeleteRecord''.
 
=== Avoiding the Reference Check ===
In a few cases it may be necessary to avoid performing the usage reference count check before executing the deletion code.  This typically happens on a screen that maintains two tables (like Partner/LocalDataOptions).  By design the second table is going to contain references to the rows of the main table.  However the manual delete code will ensure that the dependent rows in the second table are deleted before the rows in the main table.  So in this case you use the attribute '''SkipReferenceCheck=true''' to exclude the reference checking code. But now it is the manual coder's responsibility to ensure that the deletion works!
 
Here is the YAML from LocalDataOptions
<pre>
actDelete: {Label=&Delete, ActionClick=DeleteRecord, SkipReferenceCheck=true}
</pre>


== Generating the C# Code ==
== Generating the C# Code ==
Line 54: Line 65:


Please understand that once you have done these actions '''once''' on the YAML file there is no need to repeat them again because you now have generated all the code on the server that you need.  Any subsequent changes to the YAML file that you make (for example laying out the controls so that they look nice) can be compiled to C# and/or previewed in the normal way because the server code will not change when you do that.
Please understand that once you have done these actions '''once''' on the YAML file there is no need to repeat them again because you now have generated all the code on the server that you need.  Any subsequent changes to the YAML file that you make (for example laying out the controls so that they look nice) can be compiled to C# and/or previewed in the normal way because the server code will not change when you do that.
== Standard Deletion Code ==
All the standard deletion code is encapsulated in a TDeleteGridRows class that is part of the Ict.Petra.Client.CommonForms namespace.  This class exposes an interface IDeleteGridRows that is implemented by the auto-generated code.  So there is very little code in the -generated.cs file and it is, of course, entirely optional to have deletion code in the -ManualCode.cs file.


== Auto-generated Client Code ==
== Auto-generated Client Code ==
Line 65: Line 79:
     }
     }
</pre>
</pre>
However, please see later in this section why you might want to implement this method in your manual code file.


Second there is a line of code that handles the enable/disable state of the button
Second there is a line of code that handles the enable/disable state of the button
<pre>
<pre>
         FPetraUtilsObject.EnableAction("actDelete", ((ARow != null) && (ARow.Deletable == true) && !FPetraUtilsObject.DetailProtectedMode));
         btnDelete.Enabled = pnlDetails.Enabled;
</pre>
or, where a table has a 'deletable' flag
<pre>
        btnDelete.Enabled = ((grdDetails.SelectedDataRowsAsDataRowView.Length > 1) || ((ARow != null) && (ARow.DeletableFlag == true))) && pnlDetails.Enabled;
</pre>
</pre>


Finally there is the deletion code itself - in this example in the method DeletePBusiness()
Finally there is the call to the DeleteGridRows class to execute the deletion itself.
<pre>
<pre>
     private void DeletePBusiness()
     private void DeletePBusiness()
     {
     {
         bool AllowDeletion = true;
         TDeleteGridRows.DeleteRows(this, grdDetails, FPetraUtilsObject, this);
        bool DeletionPerformed = false;
    }
        string DeletionQuestion = Catalog.GetString("Are you sure you want to delete the current row?");
</pre>
        string CompletionMessage = string.Empty;
        TVerificationResultCollection VerificationResults = null;


        if (FPreviouslySelectedDetailRow == null)
After that there are the interface implementation methods to
* GetReferenceCount()
* GetDefaultDeletionQuestion()
* HandlePreDelete()
* HandleDeleteRow()
* HandlePostDelete()
* IsRowDeletable()
Normally the -generated.cs file puts default code in these placeholders but if there is associated manual code the generator will call it.
 
=== Content of the Default Deletion Behaviour ===
This is the code that runs in the standard implementation of row deletion.  This code is in the TDeleteGridRows class.  Only the single row deletion code is shown.
<pre>
        public static bool DeleteRows(IDeleteGridRows ACallerFormOrControl,
            TSgrdDataGrid AGrid,
            TFrmPetraEditUtils APetraUtilsObject,
            IButtonPanel AButtonPanel)
         {
         {
             return;
             DataRow currentDataRow = ACallerFormOrControl.GetSelectedDataRow();
        }
            Int32 currentRowIndex = ACallerFormOrControl.GetSelectedRowIndex();


        this.Cursor = Cursors.WaitCursor;
            if ((currentDataRow == null) || (currentRowIndex == -1))
        TRemote.MPartner.ReferenceCount.WebConnectors.GetCacheableRecordReferenceCount(
             {
             "BusinessCodeList",
                return false;
            DataUtilities.GetPKValuesFromDataRow(FPreviouslySelectedDetailRow),
             }
             out VerificationResults);
        this.Cursor = Cursors.Default;


        if ((VerificationResults != null)
            string CompletionMessage = String.Empty;
            && (VerificationResults.Count > 0))
             DataRowView[] HighlightedRows = AGrid.SelectedDataRowsAsDataRowView;
        {
             MessageBox.Show(Messages.BuildMessageFromVerificationResult(
                    Catalog.GetString("Record cannot be deleted!") +
                    Environment.NewLine +
                    Catalog.GetPluralString("Reason:", "Reasons:", VerificationResults.Count),
                    VerificationResults),
                    Catalog.GetString("Record Deletion"));
            return;
        }


        if(AllowDeletion)
             if (HighlightedRows.Length == 1)
        {
             if ((MessageBox.Show(DeletionQuestion,
                    Catalog.GetString("Confirm Delete"),
                    MessageBoxButtons.YesNo,
                    MessageBoxIcon.Question,
                    MessageBoxDefaultButton.Button2) == System.Windows.Forms.DialogResult.Yes))
             {
             {
                 int SelectedRow = grdDetails.SelectedRowIndex();
                 // Single row deletion
                FPreviouslySelectedDetailRow.Delete();
 
                 DeletionPerformed = true;
                 TVerificationResultCollection VerificationResults = null;


                 if (DeletionPerformed)
                 if (TVerificationHelper.IsNullOrOnlyNonCritical(APetraUtilsObject.VerificationResultCollection))
                 {
                 {
                     FPetraUtilsObject.SetChangedFlag();
                     ACallerFormOrControl.GetReferenceCount(currentDataRow, APetraUtilsObject.MaxReferenceCountOnDelete, out VerificationResults);
                    // Select and display the details of the nearest row to the one previously selected
                    SelectRowInGrid(SelectedRow);
                 }
                 }
            }
        }


        if(DeletionPerformed && CompletionMessage.Length > 0)
                if ((VerificationResults != null)
        {
                    && (VerificationResults.Count > 0))
            MessageBox.Show(CompletionMessage,
                {
                            Catalog.GetString("Deletion Completed"));
                    TCascadingReferenceCountHandler countHandler = new TCascadingReferenceCountHandler();
        }
                    TFrmExtendedMessageBox.TResult result = countHandler.HandleReferences(APetraUtilsObject, VerificationResults, true);
    }
 
</pre>
                    if (result == TFrmExtendedMessageBox.TResult.embrYes)
                    {
                        // repeat the count but with no limit to the number of references
                        ACallerFormOrControl.GetReferenceCount(currentDataRow, 0, out VerificationResults);
                        countHandler.HandleReferences(APetraUtilsObject, VerificationResults, false);
                    }


This snippet of code does the following.
                    return false;
* It checks that the row is not empty
                }
* It queries the server to find out of the row is currently referenced by another table or tables.  If it is it displays a helpful message and exits the function.
* It asks the user to confirm deletion.  The user can abandon deletion at this point.
* It deletes the record
* It displays a 'success' message


The reference count message is something like:  You cannot delete this record.  It is used by 3 records in the XXX table and 19 records in the YYY table.  An example of a record that uses this record is found in Partner with a key of 43005009.
                string DeletionQuestion = ACallerFormOrControl.GetDefaultDeletionQuestion();
                bool AllowDeletion = true;
                bool DeletionPerformed = false;


You can modify the behaviour of the deletion process by including any or all of the following methods in your manual code file.
                ACallerFormOrControl.HandlePreDelete(currentDataRow, ref AllowDeletion, ref DeletionQuestion);


<pre>
                if (AllowDeletion)
private bool PreDeleteManual(PInternationalPostalTypeRow ARowToDelete, ref string ADeletionQuestion)
                {
                    if ((MessageBox.Show(DeletionQuestion,
                            MCommonResourcestrings.StrConfirmDeleteTitle,
                            MessageBoxButtons.YesNo,
                            MessageBoxIcon.Question,
                            MessageBoxDefaultButton.Button2) == System.Windows.Forms.DialogResult.Yes))
                    {
                        try
                        {
                            if (!ACallerFormOrControl.HandleDeleteRow(currentDataRow, ref DeletionPerformed, ref CompletionMessage))
                            {
                                currentDataRow.Delete();
                                DeletionPerformed = true;
                            }
                        }
                        catch (Exception ex)
                        {
                            MessageBox.Show(String.Format(MCommonResourcestrings.StrErrorWhileDeleting,
                                    Environment.NewLine, ex.Message),
                                MCommonResourcestrings.StrGenericError,
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Warning);
                        }


private bool DeleteRowManual(PInternationalPostalTypeRow ARowToDelete, out string ACompletionMessage)
                        if (DeletionPerformed)
                        {
                            APetraUtilsObject.SetChangedFlag();
                        }


private void PostDeleteManual(PInternationalPostalTypeRow ARowToDelete, bool AAllowDeletion, bool ADeletionPerformed, string ACompletionMessage)
                        // Select and display the details of the nearest row to the one previously selected
</pre>
                        ACallerFormOrControl.SelectRowInGrid(currentRowIndex);
                        // Clear any errors left over from  the deleted row
                        APetraUtilsObject.VerificationResultCollection.Clear();
 
                        if (AButtonPanel != null)
                        {
                            AButtonPanel.UpdateRecordNumberDisplay();
                        }
                    }
                }
 
                if (!ACallerFormOrControl.HandlePostDelete(currentDataRow, AllowDeletion, DeletionPerformed, CompletionMessage))
                {
                    if (DeletionPerformed && (CompletionMessage.Length > 0))
                    {
                        MessageBox.Show(CompletionMessage, MCommonResourcestrings.StrDeletionCompletedTitle);
                    }
                }
 
                return DeletionPerformed;
            }
</pre>
 
This snippet of code does the following.
* It checks that the row is not empty
* It queries the server to find out of the row is currently referenced by another table or tables.  If it is it displays a helpful message and exits the function.
* It asks the user to confirm deletion.  The user can abandon deletion at this point.  The default deletion question shows the label text and the data text for the primary key control.  Usually the question will be correct but sometimes you may need to frame your own question inside PreDeleteManual().
* It deletes the record.  Note that this step is inside a try/catch block.  If you need to write your own deletion code inside DeleteRowManual() please do not use a try/catch block for that method but let the exception be caught inside this code.
* It sets the flag that enables the Save button
* It selects the correct row in the grid now that the row has been deleted.  Note that this is all that is necessary even if there are no no more rows in the grid.
* It displays a 'success' message
 
The reference count message is something like:  You cannot delete this record.  It is used by 3 records in the XXX table and 19 records in the YYY table.  An example of a record that uses this record is found in Partner with a key of 43005009.
 
=== Manual Code Options ===
You can modify the behaviour of the deletion process by including any or all of the following methods in your manual code file.
 
<pre>
private bool PreDeleteManual(PInternationalPostalTypeRow ARowToDelete, ref string ADeletionQuestion)
 
private bool DeleteRowManual(PInternationalPostalTypeRow ARowToDelete, ref string ACompletionMessage)
 
private void PostDeleteManual(PInternationalPostalTypeRow ARowToDelete, bool AAllowDeletion, bool ADeletionPerformed, string ACompletionMessage)
</pre>


* If the first method returns false the deletion will be abandoned.  You can use this method to modify the deletion question.
* If the first method returns false the deletion will be abandoned.  You can use this method to modify the deletion question.
* The second method can be used to replace the standard record deletion code with more complex code of your choice.  You can modify the completion message.  You return true or false depending on whether the deletion succeeded.
* The second method can be used to replace the standard record deletion code with more complex code of your choice.  You can modify the completion message.  You return true or false depending on whether the deletion succeeded.
* The third optional manual method can be used to do manual clean-up after deletion has occurred.  The parameters tell you if deletion was initially allowed/disallowed, whether deletion actually succeeded and what the recommended message is that should be shown.
* The third optional manual method can be used to do manual clean-up after deletion has occurred.  The parameters tell you if deletion was initially allowed/disallowed, whether deletion actually succeeded and what the recommended message is that should be shown.
Finally it is worth noting that you can effectively run a pre-pre-delete check to ensure that it is valid for the user to delete the highlighted row(s).  If you include the button click handler in your '''manual code file''' (i.e. include 'private void DeleteRecord(Object sender, EventArgs e)') then the auto-generator will not write that method into the generated file.  Now inside the manual implementation you can test whether or not to allow the standard deletion code to run at all.  If the conditions are acceptable your manual code should call 'DeletePBusiness()' - or whatever the standard method is called for your data table - or simply return after displaying a message box to the client explaining why the row cannot be deleted.
== Multi-Row Deletion ==
The auto-generated code supports multi-row deletion.  In fact if the generator creates deletion code it will always include code that handles the Details Grid having multiple highlighted rows.  But note that it is the grid itself that determines whether multi-row select is enabled.  By default the generator will enable multi-row select on grdDetails where there is a btnDelete in the YAML file.  Usually this will be the desired behaviour.  But if you want to ensure that only single rows can be selected you need to apply the attribute '''EnableMultiSelection=false''' to the grdDetails.  Note that this attribute only applies to grdDetails.
When multiple rows are highlighted the deletion code is executed for each row but the logic sequence is subtly different from single row deletion.
* The standard deletion question is not used.  Instead a simple question is always asked - 'Do you want to delete the N highlighted rows?'
* PreDeleteManual, if it exists, is still called and if it returns false, deletion is not performed for this row.
* The reference count is checked for the row and if it is non-zero the row is not deleted
* DeleteRowManual is called for the row and ACompletionMessage is passed in.  If you want a completion message (which would be unusual but might be appropriate if the data is always saved to disk, for example), you need to test whether ACompletionMessage is an empty string.  If it is this is the first time that DeleteRow has been called.  If it is not then you have already set the message once and you may wish to change it now that you know we are deleting multiple rows.
* PostDeleteManual is called each time, if it exists, but always with a Completion Message of empty string
* After the last highlighted row has been deleted the standard code will report how many rows were in fact deleted.  The user will be able to review any errors or reasons why some rows were not successfully deleted.  In addition the completion message is displayed.


== Auto-generated Server Code ==
== Auto-generated Server Code ==
Line 165: Line 260:


The implementations are all found in the '''web''' folder beneath Server/lib/ModuleName in a file named ReferenceCount-generated.cs.  So, for example, there is a file ''csharp/ICT/Petra/Server/lib/MPartner/ReferenceCount-generated.cs''.  These implementations all call standard Data Access methods to determine the reference counts and construct a Verification Result Collection that should be returned to the client.
The implementations are all found in the '''web''' folder beneath Server/lib/ModuleName in a file named ReferenceCount-generated.cs.  So, for example, there is a file ''csharp/ICT/Petra/Server/lib/MPartner/ReferenceCount-generated.cs''.  These implementations all call standard Data Access methods to determine the reference counts and construct a Verification Result Collection that should be returned to the client.
== Master/Detail 'Setup' Screens: Reference Check Facility ==
The file \csharp\ICT\Petra\Client\CommonForms\DeleteGridRows.cs contains the public Method '<code>MasterDetailFormsSpecialPreDeleteCheck</code>'. This gets called only by Setup screens (Maintain Table screens) that feature Master/Detail record maintenance. Such screens call this Method from within their 'PreDeleteManual' Method to determine whether the last 'Detail' record can be deleted, or if the user needs to press 'Save' before that is allowed.


== Delete Button Implementation (As was on 15 April) ==
== Delete Button Implementation (As was on 15 April) ==
Line 1,365: Line 1,463:


== Delete Button Implementation ==
== Delete Button Implementation ==
Analysis run at 16:05 on 16/04/2013.<br/>All the files listed below have either a 'New' button or an 'Add' button with a name '''containing''' btnNew or btnAdd
Analysis run at 21:54 on 12/05/2013.<br/>All the files listed below have either a 'New' button or an 'Add' button with a name '''containing''' btnNew or btnAdd


=== Screens Based on Template: WindowEdit (7 files use this template. The following have Add/Delete functionality) ===
=== Screens Based on Template: WindowEdit (7 files use this template. The following have Add/Delete functionality) ===
{| border="1" cellpadding="5" cellspacing="0"
{| border="1" cellpadding="5" cellspacing="0" style="font-size:x-small"
!Filename !! DetailTable !! Has New Button !! Has Delete Button !! Has Auto-delete !! Has ReferenceCount !! Has Deletable Flag !! Calls .Delete() !! Manual Calls Auto !! Client/Server Match
!Filename !! DetailTable !! Has New Button !! Has Delete Button !! Has Auto-delete !! Has ReferenceCount !! Has Deletable Flag !! Has Enable Delete !! Calls .Delete() !! Manual Calls Auto !! PreDelete !! DeleteRow !! PostDelete !! Client/Server Match !! Multi Select
|-
|-
|MSysMan\Gui\MaintainUsers.yaml
|MFinance\Gui\Common\BankStatementImport.yaml
|SUser
|
|Yes
|Yes
|style="background:LightSkyBlue" |No
|n/a
|Yes
|Yes
|style="background:yellow" |No
|style="background:yellow" |No
|No
|style="background:yellow" |No
|style="background:yellow" |Yes
|style="background:yellow" |Yes
|No
|No
|No
|No
|No
|No
|n/a
|-
|MPartner\Gui\PersonnelStaffData.yaml
|PmStaffData
|Yes
|Yes
|style="background:yellow" |No
|style="background:yellow" |No
|Yes
|No
|style="background:yellow" |Yes
|No
|No
|Yes
|-
|-
|MFinance\Gui\Setup\GiftMotivationSetup.yaml
|MFinance\Gui\Setup\GiftMotivationSetup.yaml
Line 1,400: Line 1,492:
|Yes
|Yes
|No
|No
|Yes
|style="background:LightSkyBlue" |Yes
|style="background:LightSkyBlue" |Yes
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
Line 1,409: Line 1,506:
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
Line 1,419: Line 1,521:
|Yes
|Yes
|Yes
|Yes
|style="background:yellow" |No
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|style="background:yellow" |Yes
|No
|No
|Yes
|style="background:LightSkyBlue" |Yes
|-
|No
|MFinance\Gui\Common\BankStatementImport.yaml
|No
|
|Yes
|Yes
|Yes
|Yes
|style="background:yellow" |No
|style="background:yellow" |No
|No
|style="background:yellow" |Yes
|style="background:yellow" |Yes
|style="background:yellow" |No
|}
=== Screens Based on Template: WindowTDS (6 files use this template. The following have Add/Delete functionality) ===
{| border="1" cellpadding="5" cellspacing="0"
!Filename !! DetailTable !! Has New Button !! Has Delete Button !! Has Auto-delete !! Has ReferenceCount !! Has Deletable Flag !! Calls .Delete() !! Manual Calls Auto !! Client/Server Match
|}
=== Screens Based on Template: WindowMaintainTable (8 files use this template. The following have Add/Delete functionality) ===
{| border="1" cellpadding="5" cellspacing="0"
!Filename !! DetailTable !! Has New Button !! Has Delete Button !! Has Auto-delete !! Has ReferenceCount !! Has Deletable Flag !! Calls .Delete() !! Manual Calls Auto !! Client/Server Match
|-
|-
|MSysMan\Gui\Setup\SecurityGroupSetup.yaml
|MPartner\Gui\PersonnelStaffData.yaml
|SGroup
|PmStaffData
|Yes
|Yes
|Yes
|Yes
Line 1,454: Line 1,540:
|Yes
|Yes
|No
|No
|Yes
|No
|No
|No
|No
|style="background:LightSkyBlue" |Yes
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPersonnel\Gui\Setup\ApplicationTypeSetup.yaml
|MSysMan\Gui\MaintainUsers.yaml
|PtApplicationType
|SUser
|Yes
|style="background:LightSkyBlue" |No
|n/a
|Yes
|No
|style="background:LightSkyBlue" |n/a
|No
|No
|No
|No
|No
|n/a
|No
|}
 
=== Screens Based on Template: WindowTDS (6 files use this template. The following have Add/Delete functionality) ===
{| border="1" cellpadding="5" cellspacing="0" style="font-size:x-small"
!Filename !! DetailTable !! Has New Button !! Has Delete Button !! Has Auto-delete !! Has ReferenceCount !! Has Deletable Flag !! Has Enable Delete !! Calls .Delete() !! Manual Calls Auto !! PreDelete !! DeleteRow !! PostDelete !! Client/Server Match !! Multi Select
|}
 
=== Screens Based on Template: WindowMaintainTable (8 files use this template. The following have Add/Delete functionality) ===
{| border="1" cellpadding="5" cellspacing="0" style="font-size:x-small"
!Filename !! DetailTable !! Has New Button !! Has Delete Button !! Has Auto-delete !! Has ReferenceCount !! Has Deletable Flag !! Has Enable Delete !! Calls .Delete() !! Manual Calls Auto !! PreDelete !! DeleteRow !! PostDelete !! Client/Server Match !! Multi Select
|-
|MCommon\Gui\Setup\InternationalPostalTypeSetup.yaml
|PInternationalPostalType
|Yes
|Yes
|Yes
|Yes
|Yes
Line 1,467: Line 1,585:
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\Setup\MailingSetup.yaml
|MCommon\Gui\Setup\SetupCurrency.yaml
|PMailing
|ACurrency
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
Line 1,486: Line 1,613:
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|No
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
Line 1,494: Line 1,626:
|ACorporateExchangeRate
|ACorporateExchangeRate
|Yes
|Yes
|style="background:yellow" |No
|Yes
|n/a
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|style="background:LightSkyBlue" |Yes
|No
|No
|n/a
|No
|Yes
|Yes
|-
|-
|MFinance\Gui\Setup\SetupDailyExchangeRate.yaml
|MFinance\Gui\Setup\SetupDailyExchangeRate.yaml
Line 1,509: Line 1,646:
|Yes
|Yes
|No
|No
|style="background:yellow" |No
|No
|No
|style="background:yellow" |Yes
|style="background:yellow" |Yes
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MCommon\Gui\Setup\InternationalPostalTypeSetup.yaml
|MPartner\Gui\Setup\MailingSetup.yaml
|PInternationalPostalType
|PMailing
|Yes
|Yes
|Yes
|Yes
|style="background:yellow" |No
|Yes
|Yes
|Yes
|Yes
|No
|No
|style="background:yellow" |Yes
|Yes
|-
|MCommon\Gui\Setup\SetupCurrency.yaml
|ACurrency
|Yes
|Yes
|style="background:yellow" |No
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|}
|Yes
 
=== Screens Based on Template: WindowMaintainCacheableTable (57 files use this template. The following have Add/Delete functionality) ===
{| border="1" cellpadding="5" cellspacing="0"
!Filename !! DetailTable !! CacheableTable !! Has New Button !! Has Delete Button !! Has Auto-delete !! Has ReferenceCount !! Has Deletable Flag !! Calls .Delete() !! Manual Calls Auto !! Client/Server Match
|-
|-
|MSysMan\Gui\Setup\LanguageSpecificSetup.yaml
|MPersonnel\Gui\Setup\ApplicationTypeSetup.yaml
|SLanguageSpecific
|PtApplicationType
|LanguageSpecificList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
Line 1,550: Line 1,682:
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPersonnel\Gui\Setup\AbilityAreaSetup.yaml
|MSysMan\Gui\Setup\SecurityGroupSetup.yaml
|PtAbilityArea
|SGroup
|AbilityAreaList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|Yes
|No
|-
|MPersonnel\Gui\Setup\AbilityLevelSetup.yaml
|PtAbilityLevel
|AbilityLevelList
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|Yes
|Yes
|Yes
|}
=== Screens Based on Template: WindowMaintainCacheableTable (57 files use this template. The following have Add/Delete functionality) ===
{| border="1" cellpadding="5" cellspacing="0" style="font-size:x-small"
!Filename !! DetailTable !! CacheableTable !! Has New Button !! Has Delete Button !! Has Auto-delete !! Has ReferenceCount !! Has Deletable Flag !! Has Enable Delete !! Calls .Delete() !! Manual Calls Auto !! PreDelete !! DeleteRow !! PostDelete !! Client/Server Match !! Multi Select
|-
|-
|MPersonnel\Gui\Setup\ApplicantStatusSetup.yaml
|MCommon\Gui\Setup\CountrySetup.yaml
|PtApplicantStatus
|PCountry
|ApplicantStatusList
|CountryList
|Yes
|Yes
|Yes
|Yes
|Yes
Line 1,584: Line 1,717:
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPersonnel\Gui\Setup\ArrivalDeparturePointSetup.yaml
|MCommon\Gui\Setup\FrequencySetup.yaml
|PtArrivalPoint
|AFrequency
|ArrivalDeparturePointList
|FrequencyList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPersonnel\Gui\Setup\Country_EventLevelSetup.yaml
|MCommon\Gui\Setup\LanguageCodeSetup.yaml
|PtOutreachPreferenceLevel
|PLanguage
|OutreachPreferenceLevelList
|LanguageCodeList
|Yes
|Yes
|Yes
|Yes
|Yes
Line 1,608: Line 1,751:
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPersonnel\Gui\Setup\DocumentTypeCategorySetup.yaml
|MCommon\Gui\Setup\LocalDataFieldSetup.yaml
|PmDocumentCategory
|PDataLabel
|DocumentTypeCategoryList
|DataLabelList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|style="background:LightSkyBlue" |Yes
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPersonnel\Gui\Setup\DocumentTypeSetup.yaml
|MConference\Gui\Setup\ConferenceCostTypeSetup.yaml
|PmDocumentType
|PcCostType
|DocumentTypeList
|ConferenceCostTypeList
|Yes
|Yes
|Yes
|Yes
|Yes
Line 1,632: Line 1,785:
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPersonnel\Gui\Setup\DriverStatusSetup.yaml
|MFinance\Gui\Setup\EmailDestinationSetup.yaml
|PtDriverStatus
|AEmailDestination
|DriverStatusList
|EmailDestinationList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPersonnel\Gui\Setup\EventRoleSetup.yaml
|MFinance\Gui\Setup\SetupAdminGrantsPayable.yaml
|PtCongressCode
|AFeesPayable
|EventRoleList
|FeesPayableList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPersonnel\Gui\Setup\JobAssignmentTypeSetup.yaml
|MFinance\Gui\Setup\SetupAdminGrantsReceivable.yaml
|PtAssignmentType
|AFeesReceivable
|JobAssignmentTypeList
|FeesReceivableList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPersonnel\Gui\Setup\LanguageLevelSetup.yaml
|MFinance\Gui\Setup\SetupCostCentreTypes.yaml
|PtLanguageLevel
|ACostCentreTypes
|LanguageLevelList
|CostCentreTypesList
|Yes
|Yes
|Yes
|Yes
|Yes
Line 1,682: Line 1,855:
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPersonnel\Gui\Setup\LeadershipRatingSetup.yaml
|MFinance\Gui\Setup\SetupMethodOfGiving.yaml
|PtLeadershipRating
|AMethodOfGiving
|LeadershipRatingList
|MethodOfGivingList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPersonnel\Gui\Setup\LeavingCodeSetup.yaml
|MFinance\Gui\Setup\SetupMethodOfPayment.yaml
|PtLeavingCode
|AMethodOfPayment
|LeavingCodeList
|MethodOfPaymentList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPersonnel\Gui\Setup\OrganisationContactSetup.yaml
|MFinance\Gui\Setup\SetupSuspenseAccount.yaml
|PtContact
|ASuspenseAccount
|ContactList
|SuspenseAccountList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPersonnel\Gui\Setup\PassportTypeSetup.yaml
|MPartner\Gui\Setup\AcquisitionCodeSetup.yaml
|PtPassportType
|PAcquisition
|PassportTypeList
|AcquisitionCodeList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
Line 1,730: Line 1,923:
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPersonnel\Gui\Setup\PositionSetup.yaml
|MPartner\Gui\Setup\AddresseeTypeSetup.yaml
|PtPosition
|PAddresseeType
|PositionList
|AddresseeTypeList
|Yes
|Yes
|Yes
|Yes
|Yes
Line 1,740: Line 1,938:
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPersonnel\Gui\Setup\ProfessionalAreaSetup.yaml
|MPartner\Gui\Setup\BusinessCodeSetup.yaml
|PtQualificationArea
|PBusiness
|QualificationAreaList
|BusinessCodeList
|Yes
|Yes
|Yes
|Yes
|Yes
Line 1,754: Line 1,957:
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPersonnel\Gui\Setup\QualificationLevelSetup.yaml
|MPartner\Gui\Setup\ContactAttributeSetup.yaml
|PtQualificationLevel
|PContactAttribute
|QualificationLevelList
|ContactAttributeList
|Yes
|Yes
|Yes
|Yes
|Yes
Line 1,765: Line 1,971:
|Yes
|Yes
|No
|No
|Yes
|No
|No
|No
|style="background:LightSkyBlue" |Yes
|style="background:LightSkyBlue" |Yes
|No
|Yes
|Yes
|Yes
|-
|-
|MPersonnel\Gui\Setup\SkillCategorySetup.yaml
|MPartner\Gui\Setup\ContactMethodSetup.yaml
|PtSkillCategory
|PMethodOfContact
|SkillCategoryList
|MethodOfContactList
|Yes
|Yes
|Yes
|Yes
|Yes
Line 1,776: Line 1,989:
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPersonnel\Gui\Setup\SkillLevelSetup.yaml
|MPartner\Gui\Setup\DenominationCodeSetup.yaml
|PtSkillLevel
|PDenomination
|SkillLevelList
|DenominationList
|Yes
|Yes
|Yes
|Yes
|Yes
Line 1,790: Line 2,008:
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPersonnel\Gui\Setup\TransportTypeSetup.yaml
|MPartner\Gui\Setup\InterestCategorySetup.yaml
|PtTravelType
|PInterestCategory
|TransportTypeList
|InterestCategoryList
|Yes
|Yes
|Yes
|Yes
|Yes
Line 1,801: Line 2,022:
|Yes
|Yes
|No
|No
|Yes
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\Setup\AcquisitionCodeSetup.yaml
|MPartner\Gui\Setup\InterestSetup.yaml
|PAcquisition
|PInterest
|AcquisitionCodeList
|InterestList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\Setup\AddresseeTypeSetup.yaml
|MPartner\Gui\Setup\LocalDataOptionListNameSetup.yaml
|PAddresseeType
|PDataLabelLookupCategory
|AddresseeTypeList
|DataLabelLookupCategoryList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\Setup\BusinessCodeSetup.yaml
|MPartner\Gui\Setup\LocalDataOptionsSetup.yaml
|PBusiness
|PDataLabelLookup
|BusinessCodeList
|DataLabelLookupList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|Yes
|-
|MPartner\Gui\Setup\ContactAttributeSetup.yaml
|PContactAttribute
|ContactAttributeList
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\Setup\ContactMethodSetup.yaml
|MPartner\Gui\Setup\LocationTypeSetup.yaml
|PMethodOfContact
|PLocationType
|MethodOfContactList
|LocationTypeList
|Yes
|Yes
|Yes
|Yes
|Yes
Line 1,862: Line 2,093:
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\Setup\DenominationCodeSetup.yaml
|MPartner\Gui\Setup\MaritalStatusSetup.yaml
|PDenomination
|PtMaritalStatus
|DenominationList
|MaritalStatusList
|Yes
|Yes
|Yes
|Yes
|Yes
Line 1,872: Line 2,108:
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\Setup\InterestCategorySetup.yaml
|MPartner\Gui\Setup\OccupationCodeSetup.yaml
|PInterestCategory
|POccupation
|InterestCategoryList
|OccupationList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\Setup\InterestSetup.yaml
|MPartner\Gui\Setup\PartnerStatusSetup.yaml
|PInterest
|PPartnerStatus
|InterestList
|PartnerStatusList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\Setup\LocalDataOptionListNameSetup.yaml
|MPartner\Gui\Setup\PartnerTypeSetup.yaml
|PDataLabelLookupCategory
|PType
|DataLabelLookupCategoryList
|PartnerTypeList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
Line 1,910: Line 2,162:
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\Setup\LocalDataOptionsSetup.yaml
|MPartner\Gui\Setup\PublicationCostSetup.yaml
|PDataLabelLookup
|PPublicationCost
|DataLabelLookupList
|PublicationCostList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\Setup\LocationTypeSetup.yaml
|MPartner\Gui\Setup\PublicationSetup.yaml
|PLocationType
|PPublication
|LocationTypeList
|PublicationList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\Setup\MaritalStatusSetup.yaml
|MPartner\Gui\Setup\ReasonSubscriptionCancelledSetup.yaml
|PtMaritalStatus
|PReasonSubscriptionCancelled
|MaritalStatusList
|ReasonSubscriptionCancelledList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\Setup\OccupationCodeSetup.yaml
|MPartner\Gui\Setup\ReasonSubscriptionGivenSetup.yaml
|POccupation
|PReasonSubscriptionGiven
|OccupationList
|ReasonSubscriptionGivenList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\Setup\PartnerStatusSetup.yaml
|MPartner\Gui\Setup\RelationCategorySetup.yaml
|PPartnerStatus
|PRelationCategory
|PartnerStatusList
|RelationCategoryList
|Yes
|Yes
|Yes
|Yes
|Yes
Line 1,968: Line 2,244:
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\Setup\PartnerTypeSetup.yaml
|MPartner\Gui\Setup\RelationshipSetup.yaml
|PType
|PRelation
|PartnerTypeList
|RelationList
|Yes
|Yes
|Yes
|Yes
|Yes
Line 1,982: Line 2,263:
|No
|No
|No
|No
|Yes
|-
|MPartner\Gui\Setup\PublicationCostSetup.yaml
|PPublicationCost
|PublicationCostList
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\Setup\PublicationSetup.yaml
|MPersonnel\Gui\Setup\AbilityAreaSetup.yaml
|PPublication
|PtAbilityArea
|PublicationList
|AbilityAreaList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\Setup\ReasonSubscriptionCancelledSetup.yaml
|MPersonnel\Gui\Setup\AbilityLevelSetup.yaml
|PReasonSubscriptionCancelled
|PtAbilityLevel
|ReasonSubscriptionCancelledList
|AbilityLevelList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\Setup\ReasonSubscriptionGivenSetup.yaml
|MPersonnel\Gui\Setup\ApplicantStatusSetup.yaml
|PReasonSubscriptionGiven
|PtApplicantStatus
|ReasonSubscriptionGivenList
|ApplicantStatusList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
Line 2,030: Line 2,315:
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\Setup\RelationCategorySetup.yaml
|MPersonnel\Gui\Setup\ArrivalDeparturePointSetup.yaml
|PRelationCategory
|PtArrivalPoint
|RelationCategoryList
|ArrivalDeparturePointList
|Yes
|Yes
|Yes
|Yes
|Yes
Line 2,042: Line 2,331:
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\Setup\RelationshipSetup.yaml
|MPersonnel\Gui\Setup\Country_EventLevelSetup.yaml
|PRelation
|PtOutreachPreferenceLevel
|RelationList
|OutreachPreferenceLevelList
|Yes
|Yes
|Yes
|Yes
|Yes
Line 2,054: Line 2,348:
|No
|No
|No
|No
|Yes
|-
|MFinance\Gui\Setup\EmailDestinationSetup.yaml
|AEmailDestination
|EmailDestinationList
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MFinance\Gui\Setup\SetupAdminGrantsPayable.yaml
|MPersonnel\Gui\Setup\DocumentTypeCategorySetup.yaml
|AFeesPayable
|PmDocumentCategory
|FeesPayableList
|DocumentTypeCategoryList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MFinance\Gui\Setup\SetupAdminGrantsReceivable.yaml
|MPersonnel\Gui\Setup\DocumentTypeSetup.yaml
|AFeesReceivable
|PmDocumentType
|FeesReceivableList
|DocumentTypeList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MFinance\Gui\Setup\SetupCostCentreTypes.yaml
|MPersonnel\Gui\Setup\DriverStatusSetup.yaml
|ACostCentreTypes
|PtDriverStatus
|CostCentreTypesList
|DriverStatusList
|Yes
|Yes
|Yes
|Yes
|Yes
Line 2,102: Line 2,399:
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MFinance\Gui\Setup\SetupMethodOfGiving.yaml
|MPersonnel\Gui\Setup\EventRoleSetup.yaml
|AMethodOfGiving
|PtCongressCode
|MethodOfGivingList
|EventRoleList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MFinance\Gui\Setup\SetupMethodOfPayment.yaml
|MPersonnel\Gui\Setup\JobAssignmentTypeSetup.yaml
|AMethodOfPayment
|PtAssignmentType
|MethodOfPaymentList
|JobAssignmentTypeList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MFinance\Gui\Setup\SetupSuspenseAccount.yaml
|MPersonnel\Gui\Setup\LanguageLevelSetup.yaml
|ASuspenseAccount
|PtLanguageLevel
|SuspenseAccountList
|LanguageLevelList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MConference\Gui\Setup\ConferenceCostTypeSetup.yaml
|MPersonnel\Gui\Setup\LeadershipRatingSetup.yaml
|PcCostType
|PtLeadershipRating
|ConferenceCostTypeList
|LeadershipRatingList
|Yes
|Yes
|Yes
|Yes
|Yes
Line 2,150: Line 2,467:
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MCommon\Gui\Setup\CountrySetup.yaml
|MPersonnel\Gui\Setup\LeavingCodeSetup.yaml
|PCountry
|PtLeavingCode
|CountryList
|LeavingCodeList
|Yes
|Yes
|Yes
|Yes
|Yes
Line 2,162: Line 2,484:
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MCommon\Gui\Setup\FrequencySetup.yaml
|MPersonnel\Gui\Setup\OrganisationContactSetup.yaml
|AFrequency
|PtContact
|FrequencyList
|ContactList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MCommon\Gui\Setup\LanguageCodeSetup.yaml
|MPersonnel\Gui\Setup\PassportTypeSetup.yaml
|PLanguage
|PtPassportType
|LanguageCodeList
|PassportTypeList
|Yes
|Yes
|Yes
|Yes
|Yes
Line 2,186: Line 2,518:
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MCommon\Gui\Setup\LocalDataFieldSetup.yaml
|MPersonnel\Gui\Setup\PositionSetup.yaml
|PDataLabel
|PtPosition
|DataLabelList
|PositionList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
Line 2,196: Line 2,534:
|Yes
|Yes
|No
|No
|style="background:LightSkyBlue" |Yes
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|}
=== Screens Based on Template: WindowEditUIConnector (3 files use this template. The following have Add/Delete functionality) ===
{| border="1" cellpadding="5" cellspacing="0"
!Filename !! DetailTable !! Has New Button !! Has Delete Button !! Has Auto-delete !! Has ReferenceCount !! Has Deletable Flag !! Calls .Delete() !! Manual Calls Auto !! Client/Server Match
|-
|-
|MFinance\Gui\Budget\MaintainBudget.yaml
|MPersonnel\Gui\Setup\ProfessionalAreaSetup.yaml
|ABudget
|PtQualificationArea
|QualificationAreaList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
Line 2,214: Line 2,553:
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|}
=== Screens Based on Template: WindowEditWebConnectorMasterDetail (1 files use this template. The following have Add/Delete functionality) ===
{| border="1" cellpadding="5" cellspacing="0"
!Filename !! DetailTable !! Has New Button !! Has Delete Button !! Has Auto-delete !! Has ReferenceCount !! Has Deletable Flag !! Calls .Delete() !! Manual Calls Auto !! Client/Server Match
|-
|-
|MFinance\Gui\AP\APEditDocument.yaml
|MPersonnel\Gui\Setup\QualificationLevelSetup.yaml
|AApDocumentDetail
|PtQualificationLevel
|QualificationLevelList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|}
|Yes
 
=== Screens Based on Template: ControlMaintainTable (29 files use this template. The following have Add/Delete functionality) ===
{| border="1" cellpadding="5" cellspacing="0"
!Filename !! DetailTable !! Has New Button !! Has Delete Button !! Has Auto-delete !! Has ReferenceCount !! Has Deletable Flag !! Calls .Delete() !! Manual Calls Auto !! Client/Server Match
|-
|-
|MPartner\Gui\UC_Applications.yaml
|MPersonnel\Gui\Setup\SkillCategorySetup.yaml
|PmGeneralApplication
|PtSkillCategory
|SkillCategoryList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\UC_FinanceDetails.yaml
|MPersonnel\Gui\Setup\SkillLevelSetup.yaml
|PBankingDetails
|PtSkillLevel
|SkillLevelList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
Line 2,257: Line 2,604:
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\UC_IndividualData_Abilities.yaml
|MPersonnel\Gui\Setup\TransportTypeSetup.yaml
|PmPersonAbility
|PtTravelType
|TransportTypeList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\UC_IndividualData_CommitmentPeriods.yaml
|MSysMan\Gui\Setup\LanguageSpecificSetup.yaml
|PmStaffData
|SLanguageSpecific
|LanguageSpecificList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|}
=== Screens Based on Template: WindowEditUIConnector (3 files use this template. The following have Add/Delete functionality) ===
{| border="1" cellpadding="5" cellspacing="0" style="font-size:x-small"
!Filename !! DetailTable !! Has New Button !! Has Delete Button !! Has Auto-delete !! Has ReferenceCount !! Has Deletable Flag !! Has Enable Delete !! Calls .Delete() !! Manual Calls Auto !! PreDelete !! DeleteRow !! PostDelete !! Client/Server Match !! Multi Select
|-
|-
|MPartner\Gui\UC_IndividualData_JobAssignments.yaml
|MFinance\Gui\Budget\MaintainBudget.yaml
|PmJobAssignment
|ABudget
|Yes
|Yes
|Yes
|Yes
Line 2,288: Line 2,655:
|Yes
|Yes
|No
|No
|Yes
|No
|No
|No
|No
|style="background:LightSkyBlue" |Yes
|style="background:LightSkyBlue" |Yes
|style="background:LightSkyBlue" |Yes
|Yes
|Yes
|Yes
|}
=== Screens Based on Template: WindowEditWebConnectorMasterDetail (1 files use this template. The following have Add/Delete functionality) ===
{| border="1" cellpadding="5" cellspacing="0" style="font-size:x-small"
!Filename !! DetailTable !! Has New Button !! Has Delete Button !! Has Auto-delete !! Has ReferenceCount !! Has Deletable Flag !! Has Enable Delete !! Calls .Delete() !! Manual Calls Auto !! PreDelete !! DeleteRow !! PostDelete !! Client/Server Match !! Multi Select
|-
|-
|MPartner\Gui\UC_IndividualData_Passport.yaml
|MFinance\Gui\AP\APEditDocument.yaml
|PmPassportDetails
|AApDocumentDetail
|Yes
|Yes
|Yes
|Yes
Line 2,299: Line 2,676:
|Yes
|Yes
|No
|No
|Yes
|No
|No
|No
|No
|style="background:LightSkyBlue" |Yes
|No
|style="background:LightSkyBlue" |Yes
|Yes
|Yes
|Yes
|}
=== Screens Based on Template: ControlMaintainTable (29 files use this template. The following have Add/Delete functionality) ===
{| border="1" cellpadding="5" cellspacing="0" style="font-size:x-small"
!Filename !! DetailTable !! Has New Button !! Has Delete Button !! Has Auto-delete !! Has ReferenceCount !! Has Deletable Flag !! Has Enable Delete !! Calls .Delete() !! Manual Calls Auto !! PreDelete !! DeleteRow !! PostDelete !! Client/Server Match !! Multi Select
|-
|-
|MPartner\Gui\UC_IndividualData_PersonalDocuments.yaml
|MFinance\Gui\Gift\UC_GiftBatches.yaml
|PmDocument
|AGiftBatch
|Yes
|Yes
|Yes
|Yes
Line 2,310: Line 2,697:
|Yes
|Yes
|No
|No
|Yes
|No
|No
|No
|No
|No
|style="background:LightSkyBlue" |Yes
|style="background:LightSkyBlue" |Yes
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\UC_IndividualData_PersonalLanguages.yaml
|MFinance\Gui\Gift\UC_GiftTransactions.yaml
|PmPersonLanguage
|AGiftDetail
|Yes
|Yes
|Yes
|Yes
Line 2,321: Line 2,713:
|Yes
|Yes
|No
|No
|Yes
|No
|No
|No
|No
|style="background:LightSkyBlue" |Yes
|style="background:LightSkyBlue" |Yes
|style="background:LightSkyBlue" |Yes
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\UC_IndividualData_PersonSkills.yaml
|MFinance\Gui\Gift\UC_RecurringGiftBatches.yaml
|PmPersonSkill
|ARecurringGiftBatch
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|style="background:LightSkyBlue" |Yes
|style="background:LightSkyBlue" |Yes
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\UC_IndividualData_PreviousExperience.yaml
|MFinance\Gui\Gift\UC_RecurringGiftTransactions.yaml
|PmPastExperience
|ARecurringGiftDetail
|Yes
|Yes
|Yes
|Yes
Line 2,343: Line 2,745:
|Yes
|Yes
|No
|No
|Yes
|No
|No
|No
|No
|style="background:LightSkyBlue" |Yes
|style="background:LightSkyBlue" |Yes
|style="background:LightSkyBlue" |Yes
|Yes
|Yes
|Yes
|-
|-
|MPartner\Gui\UC_IndividualData_ProgressReports.yaml
|MFinance\Gui\GL\UC_GLBatches.yaml
|PmPersonEvaluation
|ABatch
|Yes
|Yes
|Yes
|Yes
|style="background:LightSkyBlue" |No
|n/a
|Yes
|Yes
|No
|No
|style="background:LightSkyBlue" |n/a
|style="background:LightSkyBlue" |Yes
|No
|No
|No
|No
|Yes
|-
|MPartner\Gui\UC_PartnerRelationships.yaml
|PPartnerRelationship
|Yes
|Yes
|Yes
|Yes
|No
|No
|No
|No
|n/a
|No
|No
|Yes
|-
|-
|MPartner\Gui\UC_Subscriptions.yaml
|MFinance\Gui\GL\UC_GLJournals.yaml
|PSubscription
|AJournal
|Yes
|Yes
|Yes
|Yes
|style="background:LightSkyBlue" |No
|n/a
|Yes
|Yes
|No
|No
|style="background:LightSkyBlue" |n/a
|style="background:LightSkyBlue" |Yes
|No
|No
|No
|No
|No
|No
|n/a
|No
|-
|MFinance\Gui\GL\UC_GLTransactions.yaml
|ATransaction
|Yes
|Yes
|-
|MPartner\Gui\Extracts\UC_ExtractMaintain.yaml
|MExtract
|Yes
|Yes
|Yes
|Yes
|style="background:yellow" |???
|Yes
|Yes
|No
|No
|style="background:yellow" |Yes
|style="background:yellow" |Yes
|Yes
|Yes
|-
|No
|MPartner\Gui\Extracts\UC_ExtractMasterList.yaml
|No
|MExtractMaster
|No
|style="background:LightSkyBlue" |No
|style="background:LightSkyBlue" |Yes
|style="background:LightSkyBlue" |Yes
|Yes
|Yes
|style="background:yellow" |No
|Yes
|Yes
|No
|-
|style="background:yellow" |Yes
|MFinance\Gui\GL\UC_RecurringGLBatches.yaml
|style="background:yellow" |Yes
|ARecurringBatch
|Yes
|Yes
|-
|MFinance\Gui\Setup\UC_AccountAnalysisAttributes.yaml
|AAnalysisAttribute
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|Yes
|style="background:LightSkyBlue" |Yes
|style="background:LightSkyBlue" |Yes
|Yes
|Yes
|-
|-
|MFinance\Gui\Setup\UC_SetupAnalysisValues.yaml
|MFinance\Gui\GL\UC_RecurringGLJournals.yaml
|AFreeformAnalysis
|ARecurringJournal
|Yes
|Yes
|Yes
|Yes
Line 2,420: Line 2,825:
|Yes
|Yes
|No
|No
|Yes
|No
|No
|No
|No
|Yes
|-
|MFinance\Gui\GL\UC_GLBatches.yaml
|ABatch
|Yes
|style="background:LightSkyBlue" |No
|n/a
|Yes
|No
|No
|style="background:LightSkyBlue" |Yes
|style="background:LightSkyBlue" |Yes
|No
|style="background:LightSkyBlue" |Yes
|n/a
|-
|MFinance\Gui\GL\UC_GLJournals.yaml
|AJournal
|Yes
|Yes
|style="background:LightSkyBlue" |No
|n/a
|Yes
|Yes
|No
|style="background:LightSkyBlue" |Yes
|No
|n/a
|-
|-
|MFinance\Gui\GL\UC_GLTransactions.yaml
|MFinance\Gui\GL\UC_RecurringGLTransactions.yaml
|ATransaction
|ARecurringTransaction
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|style="background:LightSkyBlue" |Disabled
|No
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|style="background:LightSkyBlue" |Yes
|style="background:LightSkyBlue" |Yes
|n/a
|Yes
|Yes
|-
|-
|MFinance\Gui\GL\UC_RecurringGLBatches.yaml
|MFinance\Gui\Setup\UC_AccountAnalysisAttributes.yaml
|ARecurringBatch
|AAnalysisAttribute
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|style="background:LightSkyBlue" |Yes
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MFinance\Gui\GL\UC_RecurringGLJournals.yaml
|MFinance\Gui\Setup\UC_SetupAnalysisValues.yaml
|ARecurringJournal
|AFreeformAnalysis
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|No
|No
|No
|No
|Yes
|Yes
|Yes
|-
|-
|MFinance\Gui\GL\UC_RecurringGLTransactions.yaml
|MPartner\Gui\UC_Applications.yaml
|ARecurringTransaction
|PmGeneralApplication
|Yes
|Yes
|Yes
|Yes
Line 2,486: Line 2,889:
|Yes
|Yes
|No
|No
|Yes
|No
|No
|No
|No
|style="background:LightSkyBlue" |Yes
|style="background:LightSkyBlue" |Yes
|style="background:LightSkyBlue" |Yes
|Yes
|Yes
|Yes
|-
|-
|MFinance\Gui\Gift\UC_GiftBatches.yaml
|MPartner\Gui\UC_FinanceDetails.yaml
|AGiftBatch
|PBankingDetails
|Yes
|Yes
|Yes
|Yes
|Yes
|style="background:yellow" |???
|Yes
|Yes
|No
|No
|Yes
|No
|No
|style="background:yellow" |Yes
|No
|style="background:LightSkyBlue" |Yes
|style="background:LightSkyBlue" |Yes
|style="background:LightSkyBlue" |Yes
|Yes
|Yes
|Yes
|-
|-
|MFinance\Gui\Gift\UC_GiftTransactions.yaml
|MPartner\Gui\UC_IndividualData_Abilities.yaml
|AGiftDetail
|PmPersonAbility
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|style="background:yellow" |No
|No
|Yes
|Yes
|No
|No
|No
|No
|style="background:yellow" |Yes
|No
|No
|style="background:LightSkyBlue" |Yes
|Yes
|Yes
|Yes
|-
|-
|MFinance\Gui\Gift\UC_RecurringGiftBatches.yaml
|MPartner\Gui\UC_IndividualData_CommitmentPeriods.yaml
|ARecurringGiftBatch
|PmStaffData
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|style="background:yellow" |No
|No
|Yes
|Yes
|No
|No
|No
|No
|style="background:yellow" |Yes
|style="background:LightSkyBlue" |Yes
|No
|style="background:LightSkyBlue" |Yes
|Yes
|Yes
|-
|MFinance\Gui\Gift\UC_RecurringGiftTransactions.yaml
|ARecurringGiftDetail
|Yes
|Yes
|-
|MPartner\Gui\UC_IndividualData_JobAssignments.yaml
|PmJobAssignment
|Yes
|Yes
|style="background:yellow" |No
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|No
|No
|No
|style="background:LightSkyBlue" |Yes
|No
|No
|style="background:yellow" |Yes
|style="background:LightSkyBlue" |Yes
|Yes
|Yes
|Yes
|}
=== Screens Based on Template: ControlMaintainCacheableTable (1 files use this template. The following have Add/Delete functionality) ===
{| border="1" cellpadding="5" cellspacing="0"
!Filename !! DetailTable !! CacheableTable !! Has New Button !! Has Delete Button !! Has Auto-delete !! Has ReferenceCount !! Has Deletable Flag !! Calls .Delete() !! Manual Calls Auto !! Client/Server Match
|-
|-
|MPartner\Gui\Setup\UC_ContactAttributeDetail.yaml
|MPartner\Gui\UC_IndividualData_Passport.yaml
|PContactAttributeDetail
|PmPassportDetails
|ContactAttributeDetailList
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|Yes
|No
|No
|No
|No
|No
|style="background:LightSkyBlue" |Yes
|style="background:LightSkyBlue" |Yes
|No
|Yes
|Yes
|}
|Yes
 
|-
=== Summary ===
|MPartner\Gui\UC_IndividualData_PersonalDocuments.yaml
   29 potential issues found in 13 files
|PmDocument
   There are 98 New/Add buttons in the application
|Yes
   There are 95 Delete/Remove buttons in the application
|Yes
   83 of these call the auto-delete function
|Yes
   10 of these call a manual delete function
|Yes
     9 of these call the auto-delete function from manual code
|No
|Yes
|No
|No
|style="background:LightSkyBlue" |Yes
|No
|style="background:LightSkyBlue" |Yes
|Yes
|Yes
|-
|MPartner\Gui\UC_IndividualData_PersonalLanguages.yaml
|PmPersonLanguage
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|No
|No
|No
|No
|style="background:LightSkyBlue" |Yes
|Yes
|Yes
|-
|MPartner\Gui\UC_IndividualData_PersonSkills.yaml
|PmPersonSkill
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|No
|No
|style="background:LightSkyBlue" |Yes
|No
|style="background:LightSkyBlue" |Yes
|Yes
|Yes
|-
|MPartner\Gui\UC_IndividualData_PreviousExperience.yaml
|PmPastExperience
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|No
|No
|style="background:LightSkyBlue" |Yes
|No
|style="background:LightSkyBlue" |Yes
|Yes
|Yes
|-
|MPartner\Gui\UC_IndividualData_ProgressReports.yaml
|PmPersonEvaluation
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|No
|No
|style="background:LightSkyBlue" |Yes
|No
|style="background:LightSkyBlue" |Yes
|Yes
|Yes
|-
|MPartner\Gui\UC_PartnerRelationships.yaml
|PPartnerRelationship
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|No
|No
|style="background:LightSkyBlue" |Yes
|No
|style="background:LightSkyBlue" |Yes
|Yes
|Yes
|-
|MPartner\Gui\UC_Subscriptions.yaml
|PSubscription
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|No
|No
|style="background:LightSkyBlue" |Yes
|No
|style="background:LightSkyBlue" |Yes
|Yes
|Yes
|-
|MPartner\Gui\Extracts\UC_ExtractMaintain.yaml
|MExtract
|Yes
|Yes
|style="background:yellow" |???
|Yes
|No
|style="background:yellow" |No
|style="background:yellow" |Yes
|style="background:yellow" |Yes
|style="background:LightSkyBlue" |Yes
|No
|No
|Yes
|Yes
|-
|MPartner\Gui\Extracts\UC_ExtractMasterList.yaml
|MExtractMaster
|style="background:LightSkyBlue" |No
|Yes
|style="background:yellow" |No
|Yes
|No
|style="background:yellow" |No
|style="background:yellow" |Yes
|style="background:yellow" |Yes
|style="background:LightSkyBlue" |Yes
|No
|No
|Yes
|No
|}
 
=== Screens Based on Template: ControlMaintainCacheableTable (1 files use this template. The following have Add/Delete functionality) ===
{| border="1" cellpadding="5" cellspacing="0" style="font-size:x-small"
!Filename !! DetailTable !! CacheableTable !! Has New Button !! Has Delete Button !! Has Auto-delete !! Has ReferenceCount !! Has Deletable Flag !! Has Enable Delete !! Calls .Delete() !! Manual Calls Auto !! PreDelete !! DeleteRow !! PostDelete !! Client/Server Match !! Multi Select
|-
|MPartner\Gui\Setup\UC_ContactAttributeDetail.yaml
|PContactAttributeDetail
|ContactAttributeDetailList
|Yes
|Yes
|Yes
|Yes
|No
|Yes
|style="background:LightSkyBlue" |Yes
|No
|No
|No
|style="background:LightSkyBlue" |Yes
|Yes
|Yes
|}
 
=== Summary ===
   17 potential issues found in 4 files
   There are 98 New/Add buttons in the application
   There are 96 Delete/Remove buttons in the application
   92 of these call the auto-delete function
   3 of these call a manual delete function
     4 of these call the auto-delete function from manual code
<span style="background:LightSkyBlue">A Blue cell</span> indicates an unusual entry that is 'by design'.<br/>
<span style="background:LightSkyBlue">A Blue cell</span> indicates an unusual entry that is 'by design'.<br/>
<span style="background:yellow">A Yellow cell</span> indicates an unusual entry that requires investigation.
<span style="background:yellow">A Yellow cell</span> indicates an unusual entry that requires investigation.

Latest revision as of 10:18, 22 Ocak 2015

Links

Testing Schedule for Delete Functionality

Overview

Nearly all the code to delete a specific record from a table can be auto-generated by Open Petra's code generation applications. A small amount of code is generated on the client and a larger amount is generated in the server. You can activate all this code by adding a few simple lines to the YAML file that defines the behaviour of the screen or user control. When you do this you will get

  • a delete button with a label of your choice - but Delete by default
  • code that enables or disables the button depending on the circumstances. Some records in Open Petra are specifically marked as being non-deletable.
  • code that checks whether the row is referenced by another table or tables as a foreign key. If it is, a message box is displayed giving helpful information about which table(s) reference the data, and the delete action is abandoned.
  • code to ask for pre-confirmation of the action.
  • code to delete the relevant record.
  • code to confirm a successful outcome.

In addition there are optional manual code file extensions that can be made before, during and after the delete action.

This auto-generated code only applies to screens that have a grid capable of displaying multiple selectable records.

Coding the YAML File

There are a few simple steps to code the YAML file to include standard deletion. You just need one line in the Actions section and some simple lines in the Controls section.

A typical Actions section will look like this

    Actions:
        actNew: {Label=&New, ActionClick=NewRecord}
        actDelete: {Label=&Delete, ActionClick=DeleteRecord}

This has one action for the New button and one action for the Delete button

The equivalent Controls section would look like this

        pnlButtons:
            Dock: Right
            Controls: [btnNew, btnDelete]
        btnNew:
            Action: actNew
            Stretch: horizontally
        btnDelete:
            Action: actDelete
            Stretch: horizontally

This has a panel containing the two buttons docked to the right. Each button specifies the associated action and, in order to make the buttons have the same size, they are both stretched horizontally.

It is as simple as that! The only rules are that the button must be named btnDelete and the action must be called actDelete. The label does not have to be Delete. The ActionClick should normally be DeleteRecord. If ActionClick is DeleteRecord then the event handler will be coded into the -generated.cs file. If you choose a different name you will have to code the handler into the Manual.cs file. You might choose to do this if you are going to code the entire deletion procedure manually, but if you want to make use of Pre/PostDeleteManual or DeleteRowManual it makes little sense to not use DeleteRecord.

Avoiding the Reference Check

In a few cases it may be necessary to avoid performing the usage reference count check before executing the deletion code. This typically happens on a screen that maintains two tables (like Partner/LocalDataOptions). By design the second table is going to contain references to the rows of the main table. However the manual delete code will ensure that the dependent rows in the second table are deleted before the rows in the main table. So in this case you use the attribute SkipReferenceCheck=true to exclude the reference checking code. But now it is the manual coder's responsibility to ensure that the deletion works!

Here is the YAML from LocalDataOptions

actDelete: {Label=&Delete, ActionClick=DeleteRecord, SkipReferenceCheck=true}

Generating the C# Code

Normally you can make changes to a YAML file and it is a simple matter to create the C# code for the equivalent client screen and re-compile the client. But a YAML file with a delete button may require you to do more than this.

The critical occasions are

  • when you edit a YAML file and add a new Delete button
  • or when you create a new YAML file that contains a Delete button

If either of these cases apply then you will need to do the following

  • save the YAML file(s)
  • run generateORMReferenceCounts either using nant or the Developer's Assistant
  • run generateGlue either using nant or the Developer's Assistant
  • run generateWinform on the YAML file(s) (or generateWinforms for all forms) - again using nant or the Developer's Assistant
  • compile both the server and the client

Please understand that once you have done these actions once on the YAML file there is no need to repeat them again because you now have generated all the code on the server that you need. Any subsequent changes to the YAML file that you make (for example laying out the controls so that they look nice) can be compiled to C# and/or previewed in the normal way because the server code will not change when you do that.

Standard Deletion Code

All the standard deletion code is encapsulated in a TDeleteGridRows class that is part of the Ict.Petra.Client.CommonForms namespace. This class exposes an interface IDeleteGridRows that is implemented by the auto-generated code. So there is very little code in the -generated.cs file and it is, of course, entirely optional to have deletion code in the -ManualCode.cs file.

Auto-generated Client Code

So what code gets generated on the client? There are three snippets of code that we generate on the client.

First there is a click event handler that simply calls a standard method. This code example deletes a record from the p_business table.

    private void DeleteRecord(Object sender, EventArgs e)
    {
        DeletePBusiness();
    }

However, please see later in this section why you might want to implement this method in your manual code file.

Second there is a line of code that handles the enable/disable state of the button

        btnDelete.Enabled = pnlDetails.Enabled;

or, where a table has a 'deletable' flag

        btnDelete.Enabled = ((grdDetails.SelectedDataRowsAsDataRowView.Length > 1) || ((ARow != null) && (ARow.DeletableFlag == true))) && pnlDetails.Enabled;

Finally there is the call to the DeleteGridRows class to execute the deletion itself.

    private void DeletePBusiness()
    {
        TDeleteGridRows.DeleteRows(this, grdDetails, FPetraUtilsObject, this);
    }

After that there are the interface implementation methods to

  • GetReferenceCount()
  • GetDefaultDeletionQuestion()
  • HandlePreDelete()
  • HandleDeleteRow()
  • HandlePostDelete()
  • IsRowDeletable()

Normally the -generated.cs file puts default code in these placeholders but if there is associated manual code the generator will call it.

Content of the Default Deletion Behaviour

This is the code that runs in the standard implementation of row deletion. This code is in the TDeleteGridRows class. Only the single row deletion code is shown.

        public static bool DeleteRows(IDeleteGridRows ACallerFormOrControl,
            TSgrdDataGrid AGrid,
            TFrmPetraEditUtils APetraUtilsObject,
            IButtonPanel AButtonPanel)
        {
            DataRow currentDataRow = ACallerFormOrControl.GetSelectedDataRow();
            Int32 currentRowIndex = ACallerFormOrControl.GetSelectedRowIndex();

            if ((currentDataRow == null) || (currentRowIndex == -1))
            {
                return false;
            }

            string CompletionMessage = String.Empty;
            DataRowView[] HighlightedRows = AGrid.SelectedDataRowsAsDataRowView;

            if (HighlightedRows.Length == 1)
            {
                // Single row deletion

                TVerificationResultCollection VerificationResults = null;

                if (TVerificationHelper.IsNullOrOnlyNonCritical(APetraUtilsObject.VerificationResultCollection))
                {
                    ACallerFormOrControl.GetReferenceCount(currentDataRow, APetraUtilsObject.MaxReferenceCountOnDelete, out VerificationResults);
                }

                if ((VerificationResults != null)
                    && (VerificationResults.Count > 0))
                {
                    TCascadingReferenceCountHandler countHandler = new TCascadingReferenceCountHandler();
                    TFrmExtendedMessageBox.TResult result = countHandler.HandleReferences(APetraUtilsObject, VerificationResults, true);

                    if (result == TFrmExtendedMessageBox.TResult.embrYes)
                    {
                        // repeat the count but with no limit to the number of references
                        ACallerFormOrControl.GetReferenceCount(currentDataRow, 0, out VerificationResults);
                        countHandler.HandleReferences(APetraUtilsObject, VerificationResults, false);
                    }

                    return false;
                }

                string DeletionQuestion = ACallerFormOrControl.GetDefaultDeletionQuestion();
                bool AllowDeletion = true;
                bool DeletionPerformed = false;

                ACallerFormOrControl.HandlePreDelete(currentDataRow, ref AllowDeletion, ref DeletionQuestion);

                if (AllowDeletion)
                {
                    if ((MessageBox.Show(DeletionQuestion,
                             MCommonResourcestrings.StrConfirmDeleteTitle,
                             MessageBoxButtons.YesNo,
                             MessageBoxIcon.Question,
                             MessageBoxDefaultButton.Button2) == System.Windows.Forms.DialogResult.Yes))
                    {
                        try
                        {
                            if (!ACallerFormOrControl.HandleDeleteRow(currentDataRow, ref DeletionPerformed, ref CompletionMessage))
                            {
                                currentDataRow.Delete();
                                DeletionPerformed = true;
                            }
                        }
                        catch (Exception ex)
                        {
                            MessageBox.Show(String.Format(MCommonResourcestrings.StrErrorWhileDeleting,
                                    Environment.NewLine, ex.Message),
                                MCommonResourcestrings.StrGenericError,
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Warning);
                        }

                        if (DeletionPerformed)
                        {
                            APetraUtilsObject.SetChangedFlag();
                        }

                        // Select and display the details of the nearest row to the one previously selected
                        ACallerFormOrControl.SelectRowInGrid(currentRowIndex);
                        // Clear any errors left over from  the deleted row
                        APetraUtilsObject.VerificationResultCollection.Clear();

                        if (AButtonPanel != null)
                        {
                            AButtonPanel.UpdateRecordNumberDisplay();
                        }
                    }
                }

                if (!ACallerFormOrControl.HandlePostDelete(currentDataRow, AllowDeletion, DeletionPerformed, CompletionMessage))
                {
                    if (DeletionPerformed && (CompletionMessage.Length > 0))
                    {
                        MessageBox.Show(CompletionMessage, MCommonResourcestrings.StrDeletionCompletedTitle);
                    }
                }

                return DeletionPerformed;
            }

This snippet of code does the following.

  • It checks that the row is not empty
  • It queries the server to find out of the row is currently referenced by another table or tables. If it is it displays a helpful message and exits the function.
  • It asks the user to confirm deletion. The user can abandon deletion at this point. The default deletion question shows the label text and the data text for the primary key control. Usually the question will be correct but sometimes you may need to frame your own question inside PreDeleteManual().
  • It deletes the record. Note that this step is inside a try/catch block. If you need to write your own deletion code inside DeleteRowManual() please do not use a try/catch block for that method but let the exception be caught inside this code.
  • It sets the flag that enables the Save button
  • It selects the correct row in the grid now that the row has been deleted. Note that this is all that is necessary even if there are no no more rows in the grid.
  • It displays a 'success' message

The reference count message is something like: You cannot delete this record. It is used by 3 records in the XXX table and 19 records in the YYY table. An example of a record that uses this record is found in Partner with a key of 43005009.

Manual Code Options

You can modify the behaviour of the deletion process by including any or all of the following methods in your manual code file.

private bool PreDeleteManual(PInternationalPostalTypeRow ARowToDelete, ref string ADeletionQuestion)

private bool DeleteRowManual(PInternationalPostalTypeRow ARowToDelete, ref string ACompletionMessage)

private void PostDeleteManual(PInternationalPostalTypeRow ARowToDelete, bool AAllowDeletion, bool ADeletionPerformed, string ACompletionMessage)
  • If the first method returns false the deletion will be abandoned. You can use this method to modify the deletion question.
  • The second method can be used to replace the standard record deletion code with more complex code of your choice. You can modify the completion message. You return true or false depending on whether the deletion succeeded.
  • The third optional manual method can be used to do manual clean-up after deletion has occurred. The parameters tell you if deletion was initially allowed/disallowed, whether deletion actually succeeded and what the recommended message is that should be shown.

Finally it is worth noting that you can effectively run a pre-pre-delete check to ensure that it is valid for the user to delete the highlighted row(s). If you include the button click handler in your manual code file (i.e. include 'private void DeleteRecord(Object sender, EventArgs e)') then the auto-generator will not write that method into the generated file. Now inside the manual implementation you can test whether or not to allow the standard deletion code to run at all. If the conditions are acceptable your manual code should call 'DeletePBusiness()' - or whatever the standard method is called for your data table - or simply return after displaying a message box to the client explaining why the row cannot be deleted.

Multi-Row Deletion

The auto-generated code supports multi-row deletion. In fact if the generator creates deletion code it will always include code that handles the Details Grid having multiple highlighted rows. But note that it is the grid itself that determines whether multi-row select is enabled. By default the generator will enable multi-row select on grdDetails where there is a btnDelete in the YAML file. Usually this will be the desired behaviour. But if you want to ensure that only single rows can be selected you need to apply the attribute EnableMultiSelection=false to the grdDetails. Note that this attribute only applies to grdDetails.

When multiple rows are highlighted the deletion code is executed for each row but the logic sequence is subtly different from single row deletion.

  • The standard deletion question is not used. Instead a simple question is always asked - 'Do you want to delete the N highlighted rows?'
  • PreDeleteManual, if it exists, is still called and if it returns false, deletion is not performed for this row.
  • The reference count is checked for the row and if it is non-zero the row is not deleted
  • DeleteRowManual is called for the row and ACompletionMessage is passed in. If you want a completion message (which would be unusual but might be appropriate if the data is always saved to disk, for example), you need to test whether ACompletionMessage is an empty string. If it is this is the first time that DeleteRow has been called. If it is not then you have already set the message once and you may wish to change it now that you know we are deleting multiple rows.
  • PostDeleteManual is called each time, if it exists, but always with a Completion Message of empty string
  • After the last highlighted row has been deleted the standard code will report how many rows were in fact deleted. The user will be able to review any errors or reasons why some rows were not successfully deleted. In addition the completion message is displayed.

Auto-generated Server Code

You will notice from the client code above that the client calls a method on the server named

TRemote.MPartner.ReferenceCount.WebConnectors.GetCacheableRecordReferenceCount

using a web connector method. (There is an equivalent non-cacheable table method too). All the code to implement the connectors, interfaces and implementations of these methods is auto-generated for the server.

The implementations are all found in the web folder beneath Server/lib/ModuleName in a file named ReferenceCount-generated.cs. So, for example, there is a file csharp/ICT/Petra/Server/lib/MPartner/ReferenceCount-generated.cs. These implementations all call standard Data Access methods to determine the reference counts and construct a Verification Result Collection that should be returned to the client.

Master/Detail 'Setup' Screens: Reference Check Facility

The file \csharp\ICT\Petra\Client\CommonForms\DeleteGridRows.cs contains the public Method 'MasterDetailFormsSpecialPreDeleteCheck'. This gets called only by Setup screens (Maintain Table screens) that feature Master/Detail record maintenance. Such screens call this Method from within their 'PreDeleteManual' Method to determine whether the last 'Detail' record can be deleted, or if the user needs to press 'Save' before that is allowed.

Delete Button Implementation (As was on 15 April)

Analysis run at 15:09 on 15/04/2013.
All the files listed below have either a 'New' button or an 'Add' button with a name containing btnNew or btnAdd

Screens Based on Template: WindowEdit (7 files use this template. The following have Add/Delete functionality)

Filename DetailTable Has New Button Has Delete Button Has Auto-delete Has ReferenceCount Has Deletable Flag Calls .Delete() Manual Calls Auto Client/Server Match
MSysMan\Gui\MaintainUsers.yaml SUser Yes No n/a Yes No No n/a
MPartner\Gui\PersonnelStaffData.yaml PmStaffData Yes Yes No Yes No Yes No Yes
MFinance\Gui\Setup\GiftMotivationSetup.yaml AMotivationDetail Yes Yes Yes Yes No Yes No Yes
MFinance\Gui\Setup\MotivationGroupSetup.yaml AMotivationGroup Yes Yes Yes Yes No No Yes
MFinance\Gui\Setup\SetupAnalysisTypes.yaml AAnalysisType Yes Yes No Yes No Yes No Yes
MFinance\Gui\Common\BankStatementImport.yaml Yes Yes No No No Yes Yes No

Screens Based on Template: WindowTDS (6 files use this template. The following have Add/Delete functionality)

Filename DetailTable Has New Button Has Delete Button Has Auto-delete Has ReferenceCount Has Deletable Flag Calls .Delete() Manual Calls Auto Client/Server Match

Screens Based on Template: WindowMaintainTable (8 files use this template. The following have Add/Delete functionality)

Filename DetailTable Has New Button Has Delete Button Has Auto-delete Has ReferenceCount Has Deletable Flag Calls .Delete() Manual Calls Auto Client/Server Match
MSysMan\Gui\Setup\SecurityGroupSetup.yaml SGroup Yes Yes Yes Yes No No Yes
MPersonnel\Gui\Setup\ApplicationTypeSetup.yaml PtApplicationType Yes Yes Yes Yes Yes No Yes
MPartner\Gui\Setup\MailingSetup.yaml PMailing Yes Yes Yes Yes No No Yes
MFinance\Gui\Setup\CurrencyLanguageSetup.yaml ACurrencyLanguage Yes Yes Yes Yes No No Yes
MFinance\Gui\Setup\SetupCorporateExchangeRate.yaml ACorporateExchangeRate Yes No n/a Yes No No n/a
MFinance\Gui\Setup\SetupDailyExchangeRate.yaml ADailyExchangeRate Yes Yes No Yes No Yes Yes
MCommon\Gui\Setup\InternationalPostalTypeSetup.yaml PInternationalPostalType Yes Yes No Yes Yes Yes Yes Yes
MCommon\Gui\Setup\SetupCurrency.yaml ACurrency Yes Yes No Yes No No Yes

Screens Based on Template: WindowMaintainCacheableTable (57 files use this template. The following have Add/Delete functionality)

Filename DetailTable CacheableTable Has New Button Has Delete Button Has Auto-delete Has ReferenceCount Has Deletable Flag Calls .Delete() Manual Calls Auto Client/Server Match
MSysMan\Gui\Setup\LanguageSpecificSetup.yaml SLanguageSpecific LanguageSpecificList Yes Yes Yes Yes No No Yes
MPersonnel\Gui\Setup\AbilityAreaSetup.yaml PtAbilityArea AbilityAreaList Yes Yes Yes Yes Yes No Yes
MPersonnel\Gui\Setup\AbilityLevelSetup.yaml PtAbilityLevel AbilityLevelList Yes Yes Yes Yes Yes No Yes
MPersonnel\Gui\Setup\ApplicantStatusSetup.yaml PtApplicantStatus ApplicantStatusList Yes Yes Yes Yes Yes No Yes
MPersonnel\Gui\Setup\ArrivalDeparturePointSetup.yaml PtArrivalPoint ArrivalDeparturePointList Yes Yes Yes Yes Yes No Yes
MPersonnel\Gui\Setup\Country_EventLevelSetup.yaml PtOutreachPreferenceLevel OutreachPreferenceLevelList Yes Yes Yes Yes Yes No Yes
MPersonnel\Gui\Setup\DocumentTypeCategorySetup.yaml PmDocumentCategory DocumentTypeCategoryList Yes Yes Yes Yes Yes No Yes
MPersonnel\Gui\Setup\DocumentTypeSetup.yaml PmDocumentType DocumentTypeList Yes Yes Yes Yes Yes No Yes
MPersonnel\Gui\Setup\DriverStatusSetup.yaml PtDriverStatus DriverStatusList Yes Yes Yes Yes Yes No Yes
MPersonnel\Gui\Setup\EventRoleSetup.yaml PtCongressCode EventRoleList Yes Yes Yes Yes Yes No Yes
MPersonnel\Gui\Setup\JobAssignmentTypeSetup.yaml PtAssignmentType JobAssignmentTypeList Yes Yes Yes Yes Yes No Yes
MPersonnel\Gui\Setup\LanguageLevelSetup.yaml PtLanguageLevel LanguageLevelList Yes Yes Yes Yes Yes No Yes
MPersonnel\Gui\Setup\LeadershipRatingSetup.yaml PtLeadershipRating LeadershipRatingList Yes Yes Yes Yes Yes No Yes
MPersonnel\Gui\Setup\LeavingCodeSetup.yaml PtLeavingCode LeavingCodeList Yes Yes Yes Yes Yes No Yes
MPersonnel\Gui\Setup\OrganisationContactSetup.yaml PtContact ContactList Yes Yes Yes Yes Yes No Yes
MPersonnel\Gui\Setup\PassportTypeSetup.yaml PtPassportType PassportTypeList Yes Yes Yes Yes Yes No Yes
MPersonnel\Gui\Setup\PositionSetup.yaml PtPosition PositionList Yes Yes Yes Yes Yes No Yes
MPersonnel\Gui\Setup\ProfessionalAreaSetup.yaml PtQualificationArea QualificationAreaList Yes Yes Yes Yes Yes No Yes
MPersonnel\Gui\Setup\QualificationLevelSetup.yaml PtQualificationLevel QualificationLevelList Yes Yes Yes Yes Yes No Yes
MPersonnel\Gui\Setup\SkillCategorySetup.yaml PtSkillCategory SkillCategoryList Yes Yes Yes Yes Yes No Yes
MPersonnel\Gui\Setup\SkillLevelSetup.yaml PtSkillLevel SkillLevelList Yes Yes Yes Yes Yes No Yes
MPersonnel\Gui\Setup\TransportTypeSetup.yaml PtTravelType TransportTypeList Yes Yes Yes Yes Yes No Yes
MPartner\Gui\Setup\AcquisitionCodeSetup.yaml PAcquisition AcquisitionCodeList Yes Yes Yes Yes Yes No Yes
MPartner\Gui\Setup\AddresseeTypeSetup.yaml PAddresseeType AddresseeTypeList Yes Yes Yes Yes Yes No Yes
MPartner\Gui\Setup\BusinessCodeSetup.yaml PBusiness BusinessCodeList Yes Yes Yes Yes Yes No Yes
MPartner\Gui\Setup\ContactAttributeSetup.yaml PContactAttribute ContactAttributeList Yes Yes No Yes No Yes No Yes
MPartner\Gui\Setup\ContactMethodSetup.yaml PMethodOfContact MethodOfContactList Yes Yes Yes Yes Yes No Yes
MPartner\Gui\Setup\DenominationCodeSetup.yaml PDenomination DenominationList Yes Yes Yes Yes Yes No Yes
MPartner\Gui\Setup\InterestCategorySetup.yaml PInterestCategory InterestCategoryList Yes Yes Yes Yes No No Yes
MPartner\Gui\Setup\InterestSetup.yaml PInterest InterestList Yes Yes Yes Yes No No Yes
MPartner\Gui\Setup\LocalDataOptionListNameSetup.yaml PDataLabelLookupCategory DataLabelLookupCategoryList Yes Yes Yes Yes No No Yes
MPartner\Gui\Setup\LocalDataOptionsSetup.yaml PDataLabelLookup DataLabelLookupList Yes Yes Yes Yes No No Yes
MPartner\Gui\Setup\LocationTypeSetup.yaml PLocationType LocationTypeList Yes Yes Yes Yes Yes No Yes
MPartner\Gui\Setup\MaritalStatusSetup.yaml PtMaritalStatus MaritalStatusList Yes Yes Yes Yes Yes No Yes
MPartner\Gui\Setup\OccupationCodeSetup.yaml POccupation OccupationList Yes Yes Yes Yes Yes No Yes
MPartner\Gui\Setup\PartnerStatusSetup.yaml PPartnerStatus PartnerStatusList Yes Yes Yes Yes Yes No Yes
MPartner\Gui\Setup\PartnerTypeSetup.yaml PType PartnerTypeList Yes Yes Yes Yes Yes No Yes
MPartner\Gui\Setup\PublicationCostSetup.yaml PPublicationCost PublicationCostList Yes Yes Yes Yes No No Yes
MPartner\Gui\Setup\PublicationSetup.yaml PPublication PublicationList Yes Yes Yes Yes No No Yes
MPartner\Gui\Setup\ReasonSubscriptionCancelledSetup.yaml PReasonSubscriptionCancelled ReasonSubscriptionCancelledList Yes Yes Yes Yes No No Yes
MPartner\Gui\Setup\ReasonSubscriptionGivenSetup.yaml PReasonSubscriptionGiven ReasonSubscriptionGivenList Yes Yes Yes Yes No No Yes
MPartner\Gui\Setup\RelationCategorySetup.yaml PRelationCategory RelationCategoryList Yes Yes Yes Yes Yes No Yes
MPartner\Gui\Setup\RelationshipSetup.yaml PRelation RelationList Yes Yes Yes Yes Yes No Yes
MFinance\Gui\Setup\EmailDestinationSetup.yaml AEmailDestination EmailDestinationList Yes Yes Yes Yes No No Yes
MFinance\Gui\Setup\SetupAdminGrantsPayable.yaml AFeesPayable FeesPayableList Yes Yes Yes Yes No No Yes
MFinance\Gui\Setup\SetupAdminGrantsReceivable.yaml AFeesReceivable FeesReceivableList Yes Yes Yes Yes No No Yes
MFinance\Gui\Setup\SetupCostCentreTypes.yaml ACostCentreTypes CostCentreTypesList Yes Yes Yes Yes Yes No Yes
MFinance\Gui\Setup\SetupMethodOfGiving.yaml AMethodOfGiving MethodOfGivingList Yes Yes No Yes No No Yes
MFinance\Gui\Setup\SetupMethodOfPayment.yaml AMethodOfPayment MethodOfPaymentList Yes Yes Yes Yes No No Yes
MFinance\Gui\Setup\SetupSuspenseAccount.yaml ASuspenseAccount SuspenseAccountList Yes Yes No Yes No Yes Yes
MConference\Gui\Setup\ConferenceCostTypeSetup.yaml PcCostType ConferenceCostTypeList Yes Yes Yes Yes Yes No Yes
MCommon\Gui\Setup\CountrySetup.yaml PCountry CountryList Yes Yes Yes Yes Yes No Yes
MCommon\Gui\Setup\FrequencySetup.yaml AFrequency FrequencyList Yes Yes Yes Yes No No Yes
MCommon\Gui\Setup\LanguageCodeSetup.yaml PLanguage LanguageCodeList Yes Yes Yes Yes Yes No Yes
MCommon\Gui\Setup\LocalDataFieldSetup.yaml PDataLabel DataLabelList Yes Yes Yes Yes No Yes No Yes

Screens Based on Template: WindowEditUIConnector (3 files use this template. The following have Add/Delete functionality)

Filename DetailTable Has New Button Has Delete Button Has Auto-delete Has ReferenceCount Has Deletable Flag Calls .Delete() Manual Calls Auto Client/Server Match
MFinance\Gui\Budget\MaintainBudget.yaml ABudget Yes Yes No Yes No Yes No Yes

Screens Based on Template: WindowEditWebConnectorMasterDetail (1 files use this template. The following have Add/Delete functionality)

Filename DetailTable Has New Button Has Delete Button Has Auto-delete Has ReferenceCount Has Deletable Flag Calls .Delete() Manual Calls Auto Client/Server Match
MFinance\Gui\AP\APEditDocument.yaml AApDocumentDetail Yes Yes No Yes No Yes No Yes

Screens Based on Template: ControlMaintainTable (29 files use this template. The following have Add/Delete functionality)

Filename DetailTable Has New Button Has Delete Button Has Auto-delete Has ReferenceCount Has Deletable Flag Calls .Delete() Manual Calls Auto Client/Server Match
MPartner\Gui\UC_Applications.yaml PmGeneralApplication Yes Yes No Yes No Yes No Yes
MPartner\Gui\UC_FinanceDetails.yaml PBankingDetails Yes Yes No Yes No Yes No Yes
MPartner\Gui\UC_IndividualData_Abilities.yaml PmPersonAbility Yes Yes No Yes No Yes Yes Yes
MPartner\Gui\UC_IndividualData_CommitmentPeriods.yaml PmStaffData Yes Yes No Yes No Yes Yes Yes
MPartner\Gui\UC_IndividualData_JobAssignments.yaml PmJobAssignment Yes Yes No Yes No Yes Yes Yes
MPartner\Gui\UC_IndividualData_Passport.yaml PmPassportDetails Yes Yes No Yes No Yes Yes Yes
MPartner\Gui\UC_IndividualData_PersonalDocuments.yaml PmDocument Yes Yes No Yes No Yes Yes Yes
MPartner\Gui\UC_IndividualData_PersonalLanguages.yaml PmPersonLanguage Yes Yes No Yes No Yes Yes Yes
MPartner\Gui\UC_IndividualData_PersonSkills.yaml PmPersonSkill Yes Yes No Yes No Yes Yes Yes
MPartner\Gui\UC_IndividualData_PreviousExperience.yaml PmPastExperience Yes Yes No Yes No Yes Yes Yes
MPartner\Gui\UC_IndividualData_ProgressReports.yaml PmPersonEvaluation Yes Yes No Yes No Yes Yes Yes
MPartner\Gui\UC_PartnerRelationships.yaml PPartnerRelationship Yes Yes No Yes No Yes Yes Yes
MPartner\Gui\UC_Subscriptions.yaml PSubscription Yes Yes No Yes No Yes Yes Yes
MPartner\Gui\Extracts\UC_ExtractMaintain.yaml MExtract Yes Yes Yes Yes No Yes No Yes
MPartner\Gui\Extracts\UC_ExtractMasterList.yaml MExtractMaster No Yes No Yes No Yes No Yes
MFinance\Gui\Setup\UC_AccountAnalysisAttributes.yaml AAnalysisAttribute Yes Yes No Yes No Yes No Yes
MFinance\Gui\Setup\UC_SetupAnalysisValues.yaml AFreeformAnalysis Yes Yes No Yes No Yes No Yes
MFinance\Gui\GL\UC_GLBatches.yaml ABatch Yes No n/a Yes No Yes No n/a
MFinance\Gui\GL\UC_GLJournals.yaml AJournal Yes No n/a Yes No Yes No n/a
MFinance\Gui\GL\UC_GLTransactions.yaml ATransaction Yes Yes No No No Yes Yes No
MFinance\Gui\GL\UC_RecurringGLBatches.yaml ARecurringBatch Yes Yes No Yes No Yes Yes Yes
MFinance\Gui\GL\UC_RecurringGLJournals.yaml ARecurringJournal Yes Yes No Yes No Yes Yes Yes
MFinance\Gui\GL\UC_RecurringGLTransactions.yaml ARecurringTransaction Yes Yes No Yes No Yes Yes Yes
MFinance\Gui\Gift\UC_GiftBatches.yaml AGiftBatch Yes Yes Yes Yes No Yes Yes
MFinance\Gui\Gift\UC_GiftTransactions.yaml AGiftDetail Yes Yes No Yes No Yes Yes Yes
MFinance\Gui\Gift\UC_RecurringGiftBatches.yaml ARecurringGiftBatch Yes Yes No Yes No Yes Yes Yes
MFinance\Gui\Gift\UC_RecurringGiftTransactions.yaml ARecurringGiftDetail Yes Yes No Yes No Yes Yes Yes

Screens Based on Template: ControlMaintainCacheableTable (1 files use this template. The following have Add/Delete functionality)

Filename DetailTable CacheableTable Has New Button Has Delete Button Has Auto-delete Has ReferenceCount Has Deletable Flag Calls .Delete() Manual Calls Auto Client/Server Match
MPartner\Gui\Setup\UC_ContactAttributeDetail.yaml PContactAttributeDetail ContactAttributeDetailList Yes Yes No Yes No Yes No Yes

Summary

 99 potential issues found in 42 files
 There are 98 New/Add buttons in the application
 There are 95 Delete/Remove buttons in the application
  60 of these call the auto-delete function
  35 of these call a manual delete function
    23 of these call the auto-delete function from manual code

A Blue cell indicates an unusual entry that is 'by design'
A Yellow cell indicates an unusual entry that requires investigation

Delete Button Implementation

Analysis run at 21:54 on 12/05/2013.
All the files listed below have either a 'New' button or an 'Add' button with a name containing btnNew or btnAdd

Screens Based on Template: WindowEdit (7 files use this template. The following have Add/Delete functionality)

Filename DetailTable Has New Button Has Delete Button Has Auto-delete Has ReferenceCount Has Deletable Flag Has Enable Delete Calls .Delete() Manual Calls Auto PreDelete DeleteRow PostDelete Client/Server Match Multi Select
MFinance\Gui\Common\BankStatementImport.yaml Yes Yes No No No No Yes Yes No No No No No
MFinance\Gui\Setup\GiftMotivationSetup.yaml AMotivationDetail Yes Yes Yes Yes No Yes Yes No No No No Yes Yes
MFinance\Gui\Setup\MotivationGroupSetup.yaml AMotivationGroup Yes Yes Yes Yes No Yes No No No No No Yes Yes
MFinance\Gui\Setup\SetupAnalysisTypes.yaml AAnalysisType Yes Yes Yes Yes No Yes No No Yes No No Yes Yes
MPartner\Gui\PersonnelStaffData.yaml PmStaffData Yes Yes Yes Yes No Yes No No Yes No No Yes Yes
MSysMan\Gui\MaintainUsers.yaml SUser Yes No n/a Yes No n/a No No No No No n/a No

Screens Based on Template: WindowTDS (6 files use this template. The following have Add/Delete functionality)

Filename DetailTable Has New Button Has Delete Button Has Auto-delete Has ReferenceCount Has Deletable Flag Has Enable Delete Calls .Delete() Manual Calls Auto PreDelete DeleteRow PostDelete Client/Server Match Multi Select

Screens Based on Template: WindowMaintainTable (8 files use this template. The following have Add/Delete functionality)

Filename DetailTable Has New Button Has Delete Button Has Auto-delete Has ReferenceCount Has Deletable Flag Has Enable Delete Calls .Delete() Manual Calls Auto PreDelete DeleteRow PostDelete Client/Server Match Multi Select
MCommon\Gui\Setup\InternationalPostalTypeSetup.yaml PInternationalPostalType Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MCommon\Gui\Setup\SetupCurrency.yaml ACurrency Yes Yes Yes Yes No Yes No No No No No Yes Yes
MFinance\Gui\Setup\CurrencyLanguageSetup.yaml ACurrencyLanguage Yes Yes Yes Yes No Yes No No No No No Yes Yes
MFinance\Gui\Setup\SetupCorporateExchangeRate.yaml ACorporateExchangeRate Yes Yes Yes Yes No Yes No No Yes No No Yes Yes
MFinance\Gui\Setup\SetupDailyExchangeRate.yaml ADailyExchangeRate Yes Yes No Yes No No No Yes No No No Yes Yes
MPartner\Gui\Setup\MailingSetup.yaml PMailing Yes Yes Yes Yes No Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\ApplicationTypeSetup.yaml PtApplicationType Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MSysMan\Gui\Setup\SecurityGroupSetup.yaml SGroup Yes Yes Yes Yes No Yes No No No No No Yes Yes

Screens Based on Template: WindowMaintainCacheableTable (57 files use this template. The following have Add/Delete functionality)

Filename DetailTable CacheableTable Has New Button Has Delete Button Has Auto-delete Has ReferenceCount Has Deletable Flag Has Enable Delete Calls .Delete() Manual Calls Auto PreDelete DeleteRow PostDelete Client/Server Match Multi Select
MCommon\Gui\Setup\CountrySetup.yaml PCountry CountryList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MCommon\Gui\Setup\FrequencySetup.yaml AFrequency FrequencyList Yes Yes Yes Yes No Yes No No No No No Yes Yes
MCommon\Gui\Setup\LanguageCodeSetup.yaml PLanguage LanguageCodeList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MCommon\Gui\Setup\LocalDataFieldSetup.yaml PDataLabel DataLabelList Yes Yes Yes Yes No Yes Yes No No No No Yes Yes
MConference\Gui\Setup\ConferenceCostTypeSetup.yaml PcCostType ConferenceCostTypeList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MFinance\Gui\Setup\EmailDestinationSetup.yaml AEmailDestination EmailDestinationList Yes Yes Yes Yes No Yes No No No No No Yes Yes
MFinance\Gui\Setup\SetupAdminGrantsPayable.yaml AFeesPayable FeesPayableList Yes Yes Yes Yes No Yes No No No No No Yes Yes
MFinance\Gui\Setup\SetupAdminGrantsReceivable.yaml AFeesReceivable FeesReceivableList Yes Yes Yes Yes No Yes No No No No No Yes Yes
MFinance\Gui\Setup\SetupCostCentreTypes.yaml ACostCentreTypes CostCentreTypesList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MFinance\Gui\Setup\SetupMethodOfGiving.yaml AMethodOfGiving MethodOfGivingList Yes Yes Yes Yes No Yes No No No No No Yes Yes
MFinance\Gui\Setup\SetupMethodOfPayment.yaml AMethodOfPayment MethodOfPaymentList Yes Yes Yes Yes No Yes No No No No No Yes Yes
MFinance\Gui\Setup\SetupSuspenseAccount.yaml ASuspenseAccount SuspenseAccountList Yes Yes Yes Yes No Yes No No No No No Yes Yes
MPartner\Gui\Setup\AcquisitionCodeSetup.yaml PAcquisition AcquisitionCodeList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPartner\Gui\Setup\AddresseeTypeSetup.yaml PAddresseeType AddresseeTypeList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPartner\Gui\Setup\BusinessCodeSetup.yaml PBusiness BusinessCodeList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPartner\Gui\Setup\ContactAttributeSetup.yaml PContactAttribute ContactAttributeList Yes Yes Yes Yes No Yes No No Yes Yes No Yes Yes
MPartner\Gui\Setup\ContactMethodSetup.yaml PMethodOfContact MethodOfContactList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPartner\Gui\Setup\DenominationCodeSetup.yaml PDenomination DenominationList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPartner\Gui\Setup\InterestCategorySetup.yaml PInterestCategory InterestCategoryList Yes Yes Yes Yes No Yes No No No No No Yes Yes
MPartner\Gui\Setup\InterestSetup.yaml PInterest InterestList Yes Yes Yes Yes No Yes No No No No No Yes Yes
MPartner\Gui\Setup\LocalDataOptionListNameSetup.yaml PDataLabelLookupCategory DataLabelLookupCategoryList Yes Yes Yes Yes No Yes No No No No No Yes Yes
MPartner\Gui\Setup\LocalDataOptionsSetup.yaml PDataLabelLookup DataLabelLookupList Yes Yes Yes Yes No Yes No No No No No Yes Yes
MPartner\Gui\Setup\LocationTypeSetup.yaml PLocationType LocationTypeList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPartner\Gui\Setup\MaritalStatusSetup.yaml PtMaritalStatus MaritalStatusList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPartner\Gui\Setup\OccupationCodeSetup.yaml POccupation OccupationList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPartner\Gui\Setup\PartnerStatusSetup.yaml PPartnerStatus PartnerStatusList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPartner\Gui\Setup\PartnerTypeSetup.yaml PType PartnerTypeList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPartner\Gui\Setup\PublicationCostSetup.yaml PPublicationCost PublicationCostList Yes Yes Yes Yes No Yes No No No No No Yes Yes
MPartner\Gui\Setup\PublicationSetup.yaml PPublication PublicationList Yes Yes Yes Yes No Yes No No No No No Yes Yes
MPartner\Gui\Setup\ReasonSubscriptionCancelledSetup.yaml PReasonSubscriptionCancelled ReasonSubscriptionCancelledList Yes Yes Yes Yes No Yes No No No No No Yes Yes
MPartner\Gui\Setup\ReasonSubscriptionGivenSetup.yaml PReasonSubscriptionGiven ReasonSubscriptionGivenList Yes Yes Yes Yes No Yes No No No No No Yes Yes
MPartner\Gui\Setup\RelationCategorySetup.yaml PRelationCategory RelationCategoryList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPartner\Gui\Setup\RelationshipSetup.yaml PRelation RelationList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\AbilityAreaSetup.yaml PtAbilityArea AbilityAreaList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\AbilityLevelSetup.yaml PtAbilityLevel AbilityLevelList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\ApplicantStatusSetup.yaml PtApplicantStatus ApplicantStatusList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\ArrivalDeparturePointSetup.yaml PtArrivalPoint ArrivalDeparturePointList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\Country_EventLevelSetup.yaml PtOutreachPreferenceLevel OutreachPreferenceLevelList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\DocumentTypeCategorySetup.yaml PmDocumentCategory DocumentTypeCategoryList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\DocumentTypeSetup.yaml PmDocumentType DocumentTypeList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\DriverStatusSetup.yaml PtDriverStatus DriverStatusList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\EventRoleSetup.yaml PtCongressCode EventRoleList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\JobAssignmentTypeSetup.yaml PtAssignmentType JobAssignmentTypeList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\LanguageLevelSetup.yaml PtLanguageLevel LanguageLevelList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\LeadershipRatingSetup.yaml PtLeadershipRating LeadershipRatingList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\LeavingCodeSetup.yaml PtLeavingCode LeavingCodeList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\OrganisationContactSetup.yaml PtContact ContactList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\PassportTypeSetup.yaml PtPassportType PassportTypeList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\PositionSetup.yaml PtPosition PositionList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\ProfessionalAreaSetup.yaml PtQualificationArea QualificationAreaList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\QualificationLevelSetup.yaml PtQualificationLevel QualificationLevelList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\SkillCategorySetup.yaml PtSkillCategory SkillCategoryList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\SkillLevelSetup.yaml PtSkillLevel SkillLevelList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MPersonnel\Gui\Setup\TransportTypeSetup.yaml PtTravelType TransportTypeList Yes Yes Yes Yes Yes Yes No No No No No Yes Yes
MSysMan\Gui\Setup\LanguageSpecificSetup.yaml SLanguageSpecific LanguageSpecificList Yes Yes Yes Yes No Yes No No No No No Yes Yes

Screens Based on Template: WindowEditUIConnector (3 files use this template. The following have Add/Delete functionality)

Filename DetailTable Has New Button Has Delete Button Has Auto-delete Has ReferenceCount Has Deletable Flag Has Enable Delete Calls .Delete() Manual Calls Auto PreDelete DeleteRow PostDelete Client/Server Match Multi Select
MFinance\Gui\Budget\MaintainBudget.yaml ABudget Yes Yes Yes Yes No Yes No No Yes Yes Yes Yes Yes

Screens Based on Template: WindowEditWebConnectorMasterDetail (1 files use this template. The following have Add/Delete functionality)

Filename DetailTable Has New Button Has Delete Button Has Auto-delete Has ReferenceCount Has Deletable Flag Has Enable Delete Calls .Delete() Manual Calls Auto PreDelete DeleteRow PostDelete Client/Server Match Multi Select
MFinance\Gui\AP\APEditDocument.yaml AApDocumentDetail Yes Yes Yes Yes No Yes No No Yes No Yes Yes Yes

Screens Based on Template: ControlMaintainTable (29 files use this template. The following have Add/Delete functionality)

Filename DetailTable Has New Button Has Delete Button Has Auto-delete Has ReferenceCount Has Deletable Flag Has Enable Delete Calls .Delete() Manual Calls Auto PreDelete DeleteRow PostDelete Client/Server Match Multi Select
MFinance\Gui\Gift\UC_GiftBatches.yaml AGiftBatch Yes Yes Yes Yes No Yes No No No Yes Yes Yes Yes
MFinance\Gui\Gift\UC_GiftTransactions.yaml AGiftDetail Yes Yes Yes Yes No Yes No No Yes Yes Yes Yes Yes
MFinance\Gui\Gift\UC_RecurringGiftBatches.yaml ARecurringGiftBatch Yes Yes Yes Yes No Yes No No No Yes Yes Yes Yes
MFinance\Gui\Gift\UC_RecurringGiftTransactions.yaml ARecurringGiftDetail Yes Yes Yes Yes No Yes No No Yes Yes Yes Yes Yes
MFinance\Gui\GL\UC_GLBatches.yaml ABatch Yes No n/a Yes No n/a Yes No No No No n/a No
MFinance\Gui\GL\UC_GLJournals.yaml AJournal Yes No n/a Yes No n/a Yes No No No No n/a No
MFinance\Gui\GL\UC_GLTransactions.yaml ATransaction Yes Yes Yes Yes No Yes No No No Yes Yes Yes Yes
MFinance\Gui\GL\UC_RecurringGLBatches.yaml ARecurringBatch Yes Yes Yes Yes No Yes No No No Yes Yes Yes Yes
MFinance\Gui\GL\UC_RecurringGLJournals.yaml ARecurringJournal Yes Yes Yes Yes No Yes No No No Yes Yes Yes Yes
MFinance\Gui\GL\UC_RecurringGLTransactions.yaml ARecurringTransaction Yes Yes Yes Disabled No Yes No No No Yes Yes n/a Yes
MFinance\Gui\Setup\UC_AccountAnalysisAttributes.yaml AAnalysisAttribute Yes Yes Yes Yes No Yes No No Yes No No Yes Yes
MFinance\Gui\Setup\UC_SetupAnalysisValues.yaml AFreeformAnalysis Yes Yes Yes Yes No Yes No No No No No Yes Yes
MPartner\Gui\UC_Applications.yaml PmGeneralApplication Yes Yes Yes Yes No Yes No No Yes Yes Yes Yes Yes
MPartner\Gui\UC_FinanceDetails.yaml PBankingDetails Yes Yes Yes Yes No Yes No No Yes Yes Yes Yes Yes
MPartner\Gui\UC_IndividualData_Abilities.yaml PmPersonAbility Yes Yes Yes Yes No Yes No No No No Yes Yes Yes
MPartner\Gui\UC_IndividualData_CommitmentPeriods.yaml PmStaffData Yes Yes Yes Yes No Yes No No Yes No Yes Yes Yes
MPartner\Gui\UC_IndividualData_JobAssignments.yaml PmJobAssignment Yes Yes Yes Yes No Yes No No Yes No Yes Yes Yes
MPartner\Gui\UC_IndividualData_Passport.yaml PmPassportDetails Yes Yes Yes Yes No Yes No No No No Yes Yes Yes
MPartner\Gui\UC_IndividualData_PersonalDocuments.yaml PmDocument Yes Yes Yes Yes No Yes No No Yes No Yes Yes Yes
MPartner\Gui\UC_IndividualData_PersonalLanguages.yaml PmPersonLanguage Yes Yes Yes Yes No Yes No No No No Yes Yes Yes
MPartner\Gui\UC_IndividualData_PersonSkills.yaml PmPersonSkill Yes Yes Yes Yes No Yes No No Yes No Yes Yes Yes
MPartner\Gui\UC_IndividualData_PreviousExperience.yaml PmPastExperience Yes Yes Yes Yes No Yes No No Yes No Yes Yes Yes
MPartner\Gui\UC_IndividualData_ProgressReports.yaml PmPersonEvaluation Yes Yes Yes Yes No Yes No No Yes No Yes Yes Yes
MPartner\Gui\UC_PartnerRelationships.yaml PPartnerRelationship Yes Yes Yes Yes No Yes No No Yes No Yes Yes Yes
MPartner\Gui\UC_Subscriptions.yaml PSubscription Yes Yes Yes Yes No Yes No No Yes No Yes Yes Yes
MPartner\Gui\Extracts\UC_ExtractMaintain.yaml MExtract Yes Yes ??? Yes No No Yes Yes Yes No No Yes Yes
MPartner\Gui\Extracts\UC_ExtractMasterList.yaml MExtractMaster No Yes No Yes No No Yes Yes Yes No No Yes No

Screens Based on Template: ControlMaintainCacheableTable (1 files use this template. The following have Add/Delete functionality)

Filename DetailTable CacheableTable Has New Button Has Delete Button Has Auto-delete Has ReferenceCount Has Deletable Flag Has Enable Delete Calls .Delete() Manual Calls Auto PreDelete DeleteRow PostDelete Client/Server Match Multi Select
MPartner\Gui\Setup\UC_ContactAttributeDetail.yaml PContactAttributeDetail ContactAttributeDetailList Yes Yes Yes Yes No Yes Yes No No No Yes Yes Yes

Summary

 17 potential issues found in 4 files
 There are 98 New/Add buttons in the application
 There are 96 Delete/Remove buttons in the application
  92 of these call the auto-delete function
  3 of these call a manual delete function
    4 of these call the auto-delete function from manual code

A Blue cell indicates an unusual entry that is 'by design'.
A Yellow cell indicates an unusual entry that requires investigation.