Пример #1
0
        //
        // Put Methods for the validation of Gift Transactions in this code file.
        //

        static partial void ValidateGiftBatchManual(ref TVerificationResultCollection AVerificationResult,
                                                    TTypedDataTable ASubmitTable)
        {
            for (int Counter = 0; Counter < ASubmitTable.Rows.Count; Counter++)
            {
                TSharedFinanceValidation_Gift.ValidateGiftBatchManual("TTransactionWebConnector" +
                                                                      " (Error in Row #" + Counter.ToString() + ")", // No translation of message text since the server's messages should be all in English
                                                                      (AGiftBatchRow)ASubmitTable.Rows[Counter], ref AVerificationResult);
            }
        }
Пример #2
0
        //
        // Put Methods for the validation of Gift Transactions in this code file.
        //

        static partial void ValidateGiftBatchManual(ref TVerificationResultCollection AVerificationResult,
                                                    TTypedDataTable ASubmitTable)
        {
            TValidationControlsDict ValidationControlsDict = new TValidationControlsDict();

            ValidationControlsDict.Add(ASubmitTable.Columns[AGiftBatchTable.ColumnBatchDescriptionId],
                                       new TValidationControlsData(null, AGiftBatchTable.GetBatchDescriptionDBName()));
            ValidationControlsDict.Add(ASubmitTable.Columns[AGiftBatchTable.ColumnExchangeRateToBaseId],
                                       new TValidationControlsData(null, AGiftBatchTable.GetExchangeRateToBaseDBName()));

            for (int Counter = 0; Counter < ASubmitTable.Rows.Count; Counter++)
            {
                TSharedFinanceValidation_Gift.ValidateGiftBatchManual("TTransactionWebConnector" +
                                                                      " (Error in Row #" + Counter.ToString() + ")", // No translation of message text since the server's messages should be all in English
                                                                      (AGiftBatchRow)ASubmitTable.Rows[Counter], ref AVerificationResult,
                                                                      ValidationControlsDict);
            }
        }
        private void ValidateDataDetailsManual(AGiftBatchRow ARow)
        {
            if ((ARow == null) || (ARow.BatchStatus != MFinanceConstants.BATCH_UNPOSTED))
            {
                return;
            }

            TVerificationResultCollection VerificationResultCollection = FPetraUtilsObject.VerificationResultCollection;

            //Hash total special case in view of the textbox handling
            ParseHashTotal(ARow);

            //Check if the user has made a Bank Cost Centre or Account Code inactive
            //this was removed because of speed issues!
            //TODO: Revisit this
            //RefreshBankCostCentreAndAccountCodes();

            TSharedFinanceValidation_Gift.ValidateGiftBatchManual(this, ARow, ref VerificationResultCollection,
                                                                  FValidationControlsDict, FAccountTable, FCostCentreTable);
        }
Пример #4
0
        private void ValidateDataDetailsManual(AGiftBatchRow ARow)
        {
            if ((ARow == null) || (ARow.BatchStatus != MFinanceConstants.BATCH_UNPOSTED))
            {
                return;
            }

            TVerificationResultCollection VerificationResultCollection = FPetraUtilsObject.VerificationResultCollection;

            //Hash total special case in view of the textbox handling
            ParseHashTotal(ARow);

            //Check if the user has made a Bank Cost Centre or Account Code inactive
            //this was removed because of speed issues!
            //TODO: Revisit this
            //RefreshBankCostCentreAndAccountCodes();

            TSharedFinanceValidation_Gift.ValidateGiftBatchManual(this, ARow, ref VerificationResultCollection,
                                                                  FValidationControlsDict, FAccountTable, FCostCentreTable);

            //TODO: remove this once database definition is set for Batch Description to be NOT NULL
            // Description is mandatory then make sure it is set
            if (txtDetailBatchDescription.Text.Length == 0)
            {
                DataColumn          ValidationColumn;
                TVerificationResult VerificationResult = null;
                object ValidationContext;

                ValidationColumn  = ARow.Table.Columns[AGiftBatchTable.ColumnBatchDescriptionId];
                ValidationContext = String.Format("Batch number {0}",
                                                  ARow.BatchNumber);

                VerificationResult = TStringChecks.StringMustNotBeEmpty(ARow.BatchDescription,
                                                                        "Description of " + ValidationContext,
                                                                        this, ValidationColumn, null);

                // Handle addition/removal to/from TVerificationResultCollection
                VerificationResultCollection.Auto_Add_Or_AddOrRemove(this, VerificationResult, ValidationColumn, true);
            }
        }