private void CsBoolColumns(Column column, string value, SqlWhereCollection where) { switch (column.CheckFilterControlType) { case ColumnUtilities.CheckFilterControlTypes.OnOnly: if (value.ToBool()) { where.Bool(column, "=1"); } break; case ColumnUtilities.CheckFilterControlTypes.OnAndOff: switch ((ColumnUtilities.CheckFilterTypes)value.ToInt()) { case ColumnUtilities.CheckFilterTypes.On: where.Bool(column, "=1"); break; case ColumnUtilities.CheckFilterTypes.Off: where.Or(or: new SqlWhereCollection() .Bool(column, " is null") .Bool(column, "=0")); break; } break; } }