private void ValidateDataDetailsManual(PtOutreachPreferenceLevelRow ARow)
        {
            TVerificationResultCollection VerificationResultCollection = FPetraUtilsObject.VerificationResultCollection;

            TSharedValidation_CacheableDataTables.ValidateCountryEventLevel(this, ARow, ref VerificationResultCollection,
                FPetraUtilsObject.ValidationControlsDict);
        }
Example #2
0
        private void ValidateDataDetailsManual(PtOutreachPreferenceLevelRow ARow)
        {
            TVerificationResultCollection VerificationResultCollection = FPetraUtilsObject.VerificationResultCollection;

            TSharedValidation_CacheableDataTables.ValidateCountryEventLevel(this, ARow, ref VerificationResultCollection,
                                                                            FPetraUtilsObject.ValidationControlsDict);
        }
        private void NewRowManual(ref PtOutreachPreferenceLevelRow ARow)
        {
            int newLevel = 1;

            while (FMainDS.PtOutreachPreferenceLevel.Rows.Find(new object[] { newLevel }) != null)
            {
                newLevel++;
            }

            ARow.Code = newLevel.ToString();
        }
Example #4
0
        private void NewRowManual(ref PtOutreachPreferenceLevelRow ARow)
        {
            int newLevel = 1;

            while (FMainDS.PtOutreachPreferenceLevel.Rows.Find(new object[] { newLevel }) != null)
            {
                newLevel++;
            }

            ARow.Code = newLevel.ToString();
        }
        /// <summary>
        /// Validates the MPersonnel Country Event Level screen data.
        /// </summary>
        /// <param name="AContext">Context that describes where the data validation failed.</param>
        /// <param name="ARow">The <see cref="DataRow" /> which holds the the data against which the validation is run.</param>
        /// <param name="AVerificationResultCollection">Will be filled with any <see cref="TVerificationResult" /> items if
        /// data validation errors occur.</param>
        /// <param name="AValidationControlsDict">A <see cref="TValidationControlsDict" /> containing the Controls that
        /// display data that is about to be validated.</param>
        public static void ValidateCountryEventLevel(object AContext, PtOutreachPreferenceLevelRow ARow,
            ref TVerificationResultCollection AVerificationResultCollection, TValidationControlsDict AValidationControlsDict)
        {
            DataColumn ValidationColumn;
            TValidationControlsData ValidationControlsData;
            TVerificationResult VerificationResult = null;

            // Don't validate deleted DataRows
            if (ARow.RowState == DataRowState.Deleted)
            {
                return;
            }

            // 'AssignableDate' must not be empty if the flag is set
            ValidationColumn = ARow.Table.Columns[PtOutreachPreferenceLevelTable.ColumnUnassignableDateId];

            if (AValidationControlsDict.TryGetValue(ValidationColumn, out ValidationControlsData))
            {
                if (ARow.UnassignableFlag)
                {
                    VerificationResult = TSharedValidationControlHelper.IsNotInvalidDate(ARow.UnassignableDate,
                        ValidationControlsData.ValidationControlLabel, AVerificationResultCollection, true,
                        AContext, ValidationColumn, ValidationControlsData.ValidationControl);
                }

                // Handle addition to/removal from TVerificationResultCollection
                AVerificationResultCollection.Auto_Add_Or_AddOrRemove(AContext, VerificationResult, ValidationColumn);
            }
        }