private void ValidateDataManual(PmGeneralApplicationRow ARow)
        {
            TVerificationResultCollection VerificationResultCollection = FPetraUtilsObject.VerificationResultCollection;

            TSharedPersonnelValidation_Personnel.ValidateGeneralApplicationManual(this, ARow, true, ref VerificationResultCollection,
                                                                                  FValidationControlsDict);

            TSharedPersonnelValidation_Personnel.ValidateEventApplicationManual(this,
                                                                                FMainDS.PmShortTermApplication[0],
                                                                                ref VerificationResultCollection,
                                                                                FValidationControlsDict);
        }
예제 #2
0
        private void ValidateDataManual(PmGeneralApplicationRow ARow)
        {
            TVerificationResultCollection VerificationResultCollection = FPetraUtilsObject.VerificationResultCollection;

            TSharedPersonnelValidation_Personnel.ValidateGeneralApplicationManual(this, ARow, false, ref VerificationResultCollection,
                                                                                  FValidationControlsDict);

            TSharedPersonnelValidation_Personnel.ValidateFieldApplicationManual(this,
                                                                                FMainDS.PmYearProgramApplication[0],
                                                                                ref VerificationResultCollection,
                                                                                FValidationControlsDict);
        }
        private void ValidateDataManual(PmGeneralApplicationRow ARow)
        {
            TVerificationResultCollection VerificationResultCollection = FPetraUtilsObject.VerificationResultCollection;

            TSharedPersonnelValidation_Personnel.ValidateGeneralApplicationManual(this, ARow, true, ref VerificationResultCollection,
                                                                                  FPetraUtilsObject.ValidationControlsDict);

            // We need to call the generated validation code for PmShortTermApplication manually as the UserControl's generate code calls
            // generated validation code only for the MasterTable, PmGeneralApplication!
            PmShortTermApplicationValidation.Validate(this,
                                                      FMainDS.PmShortTermApplication[0], ref VerificationResultCollection,
                                                      FValidationControlsDict);

            TSharedPersonnelValidation_Personnel.ValidateEventApplicationManual(this,
                                                                                FMainDS.PmShortTermApplication[0],
                                                                                ref VerificationResultCollection,
                                                                                FValidationControlsDict);
        }
        private void ValidateDataManual(PmGeneralApplicationRow ARow)
        {
            TVerificationResultCollection VerificationResultCollection = FPetraUtilsObject.VerificationResultCollection;
            DataColumn ValidationColumn;
            TValidationControlsData ValidationControlsData;
            TVerificationResult     VerificationResult = null;

            TSharedPersonnelValidation_Personnel.ValidateGeneralApplicationManual(this, ARow, true, ref VerificationResultCollection,
                                                                                  FValidationControlsDict);

            TSharedPersonnelValidation_Personnel.ValidateEventApplicationManual(this,
                                                                                FMainDS.PmShortTermApplication[0],
                                                                                ref VerificationResultCollection,
                                                                                FValidationControlsDict);

            if (FDelegateCheckEventApplicationDuplicate != null)
            {
                // Same 'Event' must only exist for one application per person
                ValidationColumn = FMainDS.PmShortTermApplication[0].Table.Columns[PmShortTermApplicationTable.ColumnStConfirmedOptionId];

                if (FValidationControlsDict.TryGetValue(ValidationColumn, out ValidationControlsData))
                {
                    if (FDelegateCheckEventApplicationDuplicate(ARow.ApplicationKey, ARow.RegistrationOffice,
                                                                FMainDS.PmShortTermApplication[0].StConfirmedOption))
                    {
                        VerificationResult = new TScreenVerificationResult(new TVerificationResult(this,
                                                                                                   ErrorCodes.GetErrorInfo(PetraErrorCodes.ERR_APPLICATION_DUPLICATE_EVENT,
                                                                                                                           new string[] { FMainDS.PmShortTermApplication[0].StConfirmedOption.ToString() })),
                                                                           ValidationColumn, ValidationControlsData.ValidationControl);

                        // Handle addition to/removal from TVerificationResultCollection.
                        // Only add/remove verification result if duplicate found as same field has already been
                        // handled in TSharedPersonnelValidation_Personnel.ValidateEventApplicationManual
                        VerificationResultCollection.Auto_Add_Or_AddOrRemove(this, VerificationResult, ValidationColumn);
                    }
                }
            }
        }