Validation ブロックを使用して、次のタイプの検証を実装したいと考えています。私は EntLib 5.0 を使用しており、SQL Server データベースに検証ルールを保存しています。EntLib 5.0 Designer ツールを使用して次の検証を作成する方法。
If(PaymentType == 'CreditCard')
{
if(BilledAmount<100)
{
ErrorMsg = "Bill amount should greater than or equal to 100";
}
else if (BillAmount + TaxAmount > CreditCardMaxLimit)
{
ErrorMsg= "Credit card Max Amount limit is " + CreditCardMAxLimit;
}
}