复制代码 代码如下:
[Serializable]
public enum CustomerStatus
{
New = 0,
Active = 1,
Overdue = 2,
Suspended = 3,
Closing = 4,
Closed = 5
}
复制代码 代码如下:
public enum CustomerStatus
{
New = 1,
Active = 1<<1,
Overdue = 1<<2,
Suspended = 1<<3,
Closing = 1<<4,
Closed = 1<<5
}
复制代码 代码如下:
Select *
From Customer
Where [Status] & @Status = [Status]
复制代码 代码如下:
Select *
From Customer
Where ( @Status is null Or [Status] & @Status = [Status])
新闻热点
疑难解答