private void ValidateDataDetailsManual(PtApplicantStatusRow ARow) { TVerificationResultCollection VerificationResultCollection = FPetraUtilsObject.VerificationResultCollection; TSharedValidation_CacheableDataTables.ValidateApplicantStatus(this, ARow, ref VerificationResultCollection, FPetraUtilsObject.ValidationControlsDict); }
private void ValidateDataDetailsManual(PtApplicantStatusRow ARow) { TVerificationResultCollection VerificationResultCollection = FPetraUtilsObject.VerificationResultCollection; TSharedValidation_CacheableDataTables.ValidateApplicantStatus(this, ARow, ref VerificationResultCollection, FPetraUtilsObject.ValidationControlsDict); }
private void NewRowManual(ref PtApplicantStatusRow ARow) { string newName = Catalog.GetString("NEWCODE"); Int32 countNewDetail = 0; if (FMainDS.PtApplicantStatus.Rows.Find(new object[] { newName }) != null) { while (FMainDS.PtApplicantStatus.Rows.Find(new object[] { newName + countNewDetail.ToString() }) != null) { countNewDetail++; } newName += countNewDetail.ToString(); } ARow.Code = newName; }
private void NewRowManual(ref PtApplicantStatusRow ARow) { string newName = Catalog.GetString("NEWCODE"); Int32 countNewDetail = 0; if (FMainDS.PtApplicantStatus.Rows.Find(new object[] { newName }) != null) { while (FMainDS.PtApplicantStatus.Rows.Find(new object[] { newName + countNewDetail.ToString() }) != null) { countNewDetail++; } newName += countNewDetail.ToString(); } ARow.Code = newName; }
/// <summary> /// Validates the MPersonnel Applicant Status 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 ValidateApplicantStatus(object AContext, PtApplicantStatusRow 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[PtApplicantStatusTable.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); } }