本文整理汇总了C#中WhereCondition.WhereNotContains方法的典型用法代码示例。如果您正苦于以下问题:C# WhereCondition.WhereNotContains方法的具体用法?C# WhereCondition.WhereNotContains怎么用?C# WhereCondition.WhereNotContains使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WhereCondition
的用法示例。
在下文中一共展示了WhereCondition.WhereNotContains方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddOutdatedWhereCondition
/// <summary>
/// Gets where condition based on value of given controls.
/// </summary>
/// <param name="where">Where condition</param>
/// <param name="column">Column to compare</param>
/// <param name="drpOperator">List control with operator</param>
/// <param name="valueBox">Text control with value</param>
/// <returns>Where condition for outdated documents</returns>
private void AddOutdatedWhereCondition(WhereCondition where, string column, ListControl drpOperator, ITextControl valueBox)
{
var value = TextHelper.LimitLength(valueBox.Text, 100);
if (!String.IsNullOrEmpty(value))
{
string condition = drpOperator.SelectedValue;
// Create condition based on operator
switch (condition)
{
case WhereBuilder.LIKE:
where.WhereContains(column, value);
break;
case WhereBuilder.NOT_LIKE:
where.WhereNotContains(column, value);
break;
case WhereBuilder.EQUAL:
where.WhereEquals(column, value);
break;
case WhereBuilder.NOT_EQUAL:
where.WhereNotEquals(column, value);
break;
}
}
}