private bool GetCondition(MerchantTravelXSJL tb, string key, string searchCity, string phoneNumber, DateTime? buyStartDate, DateTime? buyEndDate, int? checkStatus)
{
bool boolResult = true;
if (!String.IsNullOrEmpty(key))
{
boolResult &= tb.MERCHANTNAME == key;
}
if (!String.IsNullOrEmpty(searchCity))
{
boolResult &= tb.CITYCODE == searchCity;
}
if (!String.IsNullOrEmpty(phoneNumber))
{
boolResult &= tb.CELLPHONENUMBER == phoneNumber;
}
if (buyStartDate.HasValue)
{
boolResult &= (tb.CREATEDTIME >= buyStartDate.Value);
}
if (buyEndDate.HasValue)
{
boolResult &= tb.CREATEDTIME < buyEndDate.Value;
}
if (checkStatus.HasValue)
{
boolResult &= tb.STATUS == checkStatus;
}
return boolResult;
}