本文整理汇总了C#中Ict.Common.Verification.TScreenVerificationResult.OverrideResultText方法的典型用法代码示例。如果您正苦于以下问题:C# TScreenVerificationResult.OverrideResultText方法的具体用法?C# TScreenVerificationResult.OverrideResultText怎么用?C# TScreenVerificationResult.OverrideResultText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ict.Common.Verification.TScreenVerificationResult
的用法示例。
在下文中一共展示了TScreenVerificationResult.OverrideResultText方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ValidateDataManual
private void ValidateDataManual(PSubscriptionRow ARow)
{
DataColumn ValidationColumn;
DataColumn ValidationColumn2;
TValidationControlsData ValidationControlsData;
TValidationControlsData ValidationControlsData2;
TVerificationResult VerificationResult = null;
bool NoClearingOfVerificationResult = false;
TVerificationResultCollection VerificationResultCollection = FPetraUtilsObject.VerificationResultCollection;
if (!chkChangeReasonSubsGivenCode.Checked)
{
if (VerificationResultCollection.Contains(ARow.Table.Columns[PSubscriptionTable.ColumnReasonSubsGivenCodeId]))
{
VerificationResultCollection.Remove(ARow.Table.Columns[PSubscriptionTable.ColumnReasonSubsGivenCodeId]);
}
}
if (!chkChangeStartDate.Checked)
{
if (VerificationResultCollection.Contains(ARow.Table.Columns[PSubscriptionTable.ColumnStartDateId]))
{
VerificationResultCollection.Remove(ARow.Table.Columns[PSubscriptionTable.ColumnStartDateId]);
}
}
// if 'SubscriptionStatus' is CANCELLED or EXPIRED then 'Reason Ended' and 'End Date' must be set
ValidationColumn = ARow.Table.Columns[PSubscriptionTable.ColumnSubscriptionStatusId];
if (FPetraUtilsObject.ValidationControlsDict.TryGetValue(ValidationColumn, out ValidationControlsData))
{
if ((!ARow.IsSubscriptionStatusNull())
&& ((ARow.SubscriptionStatus == "CANCELLED")
|| (ARow.SubscriptionStatus == "EXPIRED")))
{
if (ARow.IsReasonSubsCancelledCodeNull()
|| (ARow.ReasonSubsCancelledCode == String.Empty))
{
VerificationResult = new TScreenVerificationResult(new TVerificationResult(this,
ErrorCodes.GetErrorInfo(PetraErrorCodes.ERR_SUBSCRIPTION_REASONENDEDMANDATORY_WHEN_EXPIRED)),
ValidationColumn, ValidationControlsData.ValidationControl);
}
else if (ARow.IsDateCancelledNull())
{
VerificationResult = new TScreenVerificationResult(new TVerificationResult(this,
ErrorCodes.GetErrorInfo(PetraErrorCodes.ERR_SUBSCRIPTION_DATEENDEDMANDATORY_WHEN_EXPIRED)),
ValidationColumn, ValidationControlsData.ValidationControl);
}
}
else
{
// if 'SubscriptionStatus' is not CANCELLED or EXPIRED then 'Reason Ended' and 'End Date' must NOT be set
if (chkChangeReasonSubsCancelledCode.Checked)
{
if ((ARow.IsReasonSubsCancelledCodeNull())
|| (ARow.ReasonSubsCancelledCode == String.Empty))
{
VerificationResult = new TScreenVerificationResult(new TVerificationResult(this,
ErrorCodes.GetErrorInfo(PetraErrorCodes.ERR_SUBSCRIPTION_REASONENDEDSET_WHEN_ACTIVE)),
ValidationColumn, ValidationControlsData.ValidationControl);
}
}
else if (!chkChangeReasonSubsCancelledCode.Checked)
{
if (ARow.SubscriptionStatus != String.Empty)
{
VerificationResult = new TScreenVerificationResult(new TVerificationResult(this,
ErrorCodes.GetErrorInfo(PetraErrorCodes.ERR_SUBSCRIPTION_REASONENDEDSET_WHEN_ACTIVE)),
ValidationColumn, ValidationControlsData.ValidationControl);
VerificationResult.OverrideResultText(Catalog.GetString(
"Reason Ended must be cleared when a Subscription is made active."));
NoClearingOfVerificationResult = true;
}
}
if ((!ARow.IsReasonSubsCancelledCodeNull())
&& (ARow.ReasonSubsCancelledCode != String.Empty))
{
VerificationResult = new TScreenVerificationResult(new TVerificationResult(this,
ErrorCodes.GetErrorInfo(PetraErrorCodes.ERR_SUBSCRIPTION_REASONENDEDSET_WHEN_ACTIVE)),
ValidationColumn, ValidationControlsData.ValidationControl);
}
else if (!ARow.IsDateCancelledNull())
{
VerificationResult = new TScreenVerificationResult(new TVerificationResult(this,
ErrorCodes.GetErrorInfo(PetraErrorCodes.ERR_SUBSCRIPTION_DATEENDEDSET_WHEN_ACTIVE)),
ValidationColumn, ValidationControlsData.ValidationControl);
}
else if (!chkChangeDateCancelled.Checked)
{
if (ARow.SubscriptionStatus != String.Empty)
{
VerificationResult = new TScreenVerificationResult(new TVerificationResult(this,
ErrorCodes.GetErrorInfo(PetraErrorCodes.ERR_SUBSCRIPTION_DATEENDEDSET_WHEN_ACTIVE)),
ValidationColumn, ValidationControlsData.ValidationControl);
VerificationResult.OverrideResultText(Catalog.GetString("Date Ended must be cleared when a Subscription is made active."));
//.........这里部分代码省略.........
示例2: ValidateDataManual
private void ValidateDataManual(PSubscriptionRow ARow)
{
DataColumn ValidationColumn;
TValidationControlsData ValidationControlsData;
TVerificationResult VerificationResult = null;
bool NoClearingOfVerificationResult = false;
TVerificationResultCollection VerificationResultCollection = FPetraUtilsObject.VerificationResultCollection;
if (!chkChangeReasonSubsGivenCode.Checked)
{
if (VerificationResultCollection.Contains(ARow.Table.Columns[PSubscriptionTable.ColumnReasonSubsGivenCodeId]))
{
VerificationResultCollection.Remove(ARow.Table.Columns[PSubscriptionTable.ColumnReasonSubsGivenCodeId]);
}
}
if (!chkChangeStartDate.Checked)
{
if (VerificationResultCollection.Contains(ARow.Table.Columns[PSubscriptionTable.ColumnStartDateId]))
{
VerificationResultCollection.Remove(ARow.Table.Columns[PSubscriptionTable.ColumnStartDateId]);
}
}
// if 'SubscriptionStatus' is CANCELLED or EXPIRED then 'Reason Ended' and 'End Date' must be set
ValidationColumn = ARow.Table.Columns[PSubscriptionTable.ColumnSubscriptionStatusId];
if (FPetraUtilsObject.ValidationControlsDict.TryGetValue(ValidationColumn, out ValidationControlsData))
{
if ((!ARow.IsSubscriptionStatusNull())
&& ((ARow.SubscriptionStatus == "CANCELLED")
|| (ARow.SubscriptionStatus == "EXPIRED")))
{
if (ARow.IsReasonSubsCancelledCodeNull()
|| (ARow.ReasonSubsCancelledCode == String.Empty))
{
VerificationResult = new TScreenVerificationResult(new TVerificationResult(this,
ErrorCodes.GetErrorInfo(PetraErrorCodes.ERR_SUBSCRIPTION_REASONENDEDMANDATORY_WHEN_EXPIRED)),
ValidationColumn, ValidationControlsData.ValidationControl);
}
else if (ARow.IsDateCancelledNull())
{
VerificationResult = new TScreenVerificationResult(new TVerificationResult(this,
ErrorCodes.GetErrorInfo(PetraErrorCodes.ERR_SUBSCRIPTION_DATEENDEDMANDATORY_WHEN_EXPIRED)),
ValidationColumn, ValidationControlsData.ValidationControl);
}
}
else
{
// if 'SubscriptionStatus' is not CANCELLED or EXPIRED then 'Reason Ended' and 'End Date' must NOT be set
if (chkChangeReasonSubsCancelledCode.Checked)
{
if ((ARow.IsReasonSubsCancelledCodeNull())
|| (ARow.ReasonSubsCancelledCode == String.Empty))
{
VerificationResult = new TScreenVerificationResult(new TVerificationResult(this,
ErrorCodes.GetErrorInfo(PetraErrorCodes.ERR_SUBSCRIPTION_REASONENDEDSET_WHEN_ACTIVE)),
ValidationColumn, ValidationControlsData.ValidationControl);
}
}
else if (!chkChangeReasonSubsCancelledCode.Checked)
{
if (ARow.SubscriptionStatus != String.Empty)
{
VerificationResult = new TScreenVerificationResult(new TVerificationResult(this,
ErrorCodes.GetErrorInfo(PetraErrorCodes.ERR_SUBSCRIPTION_REASONENDEDSET_WHEN_ACTIVE)),
ValidationColumn, ValidationControlsData.ValidationControl);
VerificationResult.OverrideResultText(Catalog.GetString(
"Reason Ended must be cleared when a Subscription is made active."));
NoClearingOfVerificationResult = true;
}
}
if ((!ARow.IsReasonSubsCancelledCodeNull())
&& (ARow.ReasonSubsCancelledCode != String.Empty))
{
VerificationResult = new TScreenVerificationResult(new TVerificationResult(this,
ErrorCodes.GetErrorInfo(PetraErrorCodes.ERR_SUBSCRIPTION_REASONENDEDSET_WHEN_ACTIVE)),
ValidationColumn, ValidationControlsData.ValidationControl);
}
else if (!ARow.IsDateCancelledNull())
{
VerificationResult = new TScreenVerificationResult(new TVerificationResult(this,
ErrorCodes.GetErrorInfo(PetraErrorCodes.ERR_SUBSCRIPTION_DATEENDEDSET_WHEN_ACTIVE)),
ValidationColumn, ValidationControlsData.ValidationControl);
}
else if (!chkChangeDateCancelled.Checked)
{
if (ARow.SubscriptionStatus != String.Empty)
{
VerificationResult = new TScreenVerificationResult(new TVerificationResult(this,
ErrorCodes.GetErrorInfo(PetraErrorCodes.ERR_SUBSCRIPTION_DATEENDEDSET_WHEN_ACTIVE)),
ValidationColumn, ValidationControlsData.ValidationControl);
VerificationResult.OverrideResultText(Catalog.GetString("Date Ended must be cleared when a Subscription is made active."));
}
}
//.........这里部分代码省略.........