本文整理汇总了C#中Ict.Common.Verification.TVerificationResult类的典型用法代码示例。如果您正苦于以下问题:C# TVerificationResult类的具体用法?C# TVerificationResult怎么用?C# TVerificationResult使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TVerificationResult类属于Ict.Common.Verification命名空间,在下文中一共展示了TVerificationResult类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadControlsManual
private void ReadControlsManual(TRptCalculator ACalc, TReportActionEnum AReportAction)
{
if ((AReportAction == TReportActionEnum.raGenerate)
&& (dtpFromDate.Date > dtpToDate.Date))
{
TVerificationResult VerificationResult = new TVerificationResult(
Catalog.GetString("From date is later than to date."),
Catalog.GetString("Please change from date or to date."),
TResultSeverity.Resv_Critical);
FPetraUtilsObject.AddVerificationResult(VerificationResult);
}
ACalc.AddParameter("param_currency", "Base");
ACalc.AddParameter("param_ledger_number_i", FLedgerNumber);
// Set the values for accumulating the costs to 0
ACalc.AddParameter("CostCentreCredit", 0);
ACalc.AddParameter("CostCentreDebit", 0);
ACalc.AddParameter("AccountCodeCredit", 0);
ACalc.AddParameter("AccountCodeDebit", 0);
ACalc.AddParameter("TotalCredit", 0);
ACalc.AddParameter("TotalDebit", 0);
int MaxColumns = ACalc.GetParameters().Get("MaxDisplayColumns").ToInt();
// we need to know some indices of the columns
for (int Counter = 0; Counter < MaxColumns; ++Counter)
{
String ColumnName = "param_column_" + ACalc.GetParameters().Get("param_calculation", Counter, 0).ToString();
ACalc.AddParameter(ColumnName, Counter);
}
}
示例2: VerifyUnitData
/// <summary>
/// todoComment
/// </summary>
/// <param name="e"></param>
/// <param name="AMainDS"></param>
/// <param name="AVerificationResult"></param>
/// <returns></returns>
public static Boolean VerifyUnitData(DataColumnChangeEventArgs e, PartnerEditTDS AMainDS, out TVerificationResult AVerificationResult)
{
Boolean ReturnValue;
AVerificationResult = null;
if (e.Column.ColumnName == PUnitTable.GetUnitNameDBName())
{
VerifyUnitNameChange(e, AMainDS, out AVerificationResult);
}
// any verification errors?
if (AVerificationResult == null)
{
ReturnValue = true;
}
else
{
ReturnValue = false;
// MessageBox.Show('VerifyUnitData: There was an error!');
}
return ReturnValue;
}
示例3: EvaluateVerificationResults
private string EvaluateVerificationResults(TVerificationResult AExpectedResult, TVerificationResult ATestResult)
{
TVerificationResultCollection Tmp;
if (!TVerificationHelper.AreVerificationResultsIdentical(ATestResult, AExpectedResult))
{
Tmp = new TVerificationResultCollection();
if (AExpectedResult != null)
{
Tmp.Add(AExpectedResult);
}
if (ATestResult != null)
{
Tmp.Add(ATestResult);
}
return TVerificationHelper.FormatVerificationCollectionItems(Tmp);
}
else
{
return String.Empty;
}
}
示例4: ReadControlsManual
private void ReadControlsManual(TRptCalculator ACalc, TReportActionEnum AReportAction)
{
if ((AReportAction == TReportActionEnum.raGenerate)
&& (rbtPartner.Checked && (txtRecipient.Text == "0000000000")))
{
TVerificationResult VerificationResult = new TVerificationResult(
Catalog.GetString("No recipient selected."),
Catalog.GetString("Please select a recipient."),
TResultSeverity.Resv_Critical);
FPetraUtilsObject.AddVerificationResult(VerificationResult);
}
if ((AReportAction == TReportActionEnum.raGenerate)
&& rbtExtract.Checked
&& (txtExtract.Text == ""))
{
TVerificationResult VerificationMessage = new TVerificationResult(
Catalog.GetString("Enter an extract name."),
Catalog.GetString("No extract name entered!"), TResultSeverity.Resv_Critical);
FPetraUtilsObject.AddVerificationResult(VerificationMessage);
}
ACalc.AddParameter("param_recipient_key", txtRecipient.Text);
ACalc.AddParameter("param_extract_name", txtExtract.Text);
ACalc.AddParameter("param_ledger_number_i", FLedgerNumber);
}
示例5: ReadControlsManual
private void ReadControlsManual(TRptCalculator ACalc, TReportActionEnum AReportAction)
{
if ((AReportAction == TReportActionEnum.raGenerate)
&& (dtpFromDate.Date > dtpToDate.Date))
{
TVerificationResult VerificationResult = new TVerificationResult(
Catalog.GetString("From date is later than to date."),
Catalog.GetString("Please change from date or to date."),
TResultSeverity.Resv_Critical);
FPetraUtilsObject.AddVerificationResult(VerificationResult);
}
ACalc.AddParameter("param_ledger_number_i", FLedgerNumber);
ACalc.AddParameter("TransactionCount", 0);
ACalc.AddParameter("TransactionCountAccount", 0);
ACalc.AddParameter("SumDebitAccount", 0);
ACalc.AddParameter("SumCreditAccount", 0);
int MaxColumns = ACalc.GetParameters().Get("MaxDisplayColumns").ToInt();
for (int Counter = 0; Counter <= MaxColumns; ++Counter)
{
String ColumnName = ACalc.GetParameters().Get("param_calculation", Counter, 0).ToString();
if (ColumnName == "Debits")
{
ACalc.AddParameter("param_debit_column", Counter);
}
if (ColumnName == "Credits")
{
ACalc.AddParameter("param_credit_column", Counter);
}
}
}
示例6: ReadControlsVerify
private void ReadControlsVerify(TRptCalculator ACalc, TReportActionEnum AReportAction)
{
if (!FDirectRelationshipTable.Select(FDirectRelationshipTable.DefaultView.RowFilter).Any(r => (bool)r["Selection"])
&& !FReciprocalRelationshipTable.Select(FReciprocalRelationshipTable.DefaultView.RowFilter).Any(r => (bool)r["Selection"]))
{
TVerificationResult VerificationResult = new TVerificationResult(
Catalog.GetString("Select at least one Relationship Type to run the report."),
Catalog.GetString("No Relationship Type selected!"),
TResultSeverity.Resv_Critical);
FPetraUtilsObject.AddVerificationResult(VerificationResult);
}
}
示例7: ValidateCheckedListBox
/// <summary>
/// Checks if a CheckedListBox has at least one checked item.
/// </summary>
/// <param name="ACheckedListBox">LisBbox Control that should be verified.</param>
/// <returns>Null if if validation succeeded, otherwise a <see cref="TVerificationResult" />
/// is returned that contains details about the problem.
/// </returns>
public static TVerificationResult ValidateCheckedListBox(System.Windows.Forms.CheckedListBox ACheckedListBox)
{
TVerificationResult ReturnValue = null;
if (ACheckedListBox.CheckedItems.Count == 0)
{
ReturnValue = new TVerificationResult(ACheckedListBox.Name, ErrorCodes.GetErrorInfo(
CommonErrorCodes.ERR_INFORMATIONMISSING, StrItemNeedsToBeChecked));
}
return ReturnValue;
}
示例8: ReadControlsVerify
private void ReadControlsVerify(TRptCalculator ACalc, TReportActionEnum AReportAction)
{
if ((txtThisYear.Text == "0")
|| (txtLastYear.Text == "0"))
{
TVerificationResult VerificationResult = new TVerificationResult(
Catalog.GetString("No valid year entered."),
Catalog.GetString("Please enter a valid year."),
TResultSeverity.Resv_Critical);
FPetraUtilsObject.AddVerificationResult(VerificationResult);
}
}
示例9: ValidateCheckedListBoxVersatile
/// <summary>
/// Checks if a versatile CheckedListBox has at least one checked item.
/// </summary>
/// <param name="AClbVersatile">VersatileListBox Control that should be verified.</param>
/// <returns>Null if if validation succeeded, otherwise a <see cref="TVerificationResult" />
/// is returned that contains details about the problem.
/// </returns>
public static TVerificationResult ValidateCheckedListBoxVersatile(TClbVersatile AClbVersatile)
{
TVerificationResult ReturnValue = null;
if (AClbVersatile.CheckedItemsCount == 0)
{
ReturnValue = new TVerificationResult(AClbVersatile.Name, ErrorCodes.GetErrorInfo(
CommonErrorCodes.ERR_INFORMATIONMISSING, StrItemNeedsToBeChecked));
}
return ReturnValue;
}
示例10: ReadControlsManual
private void ReadControlsManual(TRptCalculator ACalc, TReportActionEnum AReportAction)
{
if (chkOnlyTravelDay.Checked)
{
if (!dtpTravelDay.ValidDate(false))
{
TVerificationResult VerificationResult = new TVerificationResult(
Catalog.GetString("Please insert a valid date in the \"Travel Selection\" Settings."),
Catalog.GetString("No valid date."),
TResultSeverity.Resv_Critical);
FPetraUtilsObject.AddVerificationResult(VerificationResult);
}
ACalc.AddParameter("param_dtpTravelDay", this.dtpTravelDay.Date);
}
}
示例11: ReadControlsManual
private void ReadControlsManual(TRptCalculator ACalc, TReportActionEnum AReportAction)
{
ACalc.AddParameter("param_ledger_number_i", FLedgerNumber);
ACalc.AddParameter("param_recipient_key_n", txtPartnerKey.Text);
if ((AReportAction == TReportActionEnum.raGenerate)
&& (txtPartnerKey.Text == "0000000000"))
{
TVerificationResult VerificationResult = new TVerificationResult(
Catalog.GetString("No recipient selected."),
Catalog.GetString("Please select a recipient."),
TResultSeverity.Resv_Critical);
FPetraUtilsObject.AddVerificationResult(VerificationResult);
}
}
示例12: ReadControlsManual
private void ReadControlsManual(TRptCalculator ACalc, TReportActionEnum AReportAction)
{
if (AReportAction == TReportActionEnum.raGenerate)
{
// validate anniversaires (comma seperated integers)
if (chkAnniversaries.Checked && (string.IsNullOrEmpty(txtAnniversaries.Text)
|| !Regex.IsMatch(txtAnniversaries.Text, @"^([0-9]+,)*[0-9]+$")))
{
TVerificationResult VerificationResult = new TVerificationResult(
Catalog.GetString("Length of Commitment Report"),
Catalog.GetString("Please enter a comma seperated list of anniversaires."),
TResultSeverity.Resv_Critical);
FPetraUtilsObject.AddVerificationResult(VerificationResult);
}
}
}
示例13: VerifySubscriptionData
/// <summary>
/// todoComment
/// </summary>
/// <param name="e"></param>
/// <param name="AVerificationResultCollection"></param>
/// <param name="AVerificationResult"></param>
/// <param name="FDataColumnComparedTo"></param>
/// <returns></returns>
public static Boolean VerifySubscriptionData(DataColumnChangeEventArgs e,
TVerificationResultCollection AVerificationResultCollection,
out TVerificationResult AVerificationResult,
out DataColumn FDataColumnComparedTo)
{
Boolean ReturnValue;
AVerificationResult = null;
DataColumn FDataColumnComparedTo2 = null;
if ((e.Column.ColumnName == PSubscriptionTable.GetDateCancelledDBName())
|| (e.Column.ColumnName == PSubscriptionTable.GetExpiryDateDBName())
|| (e.Column.ColumnName == PSubscriptionTable.GetDateNoticeSentDBName())
|| (e.Column.ColumnName == PSubscriptionTable.GetStartDateDBName())
|| (e.Column.ColumnName == PSubscriptionTable.GetSubscriptionRenewalDateDBName())
|| (e.Column.ColumnName == PSubscriptionTable.GetFirstIssueDBName()) || (e.Column.ColumnName == PSubscriptionTable.GetLastIssueDBName()))
{
VerifySubscriptionDates(e, AVerificationResultCollection, out AVerificationResult, out FDataColumnComparedTo2);
}
FDataColumnComparedTo = FDataColumnComparedTo2;
// if (e.Column.Ordinal = (e.Column.Table as PPartnerLocationTable).ColumnEmailAddress.Ordinal) then
// begin
// VerifyEMailAddress(e, AVerificationResult);
// end;
if ((e.Column.ColumnName == PSubscriptionTable.GetPublicationCopiesDBName())
|| (e.Column.ColumnName == PSubscriptionTable.GetNumberIssuesReceivedDBName())
|| (e.Column.ColumnName == PSubscriptionTable.GetNumberComplimentaryDBName()))
{
VerifyInteger(e, out AVerificationResult);
}
// any verification errors?
if (AVerificationResult == null)
{
ReturnValue = true;
}
else
{
ReturnValue = false;
}
return ReturnValue;
}
示例14: ReadControlsManual
private void ReadControlsManual(TRptCalculator ACalc, TReportActionEnum AReportAction)
{
int ColumnCounter = 0;
bool DatesAreValid = (dtpFromDate.ValidDate(false) && dtpToDate.ValidDate(false));
// Add the columns to the report
ACalc.AddParameter("param_calculation", "Date", ColumnCounter);
ACalc.AddParameter("ColumnWidth", (float)2.5, ColumnCounter);
ColumnCounter++;
ACalc.AddParameter("param_calculation", "Total", ColumnCounter);
ACalc.AddParameter("ColumnWidth", "3", ColumnCounter);
ColumnCounter++;
ACalc.AddParameter("param_calculation", "Actual", ColumnCounter);
ACalc.AddParameter("ColumnWidth", "2", ColumnCounter);
ColumnCounter++;
ACalc.AddParameter("param_calculation", "Expected", ColumnCounter);
ACalc.AddParameter("ColumnWidth", "2", ColumnCounter);
ColumnCounter++;
ACalc.AddParameter("param_calculation", "Children", ColumnCounter);
ACalc.AddParameter("ColumnWidth", "2", ColumnCounter);
ColumnCounter++;
ACalc.AddParameter("MaxDisplayColumns", ColumnCounter);
if ((AReportAction == TReportActionEnum.raGenerate) && DatesAreValid)
{
if (dtpFromDate.Date > dtpToDate.Date)
{
TVerificationResult VerificationResult = new TVerificationResult(
Catalog.GetString("Change From-Date or To-Date"),
Catalog.GetString("From-Date must be earlier than To-Date"),
TResultSeverity.Resv_Critical);
FPetraUtilsObject.AddVerificationResult(VerificationResult);
}
}
if (!DatesAreValid)
{
TVerificationResult VerificationResult = new TVerificationResult(
Catalog.GetString("Enter valid From-Date and To-Date."),
Catalog.GetString("Dates must be valid"),
TResultSeverity.Resv_Critical);
FPetraUtilsObject.AddVerificationResult(VerificationResult);
}
}
示例15: ValueMustNotBeNull
/// <summary>
/// Checks whether an Object is null.
/// </summary>
/// <param name="AValue">The Object to check.</param>
/// <param name="ADescription">Description what the value is about (for the
/// error message).</param>
/// <param name="AResultContext">Context of verification (can be null).</param>
/// <param name="AResultColumn">Which <see cref="System.Data.DataColumn" /> failed (can be null).</param>
/// <param name="AResultControl">Which <see cref="System.Windows.Forms.Control" /> is involved (can be null).</param>
/// <returns>Null if <paramref name="AValue" /> is not null,
/// otherwise a <see cref="TVerificationResult" /> is returned that
/// contains details about the problem, with a message that uses <paramref name="ADescription" />.</returns>
public static TVerificationResult ValueMustNotBeNull(object AValue, string ADescription,
object AResultContext = null, System.Data.DataColumn AResultColumn = null, System.Windows.Forms.Control AResultControl = null)
{
TVerificationResult ReturnValue = null;
String Description = THelper.NiceValueDescription(ADescription);
// Check
if (AValue == null)
{
ReturnValue = new TVerificationResult(AResultContext,
ErrorCodes.GetErrorInfo(CommonErrorCodes.ERR_NONULL, StrValueMustNotBeNull, new string[] { Description }));
if (AResultColumn != null)
{
ReturnValue = new TScreenVerificationResult(ReturnValue, AResultColumn, AResultControl);
}
}
return ReturnValue;
}